openclaw - 💡(How to fix) Fix [Bug]: Ollama Cloud think modes don't match mapped choices in /think [2 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#77860Fetched 2026-05-06 06:20:12
View on GitHub
Comments
2
Participants
2
Timeline
3
Reactions
2
Author
Timeline (top)
commented ×2closed ×1

When using Ollama cloud models via a base URL connection, OpenClaw's /think command offers a hardcoded set of thinking levels that don't match what the upstream Ollama API accepts per model. Specifically, it offers minimal (which isn't a native Ollama thinking level) and omits max (which some models support).

Error Message

$ docker exec -it ollama ollama run gpt-oss:120b:cloud Connecting to 'gpt-oss:120b:cloud' on 'ollama.com' ⚡

/set think test Set 'think' mode to 'test'. test error: 400 Bad Request: invalid think value: "test" (must be "high", "medium", "low", "max", true, or false)

Root Cause

When using Ollama cloud models via a base URL connection, OpenClaw's /think command offers a hardcoded set of thinking levels that don't match what the upstream Ollama API accepts per model. Specifically, it offers minimal (which isn't a native Ollama thinking level) and omits max (which some models support).

Code Example

$ docker exec -it ollama ollama run gpt-oss:120b:cloud
Connecting to 'gpt-oss:120b:cloud' on 'ollama.com'>>> /set think test
Set 'think' mode to 'test'.
>>> test
error: 400 Bad Request: invalid think value: "test" (must be "high", "medium", "low", "max", true, or false)
RAW_BUFFERClick to expand / collapse

Description

When using Ollama cloud models via a base URL connection, OpenClaw's /think command offers a hardcoded set of thinking levels that don't match what the upstream Ollama API accepts per model. Specifically, it offers minimal (which isn't a native Ollama thinking level) and omits max (which some models support).

Background

Ollama's thinking support varies by model:

  • Most thinking models accept true/false (on/off)
  • GPT-OSS accepts only low, medium, high — and ignores true/false entirely (Ollama docs)
  • Models like deepseek-v4-pro also support max (ollama/ollama#15952)

The Ollama cloud API validates think against high, medium, low, max, true, false at the API layer, but not all models meaningfully support all levels.

Interestingly, the API validation layer exposes max even for GPT-OSS, despite the docs claiming it only supports low/medium/high:

$ docker exec -it ollama ollama run gpt-oss:120b:cloud
Connecting to 'gpt-oss:120b:cloud' on 'ollama.com' ⚡
>>> /set think test
Set 'think' mode to 'test'.
>>> test
error: 400 Bad Request: invalid think value: "test" (must be "high", "medium", "low", "max", true, or false)

What OpenClaw offers via /think

  • off, minimal, low, medium, high

Problems:

  1. minimal is not a native Ollama thinking level. It appears to work, so OpenClaw is presumably mapping it to something else before sending the request — but this is opaque and confusing. It looks like a first-class option the API doesn't recognise.
  2. max is missing. Models that support max thinking have no way to enable it through OpenClaw.
  3. The list is hardcoded, not per-model. GPT-OSS only supports low/medium/high, while other models have different sets of valid levels. OpenClaw presents the same choices regardless of which model is active.

Expected behavior

OpenClaw should discover the thinking modes supported by each model (or at least per provider) rather than using a static hardcoded list. The available /think options should reflect what the upstream API actually accepts for the active model.

Reproduction

  1. Configure OpenClaw with an Ollama base URL (not API key) pointing to a local Ollama instance with cloud model access
  2. Switch to a cloud model: /model ollama/gpt-oss:120b:cloud
  3. Run /think
  4. Observe that minimal is offered (not a valid Ollama thinking level) and max is missing (valid for some models)

Environment

  • OpenClaw 2026.5.4 (325df3e)
  • OpenClaw connected to Ollama via base URL (not API key)
  • Ollama cloud model (:cloud suffix)

Issue submitted by civil's clanker

extent analysis

TL;DR

Update OpenClaw to dynamically retrieve and display thinking levels supported by the active Ollama model.

Guidance

  • Investigate the Ollama API to determine if it provides an endpoint to retrieve supported thinking levels for each model.
  • Modify OpenClaw to query this endpoint (if available) and update the /think command options based on the model's supported thinking levels.
  • Consider adding a fallback mechanism to handle models with unknown or unsupported thinking levels.
  • Review the Ollama documentation and issue tracker (e.g., ollama/ollama#15952) to ensure accuracy and consistency with the upstream API.

Example

No code snippet is provided due to the lack of specific implementation details in the issue.

Notes

The solution may require changes to OpenClaw's internal logic and API interactions. It is essential to ensure that the updated implementation accurately reflects the supported thinking levels for each Ollama model.

Recommendation

Apply a workaround by manually mapping the supported thinking levels for each model and updating OpenClaw's hardcoded list, until a more robust solution can be implemented. This approach will allow users to access the correct thinking levels for their models, although it may not be scalable or future-proof.

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

OpenClaw should discover the thinking modes supported by each model (or at least per provider) rather than using a static hardcoded list. The available /think options should reflect what the upstream API actually accepts for the active model.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING