What happened?
Bug Description
When using MiMo models (e.g. mimo-v2.5-pro) via the xiaomi-token-plan provider,
a cold-start session that triggers tool calls (e.g. reading a codebase) immediately
fails with a 400 error on the second turn.
Error Message
Error: 400 {"error":{"code":"400","message":"Param Incorrect",
"param":"The reasoning_content in the thinking mode must be passed back to the API.",
"type":""}}
Root Cause
MiMo's thinking models return reasoning_content in assistant messages (similar to
Anthropic's thinking blocks). This field must be passed back in subsequent turns.
Pi's MiMo/xiaomi provider does not preserve reasoning_content when constructing
conversation history, causing the API to reject the request.
Workaround
Switch to a non-thinking model (mimo-v2-flash, mimo-v2-pro) to avoid the issue.
Environment
- pi version: 0.74
- Provider:
xiaomi-token-plan
- Model:
mimo-v2.5-pro
Steps to reproduce
- Configure
xiaomi-token-plan provider with a MiMo thinking model
- Start a new session (cold start)
- Ask pi to read/explore a codebase
- Pi triggers tool calls (read/bash), gets back
reasoning_content in the response
- Pi builds the next turn's messages without including
reasoning_content
- MiMo API returns 400
Expected behavior
No response
Version
No response
What happened?
Bug Description
When using MiMo models (e.g.
mimo-v2.5-pro) via thexiaomi-token-planprovider,a cold-start session that triggers tool calls (e.g. reading a codebase) immediately
fails with a 400 error on the second turn.
Error Message
Error: 400 {"error":{"code":"400","message":"Param Incorrect",
"param":"The reasoning_content in the thinking mode must be passed back to the API.",
"type":""}}
Root Cause
MiMo's thinking models return
reasoning_contentin assistant messages (similar toAnthropic's
thinkingblocks). This field must be passed back in subsequent turns.Pi's MiMo/xiaomi provider does not preserve
reasoning_contentwhen constructingconversation history, causing the API to reject the request.
Workaround
Switch to a non-thinking model (
mimo-v2-flash,mimo-v2-pro) to avoid the issue.Environment
xiaomi-token-planmimo-v2.5-proSteps to reproduce
xiaomi-token-planprovider with a MiMo thinking modelreasoning_contentin the responsereasoning_contentExpected behavior
No response
Version
No response