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.
Symptom
Section titled “Symptom”但是,用户无法直接看到**单条 query 当前这次请求的缓存命中率**。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%.
Upgrade cc-switch to v4.0.14 or later.
Open the “Settings” tab on the Usage page.
Under “Request log columns,” select “Hit Rate” to view the cache hit rate for each request.
Affected Versions
Section titled “Affected Versions”Source Issues
Section titled “Source Issues”This page is distilled from 1 real issues
(No FAQ yet)
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.