openclaw - 💡(How to fix) Fix [Bug]: [assistant reasoning omitted] appears with reasoningDefault off on Ollama models

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…

When using Ollama models (e.g., minimax-m2.7:cloud, kimi-k2.5:cloud, glm-5:cloud, minimax-m2.5:cloud) with reasoningDefault: "off" in agent.json and reasoning: false in models.json, the [assistant reasoning omitted] text still appears in responses.

Error Message

  • Issue #87641 (kimi-k2.6 multi-turn format error) was closed May 29, 2026

Root Cause

Based on OpenClaw source code (dist/reasoning-sanitizer-BA49xp2a.js):

// When content becomes empty after stripping reasoning parts:
record.content = nextContent.length > 0 ? nextContent : [{
    type: "text",
    text: OMITTED_ASSISTANT_REASONING_TEXT  // "[assistant reasoning omitted]"
}];

And from docs/reference/transcript-hygiene.md:

Anthropic / Minimax (Anthropic-compatible)

  • Thinking blocks with missing, empty, or blank replay signatures are stripped before provider conversion. If that empties an assistant turn, OpenClaw keeps turn shape with non-empty omitted-reasoning text.

The problem: Even with reasoningDefault: "off", Ollama models may still output thinking/reasoning blocks that get stripped, leaving empty content → triggering the [assistant reasoning omitted] placeholder.

Code Example

{
  "id": "ops",
  "model": "ollama/minimax-m2.7:cloud",
  "reasoningDefault": "off"
}

---

{
  "id": "minimax-m2.7:cloud",
  "reasoning": false,
  ...
}

---

// When content becomes empty after stripping reasoning parts:
record.content = nextContent.length > 0 ? nextContent : [{
    type: "text",
    text: OMITTED_ASSISTANT_REASONING_TEXT  // "[assistant reasoning omitted]"
}];
RAW_BUFFERClick to expand / collapse

Bug Report

Summary

When using Ollama models (e.g., minimax-m2.7:cloud, kimi-k2.5:cloud, glm-5:cloud, minimax-m2.5:cloud) with reasoningDefault: "off" in agent.json and reasoning: false in models.json, the [assistant reasoning omitted] text still appears in responses.

Environment

  • OpenClaw version: 2026.5.28 (upgraded from 2026.5.27)
  • Provider: Ollama (local)
  • Models tested: minimax-m2.7:cloud, kimi-k2.5:cloud, glm-5:cloud, minimax-m2.5:cloud (all exhibit same issue)
  • Agent: ops (ops agent, reasoningDefault: off)
  • Ollama server: running on localhost:11434

Configuration

agent.json:

{
  "id": "ops",
  "model": "ollama/minimax-m2.7:cloud",
  "reasoningDefault": "off"
}

models.json (in openclaw.json providers.ollama.models):

{
  "id": "minimax-m2.7:cloud",
  "reasoning": false,
  ...
}

Observed Behavior

  1. Gateway logs show: agent model: ollama/minimax-m2.7:cloud (thinking=off, fast=off) - thinking is correctly set to off
  2. Model still outputs <thinking> blocks (or similar reasoning content)
  3. OpenClaw's reasoning-sanitizer strips these blocks
  4. When content becomes empty after stripping, OpenClaw inserts [assistant reasoning omitted] text
  5. This happens on every response, not just occasional turns

Root Cause Analysis

Based on OpenClaw source code (dist/reasoning-sanitizer-BA49xp2a.js):

// When content becomes empty after stripping reasoning parts:
record.content = nextContent.length > 0 ? nextContent : [{
    type: "text",
    text: OMITTED_ASSISTANT_REASONING_TEXT  // "[assistant reasoning omitted]"
}];

And from docs/reference/transcript-hygiene.md:

Anthropic / Minimax (Anthropic-compatible)

  • Thinking blocks with missing, empty, or blank replay signatures are stripped before provider conversion. If that empties an assistant turn, OpenClaw keeps turn shape with non-empty omitted-reasoning text.

The problem: Even with reasoningDefault: "off", Ollama models may still output thinking/reasoning blocks that get stripped, leaving empty content → triggering the [assistant reasoning omitted] placeholder.

Attempted Fixes (All Failed)

  1. reasoningDefault: "off" in agent.json - Confirmed thinking=off in logs
  2. reasoning: false in models.json for all Ollama models
  3. streaming: { mode: "off" } in openclaw.json - No effect
  4. Upgraded from v2026.5.27 to v2026.5.28 - Problem persists
  5. Tested with multiple Ollama models (kimi-k2.5:cloud, glm-5:cloud, minimax-m2.5:cloud) - All show same issue

Expected Behavior

When reasoningDefault: "off" is set, no thinking/reasoning blocks should be sent to or received from the model, and no [assistant reasoning omitted] placeholder should appear.

Additional Context

  • PR #87874 (inherit thinking for voice wake forwarding) relates to Ollama thinking issues and is pending proof
  • Issue #87641 (kimi-k2.6 multi-turn format error) was closed May 29, 2026
  • Issue #45010 (Invalid signature in thinking block) is older (March 2026) and related to Bedrock

Impact

  • Every response from Ollama models contains [assistant reasoning omitted]
  • Degrades user experience and clutters conversation history
  • Affects all Ollama-based models regardless of settings

Suggestion

The sanitizer should check if reasoningDefault: "off" is set and skip inserting the [assistant reasoning omitted] placeholder when the only content stripped was reasoning/thinking blocks from an off-mode model.

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 [Bug]: [assistant reasoning omitted] appears with reasoningDefault off on Ollama models