Skip to content

cc-switch Usage Query Not Showing / Query Failed

Quick fix

Upgrade to the latest version; enable official account usage manually, check supplier script endpoints and HTTPS. Balance display issues have been fixed since…

Error output
测试失败: Network error: error sending request for url (https://api.novita.ai/v3/user/balance)
English translation

Test failed: Network error: error sending request for url (https://api.novita.ai/v3/user/balance)

Usage queries and statistics in cc-switch 3.x repeatedly regressed across several versions: supplier query scripts had incorrect endpoints (for example, the Novita official preset pointed to an unavailable /v3/user/balance); base_url was required to use HTTPS and rejected otherwise except for localhost; official account usage had to be enabled manually by default; the extra field was hidden in single-plan views; balance-based providers did not appear in the compact panel; and daily summary tables were empty. The maintainer said 3.x had many usage-statistics bugs and that the feature was rebuilt in v4.0.

  1. Upgrade to the latest version (v4.0 or later), which rebuilt usage statistics, quota display, and the authorization center and fixed most query failures and display issues in older versions.

  2. If usage for an official Claude account is not displayed, manually enable usage statistics from the 「用量查询」 button (disabled by default after 3.16.3).

  3. If a third-party supplier query fails, check the usage query script: confirm the endpoint is available (for example, Novita needs https://api.novita.ai/openapi/v1/billing/balance/detail) and that the URL uses HTTPS (except for localhost).

  4. If the usage panel shows 0, try selecting 「启用 Tool Search」. If data was lost after an offline Windows MSI upgrade, switch the time range to 7d or 30d and check again.

  5. If the extra field does not appear after configuring the script, this is a known bug in the single-plan view. It was fixed in v3.12.0; upgrade.

ToolClaude Code
Version3.14.1 - 3.20.3(v4.0 起修复)
PlatformsWindowsmacOS
Why did quota statistics stop appearing after updating to 3.16.3?
Usage statistics for official accounts must be enabled manually starting with 3.16.3. Enable them from the 「用量查询」 button.
Why are the test and configure usage query buttons grayed out?
The supplier is usually being misidentified as an official supplier. Try adding the supplier again.
Why can't I query usage with an HTTP base_url?
Older versions required HTTPS except for localhost as a security restriction. This was adjusted in v4.0.
Why doesn't a balance-based supplier show usage in the compact panel?
This has been supported since v4.0. The tray displays text such as “余额 8.99 CNY”.
What should I do if usage statistics are cleared after an offline Windows MSI upgrade?
Try switching the time range to 7d or 30d. If it is still empty, it may be a bug that needs to be reported.

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.