Skip to content

Cache hit rate for the current request of an individual query - cc-switch

Quick fix

Upgrade to v4.0.14, then select the request log “Hit Rate” column under “Settings” on the Usage page.

Error output
但是,用户无法直接看到**单条 query 当前这次请求的缓存命中率**。
English translation

However, users cannot directly see **the cache hit rate for the current request of an individual query**.

The request logs already contained `inputTokens`, `cacheReadTokens`, and `cacheCreationTokens`, but the per-request log UI did not calculate or display the cache hit rate, so users had to calculate it manually.

This feature was added in v4.0.14, but the “Hit Rate” column is hidden by default. It uses the same formula as the overall hit rate and truncates down to one decimal place, so a near-complete hit is not displayed as 100%.

  1. Upgrade cc-switch to v4.0.14 or later.

  2. Open the “Settings” tab on the Usage page.

  3. Under “Request log columns,” select “Hit Rate” to view the cache hit rate for each request.

Toolcc-switch
Versionv4.0.14 已修复
PlatformsUnknown

(No FAQ yet)

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.