openclaw - ✅(Solved) Fix [Bug]: [Regression]: Ollama thinking parameter always forced to false after 2026.4.26 (be8c246) update [1 pull requests, 6 comments, 4 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#73366Fetched 2026-04-29 06:20:33
View on GitHub
Comments
6
Participants
4
Timeline
22
Reactions
0
Author
Timeline (top)
commented ×6mentioned ×6subscribed ×6labeled ×2

Version: 2026.4.26 (be8c246) Regression introduced: Worked correctly before 2026.4.15


After updating to be8c246, the think parameter for Ollama models is always sent as false regardless of any configuration. Thinking cannot be enabled through any method — Discord slash commands, Web dashboard, or openclaw.json.

Root Cause

Version: 2026.4.26 (be8c246) Regression introduced: Worked correctly before 2026.4.15


After updating to be8c246, the think parameter for Ollama models is always sent as false regardless of any configuration. Thinking cannot be enabled through any method — Discord slash commands, Web dashboard, or openclaw.json.

Fix Action

Fix / Workaround

  • Affected: All users running Ollama models with thinking capability (confirmed: qwen3.6:35b-a3b-mxfp8, gemma4)
  • Severity: Blocks workflow — thinking is completely non-functional; no workaround available
  • Frequency: Always reproducible after be8c246
  • Consequence: Thinking capability is entirely unavailable for all Ollama models, despite the models supporting it

Attempted Workarounds (all failed)

PR fix notes

PR #73386: fix(ollama): restore thinking level support for discovered models

Description (problem / solution / changelog)

Summary

After 7a45743 ("honor native model capabilities"), the Ollama provider's thinking-profile resolver gates on reasoning === true from the catalog context. Most call sites (e.g. /think command, formatThinkingLevels, listThinkingLevels) invoke the resolver without a catalog, so reasoning is always undefined and only the off level is returned — breaking thinking for every Ollama model.

Root Cause

The flow:

  1. /think mediumisThinkingLevelSupported({ provider: "ollama", model: "qwen3.6:...", level: "medium" })
  2. resolveThinkingProfile({ provider: "ollama", model: "qwen3.6:...", catalog: undefined })
  3. resolveThinkingPolicyContext() sets reasoning: undefined (no catalog to look up)
  4. → Ollama plugin's resolveThinkingProfile({ reasoning: undefined })reasoning === true is false → returns [{ id: "off" }]
  5. → "Thinking level 'medium' is not supported. Use one of: off."

Before the regression, reasoning was determined by isReasoningModelHeuristic(modelId) which worked for models with "think"/"reason" in the name. After the commit, it relies on /api/show capabilities, but those are only available during discovery — not at thinking-level check time.

Fix

Maintain a synchronous Set<string> (ollamaDiscoveredThinkingModels) of model IDs whose /api/show response includes the thinking capability, populated during enrichOllamaModelsWithContext. The thinking-profile resolver now checks three sources:

  1. reasoning === true — catalog present (existing path)
  2. ollamaDiscoveredThinkingModels.has(modelId) — post-discovery sync lookup (new)
  3. isReasoningModelHeuristic(modelId) — name-based fallback when neither source has data (restored)

Testing

  • Existing tests pass (30/30 in index.test.ts, 13/13 in provider-models.test.ts)
  • Added test: "exposes thinking levels for discovered thinking-capable models even without catalog" — verifies that adding a model to ollamaDiscoveredThinkingModels makes thinking levels available even with reasoning: undefined
  • Fixed vi.mock for ./api.js to use importOriginal pattern (was missing real exports like the new ollamaDiscoveredThinkingModels)

Closes #73366

Changed files

  • extensions/ollama/api.ts (modified, +1/-0)
  • extensions/ollama/index.test.ts (modified, +33/-6)
  • extensions/ollama/index.ts (modified, +6/-2)
  • extensions/ollama/src/provider-models.ts (modified, +12/-0)

Code Example

Choose level for /think. Options: off.

---

Thinking level "medium" is not supported for ollama/qwen3.6:35b-a3b-mxfp8. Use one of: off.

---

Current thinking level: medium.
Options: off.

---

Unsupported thinking level "medium" for this model. Valid levels: off.

---

{
  "options": {
    "temperature": 0.9,
    "top_p": 0.95,
    "num_ctx": 200000
  },
  "think": false
}

---

#### Ollama api/show: Model supports thinking

curl http://localhost:11434/api/show -d '{
  "model": "qwen3.6:35b-a3b-mxfp8"
}'


