GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

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 #26762

New issue
Copy link
New issue
Copy link
Closed
#34826
Closed
Cerebras zai-glm-4.7 fails on follow-up turn with reasoning_content#26762
#34826
Copy link
Assignees
jlongster

Description

@ryanl-cerebras
ryanl-cerebras
opened on May 10, 2026
Issue body actions

Description

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

  1. Configure a Cerebras provider and use cerebras/zai-glm-4.7

  2. Run from a clean directory, for example mkdir inferencex && cd inferencex

  3. Run this prompt:

    build an frontend for inferencex performance benchmark

  4. Let the run continue into tool use and the next assistant turn

  5. Observe the error:

    messages.2.assistant.reasoning_content: property 'messages.2.assistant.reasoning_content' is unsupported

Screenshot and/or share link

Image

Operating System

macOS

Terminal

iTerm2

Reacted by Savva, Sylwester Lachiewicz and Evan Taylor Yates

Activity

  1. github-actions
    assigned
    jlongster
    on May 10, 2026
  2. github-actions commented on May 10, 2026

    @github-actions
    github-actionsBot
    on May 10, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • reasoning_content stripped from assistant messages on replay, causing KV cache invalidation on local inference #19081: reasoning_content stripped from assistant messages on replay — same root cause (thinking blocks not preserved in conversation history on subsequent turns)
    • thinking is enabled but reasoning_content is missing in assistant tool call message at index ... #25758: reasoning_content missing in assistant tool call message at index N — same symptom on follow-up turns with thinking-enabled models
    • DeepSeek thinking mode: reasoning_content not passed back for tool call turns, causing 400 errors #24722: DeepSeek reasoning_content not passed back for tool call turns, causing 400 errors

    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.

  3. WanderWang commented on May 11, 2026

    @WanderWang
    WanderWang
    on May 11, 2026
    More actions

    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.

  4. ryanl-cerebras commented on May 11, 2026

    @ryanl-cerebras
    ryanl-cerebras
    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.

  5. ryanl-cerebras commented on May 12, 2026

    @ryanl-cerebras
    ryanl-cerebras
    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?

  6. ryanl-cerebras commented on May 12, 2026

    @ryanl-cerebras
    ryanl-cerebras
    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?

  7. ryanl-cerebras commented on May 12, 2026

    @ryanl-cerebras
    ryanl-cerebras
    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?

  8. WanderWang commented on May 12, 2026

    @WanderWang
    WanderWang
    on May 12, 2026
    More actions

    @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.

  9. real-limitless commented on Jun 10, 2026

    @real-limitless
    real-limitless
    on Jun 10, 2026
    More actions

    Is there any updates on this?

    Reacted by Michael Paciullo
  10. slachiewicz commented on Jun 11, 2026

    @slachiewicz
    slachiewicz
    on Jun 11, 2026
    More actions

    Really waiting for this to be fixed

  11. ryanl-cerebras commented on Jun 11, 2026

    @ryanl-cerebras
    ryanl-cerebras
    on Jun 11, 2026
    ContributorAuthor
    More actions

    @jlongster any chance we can get a review here?

  12. EricPedley commented on Jun 15, 2026

    @EricPedley
    EricPedley
    on Jun 15, 2026
    More actions

    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.

  13. rekram1-node
    closed this as completedin #34826on Jul 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @jlongster
    jlongster

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.