feat(dashboard): abbreviate Model Comparison Tokens column (SI short unit) - #8
Merged
Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User description
What
The Tokens column in the Model Comparison panel printed raw integers (e.g.
276777). This addsunit: "short"to that column's field override so Grafana auto-abbreviates by magnitude.Once any model crosses a million it renders as e.g.
1.25 Milautomatically — 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 asclaude-opus-4-8with compact units like “277 K” and scales automatically for millions.Latest Contributors(1)