{ ... "parameters":"min_p                          0\npresence_penalty               1.5\nrepeat_penalty                 1\ntemperature                    1\ntop_k                          20\ntop_p                          0.95","template":"{{ .Prompt }}","details":{"parent_model":"","format":"safetensors","family":"qwen3_5_moe","families":null,"parameter_size":"35.1B","quantization_level":"mxfp8"},"model_info":{"general.architecture":"qwen3_5_moe","general.parameter_count":35106839040,"qwen3_5_moe.block_count":40,"qwen3_5_moe.context_length":262144,"qwen3_5_moe.embedding_length":2048},"capabilities":["completion","vision","thinking","tools"],"modified_at":"2026-04-24T17:04:13.123285384+09:00","requires":"0.19.0"}%   

---

#### Traffic Observation (mitmproxy)

**Request to Ollama `POST /api/chat`:**

{
  "options": {
    "temperature": 0.9,
    "top_p": 0.95,
    "num_ctx": 200000
  },
  "think": false
}


> **Note:** `num_ctx` is set to `200000` here as it was modified during testing to verify that custom parameter values are being applied at all. `temperature` and `top_p` are correctly passed through — `think` is the only parameter that remains `false` regardless of configuration.

---

---

"agents": {
  "defaults": {
    "thinkingDefault": "medium"
  }
}

---

{
            "id": "qwen3.6:35b-a3b-mxfp8",
            "name": "qwen3.6:35b-a3b-mxfp8",
            "api": "ollama",
            "reasoning": true,
            "input": [
              "text",
              "image"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 8192,
            "params": {
              "thinking": "medium",
              "temperature": 0.9,
              "top_p": 0.95,
              "num_ctx": 131072,
              "think": true
            },
            "compat": {
              "supportsTools": true
            }
          }
RAW_BUFFERClick to expand / collapse

Bug type

Regression (worked before, now fails)

Beta release blocker

No

Summary

Version: 2026.4.26 (be8c246) Regression introduced: Worked correctly before 2026.4.15


After updating to be8c246, the think parameter for Ollama models is always sent as false regardless of any configuration. Thinking cannot be enabled through any method — Discord slash commands, Web dashboard, or openclaw.json.

Steps to Reproduce

  1. Use any Ollama model with thinking capability (e.g. qwen3.6:35b-a3b-mxfp8, gemma4)
  2. Attempt to enable thinking via /think medium (also for low, minimal, etc.,) in Discord or Web dashboard
  3. Observe that thinking level options are limited to off only

Expected behavior

  • The think parameter should be configurable and passed correctly to Ollama (e.g. think: true when thinking is enabled), matching the behavior prior to 2026.4.15.
  • Thinking levels (low, medium, high) should be selectable via Discord slash commands and the Web dashboard for Ollama models that support thinking.

Actual behavior

Discord /think command:

Choose level for /think. Options: off.

Discord /think medium:

Thinking level "medium" is not supported for ollama/qwen3.6:35b-a3b-mxfp8. Use one of: off.

Web dashboard /think command:

Current thinking level: medium.
Options: off.

Web dashboard /think medium:

Unsupported thinking level "medium" for this model. Valid levels: off.

Traffic Observation (mitmproxy)

Request to Ollama POST /api/chat:

{
  "options": {
    "temperature": 0.9,
    "top_p": 0.95,
    "num_ctx": 200000
  },
  "think": false
}

Note: num_ctx is set to 200000 here as it was modified during testing to verify that custom parameter values are being applied at all. temperature and top_p are correctly passed through — think is the only parameter that remains false regardless of configuration.

<img width="859" height="469" alt="Image" src="https://github.com/user-attachments/assets/450a8a4f-dd83-46c1-98b7-8a4866b45457" />

OpenClaw version

2026.4.26

Operating system

macOS 26.4.1

Install method

No response

Model

ollama/qwen3.6:35b-a3b-mxfp8 / ollama/qwen3.6:27b-nvfp4 / ollama/gemma4:e4b-nvfp4

Provider / routing chain

ollama (local ollama), local gateway

Additional provider/model setup details

  • Ollama 0.21.1
  • Mac16,11 (Mac mini M4 Pro, 64 GB RAM)

Logs, screenshots, and evidence

#### Ollama api/show: Model supports thinking

curl http://localhost:11434/api/show -d '{
  "model": "qwen3.6:35b-a3b-mxfp8"
}'


