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
Cerebras zai-glm-4.7 fails on follow-up turn with reasoning_content #26762
Using cerebras/zai-glm-4.7 on newer OpenCode versions, multi-turn runs that include reasoning and tool calls can fail on a follow-up assistant turn with:
messages.2.assistant.reasoning_content: property 'messages.2.assistant.reasoning_content' is unsupported
I can reproduce this on opencode 1.14.41.
The same prompt worked for me on opencode 1.1.4, and it also works on a local patched build from current dev, so this looks like a regression in how prior assistant reasoning is replayed for Cerebras models.
Plugins
None
OpenCode version
1.14.41
Steps to reproduce
Configure a Cerebras provider and use cerebras/zai-glm-4.7
Run from a clean directory, for example mkdir inferencex && cd inferencex
Run this prompt:
build an frontend for inferencex performance benchmark
Let the run continue into tool use and the next assistant turn
Observe the error:
messages.2.assistant.reasoning_content: property 'messages.2.assistant.reasoning_content' is unsupported
Screenshot and/or share link
Operating System
macOS
Terminal
iTerm2
Reacted by Savva, Sylwester Lachiewicz and Evan Taylor Yates
If your issue is the same underlying problem, please consider adding context there rather than opening a new report. If it is specific to the Cerebras provider or a distinct regression, feel free to clarify.
Same root cause here with Kimi K2.6 — multi-turn tool calls fail with "thinking is enabled but reasoning_content is missing" and then it loops forever. This has been happening for weeks across multiple versions (currently on 1.14.48). Tried disabling compaction and a few other workarounds but nothing fully solves it. Would really appreciate if this could get some attention, it is making OpenCode basically unusable with Kimi for me.
Thanks, this does look related to the broader reasoning_content replay issues in #19081, #25758, and #24722.
In this case though, the Cerebras path is a little different from DeepSeek / Kimi. The failing repro here is cerebras/zai-glm-4.7, where follow-up turns break because prior assistant reasoning is being replayed in a shape that Cerebras does not accept. The PR I opened is a narrow provider-specific fix for that path:
#26763
So I think this issue is best understood as part of the same general replay/history problem, but with a Cerebras-specific fix rather than a full cross-provider solution.
I added explicit regression coverage for the hosted and reasoning replay path in #26763 as well.\n\n@WanderWang if you have a chance, could you try that PR branch with your Kimi K2.6 setup and let me know whether it fixes the follow-up turn failure on your side?
I added explicit regression coverage for the hosted Kimi K2.6 and GLM 4.7 reasoning replay path in #26763 as well.
@WanderWang if you have a chance, could you try that PR branch with your Kimi K2.6 setup and let me know whether it fixes the follow-up turn failure on your side?
Small update here: I expanded #26763 beyond the Cerebras-specific path and patched the OpenAI-compatible fallback that defaults reasoning_content replay for the same issue family.
That now explicitly covers Kimi and the GLM reasoning models we discussed, including Kimi K2.5, Kimi K2.6, Kimi K2 Thinking, GLM 5, GLM 5.1, and GLM 5V Turbo, with added provider-level tests.
@WanderWang if you have a chance, could you try the PR branch with your Kimi K2.6 setup and let me know if it fixes the follow-up turn failure on your side?
Activity
github-actions commentedon May 10, 2026
This issue might be a duplicate of existing issues. Please check:
reasoning_contentstripped from assistant messages on replay — same root cause (thinking blocks not preserved in conversation history on subsequent turns)reasoning_contentmissing in assistant tool call message at index N — same symptom on follow-up turns with thinking-enabled modelsreasoning_contentnot passed back for tool call turns, causing 400 errorsIf your issue is the same underlying problem, please consider adding context there rather than opening a new report. If it is specific to the Cerebras provider or a distinct regression, feel free to clarify.
WanderWang commentedon May 11, 2026
Same root cause here with Kimi K2.6 — multi-turn tool calls fail with "thinking is enabled but reasoning_content is missing" and then it loops forever. This has been happening for weeks across multiple versions (currently on 1.14.48). Tried disabling compaction and a few other workarounds but nothing fully solves it. Would really appreciate if this could get some attention, it is making OpenCode basically unusable with Kimi for me.
ryanl-cerebras commentedon May 11, 2026
Thanks, this does look related to the broader
reasoning_contentreplay issues in#19081,#25758, and#24722.In this case though, the Cerebras path is a little different from DeepSeek / Kimi. The failing repro here is
cerebras/zai-glm-4.7, where follow-up turns break because prior assistant reasoning is being replayed in a shape that Cerebras does not accept. The PR I opened is a narrow provider-specific fix for that path:#26763So I think this issue is best understood as part of the same general replay/history problem, but with a Cerebras-specific fix rather than a full cross-provider solution.
ryanl-cerebras commentedon May 12, 2026
I added explicit regression coverage for the hosted and reasoning replay path in #26763 as well.\n\n@WanderWang if you have a chance, could you try that PR branch with your Kimi K2.6 setup and let me know whether it fixes the follow-up turn failure on your side?
ryanl-cerebras commentedon May 12, 2026
I added explicit regression coverage for the hosted Kimi K2.6 and GLM 4.7 reasoning replay path in #26763 as well.
@WanderWang if you have a chance, could you try that PR branch with your Kimi K2.6 setup and let me know whether it fixes the follow-up turn failure on your side?
ryanl-cerebras commentedon May 12, 2026
Small update here: I expanded #26763 beyond the Cerebras-specific path and patched the OpenAI-compatible fallback that defaults
reasoning_contentreplay for the same issue family.That now explicitly covers Kimi and the GLM reasoning models we discussed, including Kimi K2.5, Kimi K2.6, Kimi K2 Thinking, GLM 5, GLM 5.1, and GLM 5V Turbo, with added provider-level tests.
@WanderWang if you have a chance, could you try the PR branch with your Kimi K2.6 setup and let me know if it fixes the follow-up turn failure on your side?
WanderWang commentedon May 12, 2026
@ryanl-cerebras thanks for the fix! Happy to test this with my Kimi K2.6 setup.
I'll run tests tomorrow between 02:00–10:00 UTC (10:00–18:00 Beijing time) and report back by 10:00 UTC.
real-limitless commentedon Jun 10, 2026
Is there any updates on this?
slachiewicz commentedon Jun 11, 2026
Really waiting for this to be fixed
ryanl-cerebras commentedon Jun 11, 2026
@jlongster any chance we can get a review here?
EricPedley commentedon Jun 15, 2026
Just ran into this issue and tested the #26763 fork and it does indeed fix the problem for me using GLM 4.7 on the cerebras API.