openclaw - 💡(How to fix) Fix /think max rejected for ollama/deepseek-v4-flash:cloud despite provider support [1 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#71584Fetched 2026-04-26 05:11:07
View on GitHub
Comments
0
Participants
1
Timeline
0
Reactions
0
Author
Participants

/think max fails with "Unsupported thinking level 'max' for this model" even though the underlying provider (Ollama) supports reasoning_effort: "max" perfectly fine.

Error Message

OpenClaw rejects "max" with error:

Root Cause

The thinking level validation in OpenClaw is hardcoded:

// thinking-HCcyCHV2.js
const BASE_THINKING_LEVELS = [
    "off",
    "minimal", 
    "low",
    "medium",
    "high"
];

When resolveThinkingProfile() is called for a generic provider (not OpenAI/Anthropic), it uses buildBaseThinkingProfile() which only includes these 5 levels. "max" and "xhigh" are never added for Ollama models.

Additionally, attempts to workaround via model config fail:

"compat": {
  "supportsReasoningEffort": true,
  "supportedReasoningEfforts": ["low", "medium", "high", "max"]
}

OpenClaw rewrites the config and removes supportedReasoningEfforts.

Fix Action

Workaround

Use /think high instead of /think max. The model responds correctly to "high" via Ollama.

Code Example

Unsupported thinking level "max" for this model. Valid levels: off, minimal, low, medium, high

---

curl -X POST "https://ollama.com/api/chat" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OLLAMA_API_KEY" \
  -d '{
    "model": "deepseek-v4-flash:cloud",
    "messages": [{"role": "user", "content": "Say hi briefly"}],
    "options": {"reasoning_effort": "max"}
  }'

---

/think max
Unsupported thinking level "max" for this model. Valid levels: off, minimal, low, medium, high

---

// thinking-HCcyCHV2.js
const BASE_THINKING_LEVELS = [
    "off",
    "minimal", 
    "low",
    "medium",
    "high"
];

---

"compat": {
  "supportsReasoningEffort": true,
  "supportedReasoningEfforts": ["low", "medium", "high", "max"]
}
RAW_BUFFERClick to expand / collapse

Summary

/think max fails with "Unsupported thinking level 'max' for this model" even though the underlying provider (Ollama) supports reasoning_effort: "max" perfectly fine.

Bug Description

Expected Behavior

When using /think max with a model that supports reasoning (e.g., deepseek-v4-flash:cloud via Ollama), OpenClaw should either:

  • Accept "max" as a valid thinking level, or
  • Map it to the highest supported level and send it to the provider

Actual Behavior

OpenClaw rejects "max" with error:

Unsupported thinking level "max" for this model. Valid levels: off, minimal, low, medium, high

This happens before any request is sent to the provider. The validation is entirely local/hardcoded.

Evidence

Direct curl to Ollama works perfectly

curl -X POST "https://ollama.com/api/chat" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OLLAMA_API_KEY" \
  -d '{
    "model": "deepseek-v4-flash:cloud",
    "messages": [{"role": "user", "content": "Say hi briefly"}],
    "options": {"reasoning_effort": "max"}
  }'

Result: ✅ Works. Model accepts "max" and returns thinking content.

OpenClaw rejects it locally

Same model via OpenClaw (ollama/deepseek-v4-flash:cloud):

/think max
→ Unsupported thinking level "max" for this model. Valid levels: off, minimal, low, medium, high

Root Cause Analysis

The thinking level validation in OpenClaw is hardcoded:

// thinking-HCcyCHV2.js
const BASE_THINKING_LEVELS = [
    "off",
    "minimal", 
    "low",
    "medium",
    "high"
];

When resolveThinkingProfile() is called for a generic provider (not OpenAI/Anthropic), it uses buildBaseThinkingProfile() which only includes these 5 levels. "max" and "xhigh" are never added for Ollama models.

Additionally, attempts to workaround via model config fail:

"compat": {
  "supportsReasoningEffort": true,
  "supportedReasoningEfforts": ["low", "medium", "high", "max"]
}

OpenClaw rewrites the config and removes supportedReasoningEfforts.

Environment

  • OpenClaw version: v2026.4.23
  • Model: deepseek-v4-flash:cloud (via Ollama)
  • Provider: ollama

Suggested Fixes

  1. Short-term: Allow "max" as an alias for "high" when the model has reasoning: true but doesn't have a custom thinking profile
  2. Medium-term: Respect compat.supportedReasoningEfforts from model config instead of hardcoding levels
  3. Long-term: Query the provider for supported reasoning levels rather than maintaining a local allowlist

Workaround

Use /think high instead of /think max. The model responds correctly to "high" via Ollama.

extent analysis

TL;DR

Use /think high as a temporary workaround since the model responds correctly to "high" via Ollama.

Guidance

  • Verify that the model supports "high" as a thinking level by checking the model's configuration or documentation.
  • Test the workaround by using /think high and confirm that it produces the expected output.
  • Consider implementing a short-term fix to allow "max" as an alias for "high" when the model has reasoning: true but doesn't have a custom thinking profile.
  • In the long term, query the provider for supported reasoning levels instead of maintaining a local allowlist to ensure compatibility with different models and providers.

Example

No code snippet is provided as the issue is more related to configuration and compatibility rather than a specific code error.

Notes

The provided workaround may not be suitable for all models or providers, and a more robust solution would involve respecting compat.supportedReasoningEfforts from model config or querying the provider for supported reasoning levels.

Recommendation

Apply the workaround by using /think high until a more permanent fix is implemented, as it is a simple and effective solution that can mitigate the issue temporarily.

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…

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 /think max rejected for ollama/deepseek-v4-flash:cloud despite provider support [1 participants]