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
Commit c969d0d
Browse filesBrowse the repository at this point in the historyBrowse files
feat(usage): show the cached subset beside every token total (lidge-jun#4421)
A cached request's total is mostly cache. A 58,000-token prompt that is
57,000 cache read and 1,000 fresh was printed as a bare 58,000 on every
surface except the logs table row, so it read as a different, smaller
request than the row directly beside it.
formatTokensWithCache renders the total with its cached companion —
5.8만 c5.7만, 58K c57K — reusing the marker the logs.tokens.cacheRead
label already documents as "cache read (c)", so no new i18n key is needed.
A provider that reports no cache is untouched, and a turn served entirely
from cache still shows the marker, since that is the row worth seeing.
No backend change: /api/logs forwards the whole usage object and /api/usage
already emits cache on summary, models and providers. The loss was purely
client-side, in the row types and the aggregators, so the fix widens
UsageModel, UsageProvider, UsageSummary30d, the CLI CostRow, and
summarizeFilteredLogs to keep the fields that were already arriving.
The log detail panel is deliberately left alone: it already has separate
cache read and cache write cells, and stacking the companion onto its
total would duplicate them.
0 commit comments