Skip to content

[Bug] Xiaomi MiMo reasoning_content passthrough missing for multi-turn tool calls #81419

@lovelefeng-glitch

Description

@lovelefeng-glitch

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

  1. Set agent model to xiaomi-coding/mimo-v2.5 with thinking enabled.
  2. Have a multi-turn conversation where the assistant makes tool calls.
  3. 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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions