Skip to content

feat(dashboard): abbreviate Model Comparison Tokens column (SI short unit) - #8

Merged
tmalka2022 merged 1 commit into
mainfrom
feat/tokens-short-unit
Jul 13, 2026
Merged

feat(dashboard): abbreviate Model Comparison Tokens column (SI short unit)#8
tmalka2022 merged 1 commit into
mainfrom
feat/tokens-short-unit

Conversation

@tmalka2022

@tmalka2022 tmalka2022 commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

User description

What

The Tokens column in the Model Comparison panel printed raw integers (e.g. 276777). This adds unit: "short" to that column's field override so Grafana auto-abbreviates by magnitude.

model before after
claude-opus-4-8 276777 277 K
claude-fable-5 173557 174 K
claude-haiku-4-5 95310 95.3 K
claude-sonnet-5 91850 91.9 K

Once any model crosses a million it renders as e.g. 1.25 Mil automatically — consistent with how the Cost column is already unit-formatted.

Scope

Only the Model Comparison panel's Tokens column. The MCP Tool Token Usage and Top Sessions panels also have raw-integer Tokens columns and were intentionally left unchanged.

Testing

Applied to the local stack (Grafana 13.0.1) via provisioning reload and confirmed the dashboard serves unit: "short" on the column.

🤖 Generated with Claude Code


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Add Grafana field overrides to the Model Comparison Tokens column so it returns unit: "short" and mirrors the Cost column’s abbreviated formatting. Ensure the column now labels metrics such as claude-opus-4-8 with compact units like “277 K” and scales automatically for millions.

Latest Contributors(1)
UserCommitDate
tmalka2022feat(dashboard): abbre...July 13, 2026
Review this PR on Baz | Customize your next review

…unit)

The Tokens column printed raw integers (e.g. 276777). Add unit "short" so
Grafana auto-abbreviates by magnitude (277 K, 174 K, and Mil once a model
crosses a million), consistent with how the Cost column is already formatted.
Scoped to the Model Comparison panel; the MCP Tool Token Usage and Top
Sessions Tokens columns are left unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TrMEKd8TZniXL9v3PvVHP2
@tmalka2022
tmalka2022 merged commit e091233 into main Jul 13, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant