GeezerVison is showing github.com — Cerebras zai-glm-4.7 fails on follow-up turn with reasoning_content · Issue #26762 · anomalyco/opencode
Cerebras zai-glm-4.7 fails on follow-up turn with reasoning_content #26762DescriptionDescription
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 Activitygithub-actions commented on May 10, 2026 This issue might be a duplicate of existing issues. Please check:
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. WanderWang commented on 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 commented on May 11, 2026 ContributorAuthor More actions 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. ryanl-cerebras commented on May 12, 2026 ContributorAuthor More actions 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 commented on May 12, 2026 ContributorAuthor More actions 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 commented on May 12, 2026 ContributorAuthor More actions 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? WanderWang commented on 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 commented on Jun 10, 2026 Is there any updates on this? Reacted by Michael Paciullo slachiewicz commented on Jun 11, 2026 Really waiting for this to be fixed ryanl-cerebras commented on Jun 11, 2026 ContributorAuthor More actions EricPedley commented on 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.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|