Describe the bug
OpenClaw returns 400 when using Xiaomi MiMo models (mimo-v2.5, mimo-v2.5-pro) with thinking mode enabled and multi-turn tool calls. The model requires reasoning_content field on assistant messages that contain tool_calls, but OpenClaw does not include it.
To Reproduce
- Set agent model to
xiaomi-coding/mimo-v2.5 with thinking enabled.
- Have a multi-turn conversation where the assistant makes tool calls.
- Subsequent user turns will fail with
400 Param Incorrect.
Expected behavior
All assistant messages with tool_calls should include the reasoning_content field (even if empty) when sending request to MiMo API.
Root cause
In @earendil-works/pi-ai detectCompat(), requiresReasoningContentOnAssistantMessages is only true for DeepSeek. MiMo uses the same protocol (thinking format deepseek) but is not recognized.
Possible solution
Add MiMo detection in detectCompat (match provider xiaomi / xiaomi-coding or baseUrl xiaomimimo.com) and set requiresReasoningContentOnAssistantMessages and thinkingFormat accordingly.
Environment
- OpenClaw version: 2026.5.12-beta.4
- Model: mimo-v2.5, mimo-v2.5-pro
- Platform: Windows / Node 24+
References:
Describe the bug
OpenClaw returns 400 when using Xiaomi MiMo models (mimo-v2.5, mimo-v2.5-pro) with thinking mode enabled and multi-turn tool calls. The model requires
reasoning_contentfield on assistant messages that contain tool_calls, but OpenClaw does not include it.To Reproduce
xiaomi-coding/mimo-v2.5with thinking enabled.400 Param Incorrect.Expected behavior
All assistant messages with tool_calls should include the
reasoning_contentfield (even if empty) when sending request to MiMo API.Root cause
In
@earendil-works/pi-aidetectCompat(),requiresReasoningContentOnAssistantMessagesis only true for DeepSeek. MiMo uses the same protocol (thinking formatdeepseek) but is not recognized.Possible solution
Add MiMo detection in
detectCompat(match providerxiaomi/xiaomi-codingor baseUrlxiaomimimo.com) and setrequiresReasoningContentOnAssistantMessagesandthinkingFormataccordingly.Environment
References: