fix: add Xiaomi MiMo thinking mode reasoning_content echo-back#24810
Open
QQ-sys-ops wants to merge 2 commits into
Open
fix: add Xiaomi MiMo thinking mode reasoning_content echo-back#24810QQ-sys-ops wants to merge 2 commits into
QQ-sys-ops wants to merge 2 commits into
Conversation
Xiaomi MiMo thinking mode requires reasoning_content on every assistant
tool-call turn. Without it, replaying the persisted message causes
HTTP 400 ("The reasoning_content in the thinking mode must be passed
back to the API").
This is the same pattern already fixed for DeepSeek (NousResearch#15250, NousResearch#17341)
and Kimi/Moonshot (NousResearch#17400), but Xiaomi was missed.
Refs: NousResearch#15250, NousResearch#17400, NousResearch#17341
Collaborator
This was referenced May 13, 2026
…MiMo /anthropic endpoint Xiaomi MiMo's /anthropic endpoint requires thinking blocks (synthesized from reasoning_content) to round-trip on subsequent API requests. Without them, the generic third-party path strips all thinking blocks, causing HTTP 400: 'The reasoning_content in the thinking mode must be passed back to the API.' Add _is_xiaomi_anthropic_endpoint() detection and include it in the _preserve_unsigned_thinking check alongside Kimi and DeepSeek. Refs: xiaomimimo.com/anthropic endpoint, same pattern as NousResearch#13848 (Kimi) and NousResearch#16748 (DeepSeek).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary