GeezerVison is showing github.com — DeepSeek V4 Pro (OpenRouter) reasoning_content error - v1.14.27 · Issue #24569 · anomalyco/opencode
DeepSeek V4 Pro (OpenRouter) reasoning_content error - v1.14.27 #24569Labels bugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff) DescriptionDescription
[DeepSeek] The reasoning_content in the thinking mode must be passed back to the API.
OpenCode version
v1.14.27 (latest)
Plugins
No response
OpenCode version
V1.14.27
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Debian GNU/Linux 13 (trixie) (6.12.74+deb13+1-amd64)
Terminal
No response Reacted by d770, Audrius Sagadinas, syafinazri, Yuqiu, RedAtman, atomlab, Terry Wang, Max, Meher Hendi, art-n and 2 more Activityadded coreAnything pertaining to core functionality of the application (opencode server stuff) on Apr 27, 2026github-actions commented on Apr 27, 2026 This issue might be a duplicate of several existing issues reporting the same reasoning_content error with DeepSeek thinking mode. Please check:
If your issue is the same, please consider adding a reaction or comment to one of the above instead of opening a new report. rekram1-node commented on Apr 27, 2026 @077dwei please please provide a session demonstrating it:
opencode export > session.json
RUN THIS IN YOUR TERMINAL DO NOT USE /export
And then send me the session dump. Meepoljdx commented on Apr 27, 2026 077dwei commented on Apr 27, 2026 rekram1-node commented on Apr 27, 2026 @Meepoljdx you are using something called:
"providerID": "deepseek-plat",
I need to see your provider config it's prolly missing interleaved settings broaz27 commented on Apr 27, 2026 I can't reproduce the issue anymore, but only in new sessions, im on deepseekv4 pro, provided by deepseek on openrouter, my interleaved settings are on their default "reasoning_content" rekram1-node commented on Apr 27, 2026 @077dwei I can't have a trimmed session, I need your actual session otherwise it provides basically 0 value. If you need it secret use --sanitize
The session you sent has 0 assistant messages so the error would be impossible 077dwei commented on Apr 27, 2026 ngkhanhlinh2k4 commented on Apr 27, 2026 me too, still error like that rekram1-node commented on Apr 27, 2026 yujf commented on Apr 27, 2026 372572571 commented on Apr 27, 2026 Actually, as long as you use the OMO plugin's Plan Builder with the DeepSeek V4 model to start planning a feature, when your context usage reaches about 10%, this problem will inevitably be triggered — it feels like something has been cleared. rekram1-node commented on Apr 27, 2026 For anyone using custom providers do this:
"provider": {
"custom-deepseek": {
"models": {
"deepseek-v4-pro": {
"interleaved": {
"field": "reasoning_content",
},
},
},
},
},
I'll configure stuff to default it to set this for deepseek models but for now you need to follow this as mentioned in many issues and many prs (@yujf @Meepoljdx) Reacted by d770, Kay, yujf and EwardWang Reacted by Kay yujf commented on Apr 28, 2026 hearkenmx commented on Apr 28, 2026 Same issue here. Environment details:
- opencode v1.14.28
- Provider: @ai-sdk/openai-compatible with custom endpoint (myeth)
- Model: deepseek-v4-pro
- Error: AI_APICallError: The
reasoning_content in the thinking mode must be passed back to the API.
Occurs consistently on the 2nd+ turn. Workaround: setting "reasoning": false in opencode.json model config. rekram1-node commented on Apr 28, 2026 @hearkenmx refer to what I said above, or provide your config jukefr commented on Apr 28, 2026 still having issues with this even after doing what you suggested with interleaved....
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"*": "allow",
"doom_loop": "ask",
"external_directory": "ask",
"read": {
"*": "allow",
"*.env": "deny",
"*.env.*": "deny",
"*.env.example": "allow"
},
"bash": {
"*": "allow",
"rm -rf *": "ask",
"git push --force*": "deny",
"git push -f *": "deny",
"DROP TABLE*": "deny",
"DROP DATABASE*": "deny"
}
},
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"enabled": true
},
"engram": {
"type": "local",
"command": [
"engram",
"mcp",
"--tools=agent"
]
}
},
"snapshot": false,
"autoupdate": "notify",
"share": "manual",
"provider": {
"openrouter": {
"models": {
"deepseek/deepseek-v4-flash": {
"interleaved": {
"field": "reasoning_content"
}
}
}
}
}
}
the first like 5 requests seem to go fine but then the
[DeepSeek] The `reasoning_content` in the thinking mode must be passed back to the API.
appears out of nowhere
it happened right after a todowrite tool call if that helps ?
and also the session appear to be unrecoverable from this point onwards no matter what prompt you pass to deepseek
and im running latest release also 1.14.28 i-blis commented on Apr 28, 2026 Issue persists even with
"provider": {
"openrouter": {
"models": {
"deepseek-v4-flash": {
"interleaved": {
"field": "reasoning_content",
},
},
},
},
},
Running 1.14.28, session posted above. rekram1-node commented on Apr 28, 2026 Yeah it's a bug in openrouter sdk ill get to it DiegoMagdaleno commented on Apr 28, 2026 Having the same issue with OpenCode Go, I reproduced it on a random task.
session.json rekram1-node commented on Apr 28, 2026 rekram1-node commented on Apr 28, 2026 Okay OpenRouter said they are merging a fix on their end
Note to those in this thread this is an issue about OPENROUTER so if you are having issues with a specific provider check:
- are you on latest
- are you using openrouter? If not open a new issue or comment on separate one
- are you using custom provider? If so be sure to set the interleaved reasoning fields
rekram1-node commented on Apr 28, 2026 Okay their change rolled out to their api, I tested and was unable to reproduce issue after, will close this but continue monitoring hearkenmx commented on Apr 29, 2026 new-api based router has the same issue, in case anyone use that infra, I think they already aware of it.
QuantumNous/new-api#4408 0x7CFE commented on May 27, 2026 Experienced the same issue today on OpenRouter. Everything just broke. OTOH, free tier model from Zen worked flawlessly.
Tried switching/banning specific providers using OpenRouter guardrails, got this or just 400.
P.S.: Also usage price just exploded. Don't sure if it's related. Looked almost like queries weren't cached at all. Reacted by Peter Mills, Mikhail, Nifury and Quentin Gillet
MetadataMetadatabugSomething isn't workingcoreAnything pertaining to core functionality of the application (opencode server stuff) DevelopmentNo branches or pull requestsIssue actions
|