You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
stream disconnected before completion: Provider error 400: {"error":{"message":"The reasoning_content in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}
Thanks for the report. This is very likely the DeepSeek V4 thinking-mode history rule surfacing during a tool/subagent continuation.
DeepSeek V4 thinking mode returns reasoning_content on assistant messages and expects that field to be sent back on later multi-turn/tool-call requests. opencodex already had model-scoped support for replaying reasoning_content, but the built-in DeepSeek preset did not mark the V4 thinking models for that behavior, so a continuation turn could drop the field and DeepSeek would reject the request with the 400 you saw.
adds deepseek-v4-pro / deepseek-v4-flash to the DeepSeek preset
marks those V4 thinking models for reasoning_content history replay
maps Codex xhigh to DeepSeek max
keeps the older deepseek-reasoner behavior unchanged
This should cover the subagent/tool-call path because the test now verifies an assistant message carrying both reasoning_content and tool_calls is replayed correctly.
Activity
ervin3 commentedon Jul 2, 2026
i think it might be subagents setup.
Ingwannu commentedon Jul 3, 2026
Thanks for the report. This is very likely the DeepSeek V4 thinking-mode history rule surfacing during a tool/subagent continuation.
DeepSeek V4 thinking mode returns
reasoning_contenton assistant messages and expects that field to be sent back on later multi-turn/tool-call requests. opencodex already had model-scoped support for replayingreasoning_content, but the built-in DeepSeek preset did not mark the V4 thinking models for that behavior, so a continuation turn could drop the field and DeepSeek would reject the request with the 400 you saw.I opened #61 to address this. The PR:
deepseek-v4-pro/deepseek-v4-flashto the DeepSeek presetreasoning_contenthistory replayxhighto DeepSeekmaxdeepseek-reasonerbehavior unchangedThis should cover the subagent/tool-call path because the test now verifies an assistant message carrying both
reasoning_contentandtool_callsis replayed correctly.Ingwannu commentedon Jul 3, 2026
Merged the fix into dev via #61. Closing this for now; please reopen or comment if the DeepSeek reconnect error still reproduces after updating.