Skip to content

feat: add cache tokens to Models and Providers panels, unify column layout#8

Merged
Cateds merged 2 commits intoCateds:masterfrom
white-hat:feature/add-cache-to-models
Apr 23, 2026
Merged

feat: add cache tokens to Models and Providers panels, unify column layout#8
Cateds merged 2 commits intoCateds:masterfrom
white-hat:feature/add-cache-to-models

Conversation

@white-hat
Copy link
Copy Markdown
Contributor

@white-hat white-hat commented Apr 22, 2026

I wanted to check how caching differs from model to model and realized that your app lacks exactly that info. So I added it, and while at it — made the layout consistent across panels so you don't have to re-scan when switching pages.

Summary

  • Add cache_tokens field to ModelUsageRow and ProviderUsageRow
  • Aggregate cache_tokens from cache_read + cache_write in both model and provider chart builders
  • Switch Models and Providers detail panels from 3-column to 2-column layout (5 rows)
  • Unify field ordering across Models, Providers, and Overview panels so users don't have to re-scan when switching pages

Layout

Before (3 columns × 3 rows, no Cache row):

Tokens   Cost     Sessions
Input    Output   Messages
Prompts  Days     Rate

After (2 columns × 5 rows, with Cache):

Tokens   Cost
Input    Sessions
Output   Messages
Cache    Prompts
Rate     Days

This matches the Overview panel's 2-column layout and makes navigation between panels more consistent.

@Cateds
Copy link
Copy Markdown
Owner

Cateds commented Apr 23, 2026

If the compressed line chart remains reasonably readable ...
I previously compressed the description to fit the data into 3 rows (as "Total cost: " -> "Cost "), let me convert it back if 2 rows is back.

@Cateds Cateds merged commit 417d305 into Cateds:master Apr 23, 2026
1 check passed
@Cateds
Copy link
Copy Markdown
Owner

Cateds commented Apr 24, 2026

Oh, and thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants