Skip to content

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.

Error output
查询失败
English translation

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.

  1. First confirm whether Claude Code requests are actually forwarded and responded to normally; if they work, "Query Failed" only means the usage query failed.

  2. Upgrade to v3.16.2 or later and retest the usage query.

  3. 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`.

Toolcc-switch
Versionv3.16.1 - v3.16.5(受影响报告)
PlatformsWindows
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.

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.