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
[Bug] JSON Parse Error with Zhipu GLM-4.7: Stream chunks are concatenated incorrectly #7692
Description: I encountered a JSON Parse Error when using the Zhipu GLM-4.7 model. It seems like the stream parser fails to handle the boundary between two data chunks correctly, leading to invalid JSON.
The Error: The error message shows that the end of the previous message and the start of the next data: chunk are stuck together without proper separation.
I think this is the plugin failign to send back valid stuff when proxied through it perhaps?我怀疑这可能是插件在通过代理时无法返回有效数据导致的?
Thanks for the response!
To help you narrow down the issue, I'd like to clarify my setup details. I think this might be a specific parsing issue rather than a general network failure:
Custom API Key: I am using my own API Key (configured in the zhipu provider), NOT the free built-in service provided by OpenCode. So the request should be going directly from my client to Zhipu.
Proxy Environment: I am indeed using a local network proxy (VPN).
Control Group (Crucial): Under the exact same proxy and custom API key settings, the Minimax model works perfectly fine. The connection is stable and the response is parsed correctly.
The JSON Parse Error only happens with GLM-4.7. This makes me suspect that the issue is specific to how the plugin handles GLM-4.7's data stream (perhaps the plugin isn't handling concatenated JSON chunks/sticky packets correctly), while Minimax's stream format is handled fine.
(P.S. English is not my first language, so please excuse any unnatural phrasing.
Currently, I am using version 1.1.13, and when using it with Oh My Opencode and connecting via /connect with OpenAI OAuth, the GPT series models frequently encounter the following situation.
After the version update, I uninstalled the opencode-openai-codex-auth plugin and switched to using /connect for OAuth authentication, which should not involve a proxy in between.
Thank you for your patient reply.
Based on my local environment, the system proxy on my machine: not enabled. scutil --proxy is empty; and I am directly connecting via /connect Oauth, there should be no remote reverse proxy.
chindris-mihai-alexandru commented on Jan 27, 2026
Activity
github-actions commentedon Jan 10, 2026
This issue might be a duplicate of existing issues. Please check:
Expected '}')Feel free to ignore if none of these address your specific case.
rekram1-node commentedon Jan 11, 2026
I think this is the plugin failign to send back valid stuff when proxied through it perhaps?
yangshenlong commentedon Jan 11, 2026
Thanks for the response!
To help you narrow down the issue, I'd like to clarify my setup details. I think this might be a specific parsing issue rather than a general network failure:
zhipuprovider), NOT the free built-in service provided by OpenCode. So the request should be going directly from my client to Zhipu.The
JSON Parse Erroronly happens with GLM-4.7. This makes me suspect that the issue is specific to how the plugin handles GLM-4.7's data stream (perhaps the plugin isn't handling concatenated JSON chunks/sticky packets correctly), while Minimax's stream format is handled fine.(P.S. English is not my first language, so please excuse any unnatural phrasing.
DarkPocket commentedon Jan 12, 2026
尝试用最新版本1.1.13再试试 ,
1.0.152是旧版本
rekram1-node commentedon Jan 12, 2026
Oh guys make sure you are on the latest version I think that's the issue here
APE-147 commentedon Jan 12, 2026
Currently, I am using version 1.1.13, and when using it with Oh My Opencode and connecting via /connect with OpenAI OAuth, the GPT series models frequently encounter the following situation.
rekram1-node commentedon Jan 12, 2026
Are you running through some proxy or something that isnt handling streams correctly?
APE-147 commentedon Jan 13, 2026
After the version update, I uninstalled the opencode-openai-codex-auth plugin and switched to using /connect for OAuth authentication, which should not involve a proxy in between.
rekram1-node commentedon Jan 14, 2026
I meant network proxies
APE-147 commentedon Jan 15, 2026
Thank you for your patient reply.
Based on my local environment, the system proxy on my machine: not enabled. scutil --proxy is empty; and I am directly connecting via /connect Oauth, there should be no remote reverse proxy.
chindris-mihai-alexandru commentedon Jan 27, 2026
I'm also experiencing this exact issue with Devstral-2-123B-Instruct-2512 via NVIDIA NIM provider in OpenCode v1.1.36
Error message:
Observations:
This suggests the stream chunk concatenation issue affects multiple providers (Z.AI GLM-4.7, NVIDIA NIM Devstral-2), not just one.
github-actions commentedon Mar 30, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.
mshareefkdy commentedon Jun 28, 2026
Is there really a fix for this?