openclaw - 💡(How to fix) Fix Bug: MiMo models (anthropic-messages) fallback immediately - thinking block replay missing reasoning_content [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

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#81416Fetched 2026-05-14 03:32:27
View on GitHub
Comments
2
Participants
3
Timeline
4
Reactions
1
Author
Timeline (top)
commented ×2closed ×1cross-referenced ×1

When thinking: off, MiMo models still return a thinking block in tool_use responses (ignoring the non-standard thinking disable method). Gateway stores the thinking block without the signature/reasoning_content fields that MiMo expects on replay. On the next turn, MiMo rejects the request with:

400 {"error":{"code":"400","message":"Param Incorrect",
"param":"The reasoning_content in the thinking mode must be passed back to the API."}}

This triggers fallback to the backup model within 5 seconds of session start.

Error Message

400 {"error":{"code":"400","message":"Param Incorrect",

  • ❌ Without reasoning_content replay → 400 error

Root Cause

Root Cause (two parts)

Code Example

400 {"error":{"code":"400","message":"Param Incorrect",
"param":"The reasoning_content in the thinking mode must be passed back to the API."}}
RAW_BUFFERClick to expand / collapse

Bug: MiMo-V2.5-Pro falls back immediately due to thinking block replay issue

Environment

  • OpenClaw 2026.5.7 (eeef486)
  • Provider: xiaomicoding (custom) using anthropic-messages API
  • Base URL: https://token-plan-cn.xiaomimimo.com/anthropic
  • Model: mimo-v2.5-pro (primary), fallback deepseek-v4-pro
  • Thinking: off
  • Channel: openclaw-weixin

Summary

When thinking: off, MiMo models still return a thinking block in tool_use responses (ignoring the non-standard thinking disable method). Gateway stores the thinking block without the signature/reasoning_content fields that MiMo expects on replay. On the next turn, MiMo rejects the request with:

400 {"error":{"code":"400","message":"Param Incorrect",
"param":"The reasoning_content in the thinking mode must be passed back to the API."}}

This triggers fallback to the backup model within 5 seconds of session start.

Root Cause (two parts)

Part 1 — Gateway does not use the standard Anthropic "thinking": {"type": "disabled"} format when sending requests with thinking=off. MiMo ignores the non-standard method and still returns thinking blocks.

Part 2 — When replaying assistant turns that contain thinking blocks from MiMo, the gateway:

  1. Renames signaturethinkingSignature
  2. Does NOT preserve the reasoning_content field (MiMo requires this for replay)
  3. Only drops thinking blocks for models whose ID contains "claude" (buildUnownedProviderTransportReplayFallback in tool-result-middleware-e9V2iK5s.js line 130)

Affected Models

All MiMo models on the Anthropic Messages API:

  • mimo-v2.5-pro
  • mimo-v2.5
  • mimo-v2-pro
  • mimo-v2-omni

Same issue confirmed on the OpenAI-compatible endpoint as well — MiMo requires reasoning_content in assistant messages on replay.

Verification

Direct curl tests confirm:

  • ✅ MiMo API itself is healthy
  • ✅ Standard "thinking": {"type": "disabled"} correctly suppresses thinking blocks
  • ✅ Replay with reasoning_content included works correctly
  • ❌ Without reasoning_content replay → 400 error

Suggested Fix

  1. Use standard Anthropic "thinking": {"type": "disabled"} when thinking=off, so MiMo doesn't return thinking blocks at all
  2. OR: extend dropThinkingBlocks to all Anthropic-messages models (not just those with "claude" in the id)
  3. OR: preserve reasoning_content in the stored transcript for models that require it

Impact

Primary model becomes unusable for any conversation requiring tool calls, silently falling back to backup model. This affects every multi-turn interaction (which is most non-trivial conversations).

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: MiMo models (anthropic-messages) fallback immediately - thinking block replay missing reasoning_content [2 comments, 3 participants]