Query Failed: cc-switch GLM (Zhipu) usage query
Quick fix
For GLM, "Query Failed" may only mean usage query is unavailable; API forwarding can still work. Upgrade and retest, or use a custom template.
Symptom
Section titled “Symptom”查询失败Query Failed
This happens in cc-switch's Zhipu GLM usage query and does not mean Claude Code API forwarding failed: in the report, proxied requests were forwarded and responded normally. The Zhipu Token Plan only provides plan/quota query and does not provide API usage/billing balance query, so the UI may show "Query Failed".
The maintainer said v3.16.2 adjusted the usage-query endpoint to match the configured Base URL host; however, a user on v3.16.5 still reported the same message. The maintainer later clarified that the message refers to usage-query failure and does not reflect provider availability.
First confirm whether Claude Code requests are actually forwarded and responded to normally; if they work, "Query Failed" only means the usage query failed.
Upgrade to v3.16.2 or later and retest the usage query.
If you still need to display Zhipu plan usage, use the custom template from the issue to query `https://bigmodel.cn/api/monitor/usage/quota/limit`.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
- Are you using the Zhipu Token Plan?
- That plan only provides token plan/quota query; it does not provide API usage/billing balance query, so the UI may show "Query Failed".
- Same issue still exists on CC version v3.16.5
- The message refers to a usage-query failure and does not reflect whether the API or provider is available; rely on whether actual requests are forwarded and responded to normally.
Related problems
Section titled “Related problems”This is an unofficial community wiki with no affiliation to the cc-switch authors or the project itself. Its content is compiled from the project's public GitHub issues. This site distributes no software.