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
{{ message }}
Repository navigation
thinking is enabled but reasoning_content is missing in assistant tool call message at index ... #25758
using 1.14.33, TUI, with opencode go, kimi-2.6 and deepseek-v4-pro,
kimi
Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider: Provider returned error\",\"code\":400,\"metadata\":{\"raw\":\"{\\\"error\\\":{\\\"message\\\":\\\"thinking is enabled but reasoning_content is missing in assistant tool call message at index 13\\\",\\\"type\\\":\\\"invalid_request_error\\\"}}\",\"provider_name\":\"Moonshot AI\",\"is_byok\":true}},\"user_id\":\"user_2z4xm5LomaIHfsnVqMhFsWrVrGY\"}
deepseek
Server: cloudflare\n\nBody:\n{\"error\":{\"message\":\"Error from provider (DeepSeek): The `reasoning_content` in the thinking mode must be passed back to the API.\",\"type\":\"invalid_request_error\",\"param\":null,\"code\":\"invalid_request_error\"}}\n"
"I found that disabling OpenCode's native compaction and removing the @cortexkit/opencode-magic-context plugin completely resolves the reasoning_content is missing error for the Kimi k2.6 model, which strongly suggests the context pruning logic is improperly stripping reasoning fields from historical tool-call messages."
"I found that disabling OpenCode's native compaction and removing the @cortexkit/opencode-magic-context plugin completely resolves the reasoning_content is missing error for the Kimi k2.6 model, which strongly suggests the context pruning logic is improperly stripping reasoning fields from historical tool-call messages."
+1 on this — seeing the same with Kimi K2.6 on 1.14.48. Multi-turn runs with tool calls eventually hit the "thinking is enabled but reasoning_content is missing" error and then it loops forever. No workaround I have tried (disabling compaction, tweaking temperature, etc.) fully fixes it. This is basically blocking me from using Kimi with OpenCode at this point. Would love to see this prioritized — happy to help test any fix.
@rekram1-node@thdxr — just saw that @ryanl-cerebras opened #26763 for the Cerebras-specific fix on the same reasoning_content replay problem. Any chance a similar provider-specific fix could be done for the Kimi/Moonshot path? This has been blocking Kimi users for weeks and there are already a few PRs in the queue (#24289, #25011, #25066) that try to address it but have not been reviewed yet. Happy to help test whatever approach the team prefers.
Activity
github-actions commentedon May 4, 2026
This issue might be a duplicate of existing issues. Please check:
reasoning_contentmissing from assistant tool call messages when thinking mode is enabled, causing 400 errors. The issue you reported appears to be the same underlying bug affecting Kimi models in addition to DeepSeek.jc01rho commentedon May 4, 2026
just read #24442, With using custom provider, with options.interleaved.field : "reasoning_content" , not a openroter, this is opencode go
rekram1-node commentedon May 4, 2026
Send me a session plz:
opencode export > session.jsonThis is a command to run this is NOT /export.
jc01rho commentedon May 5, 2026
I cannot find specific session, cuz too many subagent session are listed :(
anyway I've trying workaround refer from https://github.com/router-for-me/CLIProxyAPI/blob/da6c599efd8da34d23d3668371fbb5ac70399e9d/internal/runtime/executor/kimi_executor.go#L326 , in testing
jc01rho commentedon May 5, 2026
after applied this, works good so far.
Suknna commentedon May 5, 2026
I am encountering the exact same API error when using the
kimi-for-coding(k2p6) model.It seems the OpenCode adapter is dropping the
reasoning_contentfield from previous tool call messages when constructing the payload for the Kimi API.Here is the error context exported from my session:
session.json
Suknna commentedon May 5, 2026
@rekram1-node
Suknna commentedon May 5, 2026
"I found that disabling OpenCode's native compaction and removing the @cortexkit/opencode-magic-context plugin completely resolves the reasoning_content is missing error for the Kimi k2.6 model, which strongly suggests the context pruning logic is improperly stripping reasoning fields from historical tool-call messages."
ualtinok commentedon May 6, 2026
Magic-context issue fixed in 0.17.1
https://github.com/cortexkit/magic-context/releases/tag/v0.17.1
WanderWang commentedon May 11, 2026
+1 on this — seeing the same with Kimi K2.6 on 1.14.48. Multi-turn runs with tool calls eventually hit the "thinking is enabled but reasoning_content is missing" error and then it loops forever. No workaround I have tried (disabling compaction, tweaking temperature, etc.) fully fixes it. This is basically blocking me from using Kimi with OpenCode at this point. Would love to see this prioritized — happy to help test any fix.
WanderWang commentedon May 11, 2026
@rekram1-node @thdxr — just saw that @ryanl-cerebras opened #26763 for the Cerebras-specific fix on the same reasoning_content replay problem. Any chance a similar provider-specific fix could be done for the Kimi/Moonshot path? This has been blocking Kimi users for weeks and there are already a few PRs in the queue (#24289, #25011, #25066) that try to address it but have not been reviewed yet. Happy to help test whatever approach the team prefers.
karneaud commentedon May 18, 2026
+1 for Provider Groq Running compound compound mini models
Frankstar commentedon Jun 11, 2026
still a problem with kimi K2.6 on 1.17.3
github-actions commentedon Aug 11, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.