{ ... "parameters":"min_p                          0\npresence_penalty               1.5\nrepeat_penalty                 1\ntemperature                    1\ntop_k                          20\ntop_p                          0.95","template":"{{ .Prompt }}","details":{"parent_model":"","format":"safetensors","family":"qwen3_5_moe","families":null,"parameter_size":"35.1B","quantization_level":"mxfp8"},"model_info":{"general.architecture":"qwen3_5_moe","general.parameter_count":35106839040,"qwen3_5_moe.block_count":40,"qwen3_5_moe.context_length":262144,"qwen3_5_moe.embedding_length":2048},"capabilities":["completion","vision","thinking","tools"],"modified_at":"2026-04-24T17:04:13.123285384+09:00","requires":"0.19.0"}%   

---

#### Traffic Observation (mitmproxy)

**Request to Ollama `POST /api/chat`:**

{
  "options": {
    "temperature": 0.9,
    "top_p": 0.95,
    "num_ctx": 200000
  },
  "think": false
}


> **Note:** `num_ctx` is set to `200000` here as it was modified during testing to verify that custom parameter values are being applied at all. `temperature` and `top_p` are correctly passed through — `think` is the only parameter that remains `false` regardless of configuration.

---

Impact and severity


  • Affected: All users running Ollama models with thinking capability (confirmed: qwen3.6:35b-a3b-mxfp8, gemma4)
  • Severity: Blocks workflow — thinking is completely non-functional; no workaround available
  • Frequency: Always reproducible after be8c246
  • Consequence: Thinking capability is entirely unavailable for all Ollama models, despite the models supporting it

Additional information

Regression: Worked correctly before 2026.4.15

Attempted Workarounds (all failed)

1. agents.defaults.thinkingDefault in openclaw.json:

"agents": {
  "defaults": {
    "thinkingDefault": "medium"
  }
}

Tried values: low, medium, on — none applied.

2. Per-model params.think override:

{
            "id": "qwen3.6:35b-a3b-mxfp8",
            "name": "qwen3.6:35b-a3b-mxfp8",
            "api": "ollama",
            "reasoning": true,
            "input": [
              "text",
              "image"
            ],
            "cost": {
              "input": 0,
              "output": 0,
              "cacheRead": 0,
              "cacheWrite": 0
            },
            "contextWindow": 131072,
            "maxTokens": 8192,
            "params": {
              "thinking": "medium",
              "temperature": 0.9,
              "top_p": 0.95,
              "num_ctx": 131072,
              "think": true
            },
            "compat": {
              "supportsTools": true
            }
          }

Tried values: true, "medium", "low" — none applied. Traffic confirms think: false is still sent.

3. Reset provider/model list and re-ran onboarding — no change

4. Started a new chat session — no change

5. Removed per-agent model files; tried both models.mode: "merge" and "replace" — no change

Suspected Related Changes

  • Ollama api/show handling: #72407, 7a45743
  • Ollama params handling: 2dba9e6, aa071e0
  • Related issue: #48010

extent analysis

TL;DR

The think parameter for Ollama models is always sent as false due to a regression introduced in version 2026.4.15, and a potential workaround is to review and adjust the Ollama API handling and parameter processing.

Guidance

  • Review the changes introduced in commits 7a45743, 2dba9e6, and aa071e0 to understand how Ollama API handling and parameter processing were modified.
  • Verify that the think parameter is correctly set in the openclaw.json configuration file and in the per-model params override.
  • Test the think parameter with different values (e.g., true, medium, low) to see if any of them are correctly passed to the Ollama API.
  • Investigate the related issue #48010 to see if it provides any insights into the problem.

Example

No code snippet is provided as the issue is related to a specific version and configuration of Ollama and OpenClaw.

Notes

The issue seems to be related to a regression introduced in a specific version of OpenClaw, and the provided information suggests that the think parameter is not being correctly passed to the Ollama API. However, without more information about the changes made in the mentioned commits, it is difficult to provide a more specific solution.

Recommendation

Apply a workaround by reviewing and adjusting the Ollama API handling and parameter processing, as the issue seems to be related to a regression introduced in a specific version of OpenClaw.

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

  • The think parameter should be configurable and passed correctly to Ollama (e.g. think: true when thinking is enabled), matching the behavior prior to 2026.4.15.
  • Thinking levels (low, medium, high) should be selectable via Discord slash commands and the Web dashboard for Ollama models that support thinking.

Still need to ship something?

×6

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

Back to top recommendations

TRENDING