openclaw - 💡(How to fix) Fix [Bug]: Ollama thinking modes intermittently fall back to hardcoded defaults [1 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
openclaw/openclaw#77873Fetched 2026-05-06 06:19:56
View on GitHub
Comments
1
Participants
2
Timeline
2
Reactions
2
Author
Timeline (top)
closed ×1commented ×1

OpenClaw can correctly fetch per-model thinking modes from Ollama (confirmed showing off, low, medium, high, max for gpt-oss:120b-cloud), but sometimes regresses to hardcoded defaults (off, minimal, low, medium, high) within the same session. The fallback includes minimal — which is not a native Ollama thinking level — and drops max even when the model supports it.

Root Cause

OpenClaw can correctly fetch per-model thinking modes from Ollama (confirmed showing off, low, medium, high, max for gpt-oss:120b-cloud), but sometimes regresses to hardcoded defaults (off, minimal, low, medium, high) within the same session. The fallback includes minimal — which is not a native Ollama thinking level — and drops max even when the model supports it.

RAW_BUFFERClick to expand / collapse

Description

OpenClaw can correctly fetch per-model thinking modes from Ollama (confirmed showing off, low, medium, high, max for gpt-oss:120b-cloud), but sometimes regresses to hardcoded defaults (off, minimal, low, medium, high) within the same session. The fallback includes minimal — which is not a native Ollama thinking level — and drops max even when the model supports it.

Observed behaviour

Working as expected:

Choose level for /think. Options: off, low, medium, high, max.

Regressed to defaults (same session, same model, after /status):

Choose level for /think. Options: off, minimal, low, medium, high.

However, this regression is not reliably reproducible — it worked correctly across multiple /think calls in another agent session. This suggests a timing issue, cached state invalidation, or a code path where per-model data is lost.

Likely cause

The per-model thinking mode data appears to be fetched once and cached, but something (possibly a /status call or model re-resolve path) can invalidate or skip the cache, falling back to OpenClaw's static list.

Expected behavior

Once per-model thinking modes are fetched, they should persist for the duration of the session. The minimal level should not appear for Ollama models since it's not a valid value in the Ollama API.

Environment

  • OpenClaw 2026.5.4 (325df3e)
  • Ollama connected via base URL (http://127.0.0.1:11434)
  • Ollama cloud model gpt-oss:120b-cloud

Issue submitted by civil's clanker

extent analysis

TL;DR

The issue can be mitigated by ensuring that the per-model thinking mode data is properly cached and not invalidated by subsequent requests, such as /status calls.

Guidance

  • Verify that the caching mechanism for per-model thinking modes is correctly implemented and not being bypassed or invalidated by certain code paths, such as model re-resolve or /status calls.
  • Investigate the specific conditions under which the regression occurs, focusing on the timing and sequence of requests, to identify potential triggers for the cache invalidation.
  • Consider adding logging or debugging statements to track the cache state and per-model thinking mode data throughout the session to gain more insight into the issue.
  • Review the code handling /status calls and model re-resolve paths to ensure they do not inadvertently cause the cache to fall back to default values.

Example

No specific code snippet can be provided without more context, but ensuring that cache invalidation is properly handled might involve checking cache update logic, especially around points where the default values are used.

Notes

The solution may involve adjusting the caching strategy or ensuring that all relevant code paths respect and update the cache correctly. The issue's intermittent nature suggests that timing and the sequence of operations play a significant role.

Recommendation

Apply a workaround to ensure that the per-model thinking mode data is persisted and not overwritten by default values, possibly by reviewing and adjusting the caching logic around /status calls and model re-resolve paths. This is recommended because the root cause seems related to cache handling rather than a version-specific issue that could be resolved by an upgrade.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

Once per-model thinking modes are fetched, they should persist for the duration of the session. The minimal level should not appear for Ollama models since it's not a valid value in the Ollama API.

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

openclaw - 💡(How to fix) Fix [Bug]: Ollama thinking modes intermittently fall back to hardcoded defaults [1 comments, 2 participants]