You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Show per-provider and per-model cache hit rate in Usage overview and live Thread Details
#40749
T3 Code already computes historical cache hit rate in apps/web/src/components/usage/usageBreakdown.ts (cacheHitRate), but today it is only visible inside UsageModelDialog after clicking an individual model row (apps/web/src/components/usage/UsageModelDialog.tsx:69).
Similarly, OrchestrationV2ProviderTurnTokenUsage (packages/contracts/src/orchestrationV2.ts) and ContextWindowSnapshot (packages/client-runtime/src/state/contextWindow.ts) already carry inputTokens, cachedInputTokens, promptCacheTtlMs, and promptCacheExpiresAt, yet ThreadDetailsContext (apps/web/src/components/chat/ThreadDetailsUsage.tsx) does not surface cache hit rate or cache warmth.
Proposal: Per-Provider & Per-Model Cache Hit Visibility
Because providers differ significantly in what cache telemetry they report (Claude, Codex, and OpenCode report detailed cache reads/writes; Antigravity normalizes Gemini reads; whereas generic ACP / Grok / Kiro often omit cache breakdowns, and Pi currently mixes disjoint fields), cache hit rate should be displayed per-provider / per-agent and per-model rather than collapsed into a misleading cross-provider number:
Show weighted historical cache hit rate on each provider card (when that provider reports input+cache records) and as a column in the Model Breakdown table, so users don't have to click into each model dialog to compare efficiency across agents.
Show — / omit for providers without cache telemetry.
Live Thread Details (ThreadDetailsContext):
Optionally display the active agent's scoped cache hit rate (explicitly scoped — e.g. last turn vs current provider-thread cumulative — only for drivers with verified normalized telemetry, plus an optional warm/expired indicator when promptCacheExpiresAt is available like Claude).
Why this fits T3 Code
Uses existing persisted usage buckets and runtime fields (zero new wire protocols for Usage overview).
Splitting by provider/model prevents mixed/unsupported drivers from distorting the ratio.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Context
T3 Code already computes historical cache hit rate in
apps/web/src/components/usage/usageBreakdown.ts(cacheHitRate), but today it is only visible insideUsageModelDialogafter clicking an individual model row (apps/web/src/components/usage/UsageModelDialog.tsx:69).Similarly,
OrchestrationV2ProviderTurnTokenUsage(packages/contracts/src/orchestrationV2.ts) andContextWindowSnapshot(packages/client-runtime/src/state/contextWindow.ts) already carryinputTokens,cachedInputTokens,promptCacheTtlMs, andpromptCacheExpiresAt, yetThreadDetailsContext(apps/web/src/components/chat/ThreadDetailsUsage.tsx) does not surface cache hit rate or cache warmth.Proposal: Per-Provider & Per-Model Cache Hit Visibility
Because providers differ significantly in what cache telemetry they report (Claude, Codex, and OpenCode report detailed cache reads/writes; Antigravity normalizes Gemini reads; whereas generic ACP / Grok / Kiro often omit cache breakdowns, and Pi currently mixes disjoint fields), cache hit rate should be displayed per-provider / per-agent and per-model rather than collapsed into a misleading cross-provider number:
UsagePage.tsx& MobileUsageRouteScreen.tsx):—/ omit for providers without cache telemetry.ThreadDetailsContext):promptCacheExpiresAtis available like Claude).Why this fits T3 Code
All reactions