[BUG] Parsing Issue on GLM-4.7 #7664

Open
opened 2026-02-16 18:07:52 -05:00 by yindo · 2 comments
Owner

Originally created by @LorenzoNava99 on GitHub (Jan 26, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

I don't really understand if this is an issue with the model itself or an issue with the opencode parsing with GLM-4.7, but anyways it could be more robust to also accomodate these edge cases.

Sometimes it simply gaves up after some tool tags:

Image

Then the problem keeps going for every new prompt until I rollback a message by clicking it, also I can't understand why it doesn't do so with /timeline, the fix only works with the mouse click and it doesn't need to be a message previous to the problem, you just need to rollback with mouse click on a previous conversation and it gets back in business. That's also why I think it is an opencode issue and not GLM-4.7.

All testing were conducted on GLM-4.7 through the API on a GLM Code Plan.

Plugins

None

OpenCode version

v1.1.36

Steps to reproduce

  1. Wait for it to happen
  2. Try sending more messages
  3. More parsing errors
  4. Click on previous chat (no /timeline) and rollback
  5. It gets back in business

Screenshot and/or share link

No response

Operating System

macOS Tahoe 26.0.1 (25A362)

Terminal

Apple's Terminal

Originally created by @LorenzoNava99 on GitHub (Jan 26, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description I don't really understand if this is an issue with the model itself or an issue with the opencode parsing with GLM-4.7, but anyways it could be more robust to also accomodate these edge cases. Sometimes it simply gaves up after some tool tags: <img width="918" height="291" alt="Image" src="https://github.com/user-attachments/assets/0912eda8-f31f-4537-8bfe-eddaa457bb98" /> Then the problem keeps going for every new prompt until I rollback a message by clicking it, also I can't understand why it doesn't do so with /timeline, the fix only works with the mouse click and it doesn't need to be a message previous to the problem, you just need to rollback with mouse click on a previous conversation and it gets back in business. That's also why I think it is an opencode issue and not GLM-4.7. All testing were conducted on GLM-4.7 through the API on a GLM Code Plan. ### Plugins None ### OpenCode version v1.1.36 ### Steps to reproduce 1. Wait for it to happen 2. Try sending more messages 3. More parsing errors 4. Click on previous chat (no /timeline) and rollback 5. It gets back in business ### Screenshot and/or share link _No response_ ### Operating System macOS Tahoe 26.0.1 (25A362) ### Terminal Apple's Terminal
yindo added the bug label 2026-02-16 18:07:52 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 26, 2026):

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

  • #8102: 🐛 Bug Report: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7) - Similar JSON parsing failures with GLM-4.7 when using tool tags
  • #7779: GLM 4.7 thinking process not properly formatted - Related to GLM-4.7 parsing issues with reasoning content
  • #8431: GLM 4.7 AI_JSONParseError - Another instance of JSON parsing failures with GLM-4.7
  • #6708: GLM 4.7 on Zai coding plan puts tool calls inside the thinking/reasoning tag - Tool call parsing issues specific to GLM-4.7

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 26, 2026): This issue might be a duplicate of existing issues. Please check: - #8102: 🐛 Bug Report: MCP Tool JSON Parsing Errors on OpenCode (GLM-4.7) - Similar JSON parsing failures with GLM-4.7 when using tool tags - #7779: GLM 4.7 thinking process not properly formatted - Related to GLM-4.7 parsing issues with reasoning content - #8431: GLM 4.7 AI_JSONParseError - Another instance of JSON parsing failures with GLM-4.7 - #6708: GLM 4.7 on Zai coding plan puts tool calls inside the thinking/reasoning tag - Tool call parsing issues specific to GLM-4.7 Feel free to ignore if none of these address your specific case.
Author
Owner

@bi-kai commented on GitHub (Jan 27, 2026):

same issue, mark & watch.

@bi-kai commented on GitHub (Jan 27, 2026): same issue, mark & watch.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#7664