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
Z.ai subscription API fails to work in opencode but works in other agents #8515
I have a Z.Ai subscription and am using the same API KEY in opencode and other agents.
About an hour ago the Z.Ai integration stopped working in opencode.
The same API Key and Z.Ai model was used successfully in other AI Agents clis or IDE integrations while the opencode agent continued to fail with this error.
Plugins
No response
OpenCode version
1.1.20
Steps to reproduce
Setup an API KEY from Z.Ai subscription using GLM 4.7
Attempt to use it.
Inspect results.
Expected: AI requests work
Current: AI requests fail with the attached screenshot.
IMPORTANT: The same account/api key and model work fine in other AI Agents or IDE integrations, while the opencode one fails.
This issue might be a duplicate of existing issues. Please check:
Z.ai coding model connection issue #4349: Z.ai coding model connection issue - Same Z.ai API authentication problem where the API key works with curl but fails with timeout in opencode (glm-4.6/glm-4.7 models)
Feel free to ignore if this doesn't address your specific case.
Activity
github-actions commentedon Jan 14, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if this doesn't address your specific case.
rekram1-node commentedon Jan 14, 2026
I think it's because you are using incorrect provider. You should be using the zai-coding-plan not the zai provider
rekram1-node commentedon Jan 14, 2026
This is the one u wantt^^^^
vladnicula commentedon Jan 15, 2026
that is it! amazing catch! Thanks @rekram1-node!
Looks like the same API key worked for hours under the normal z.api urls. I was not charged it seems anything. Cool.
AshMcConnell commentedon Jan 16, 2026
Thanks, exactly my problem too 👍