feat: price new models by default and explain token totals - #3
Merged
Conversation
Fleet reports read as inflated and undercount cost. Three causes, all fixed here. Pricing defaulted to offline, unlike ccusage itself, so every model newer than the snapshot bundled with ccusage was priced at $0 with no indication. On a four-host fleet that silently dropped 9.7% of tokens (11.9B, mostly claude-opus-5) out of the cost column. Default to online pricing to match ccusage; --offline still selects the bundled snapshot. Total tokens is dominated by cache reads -- 96.6% on the same fleet -- because every turn replays the cached context. Bars scaled by total tokens therefore track context size rather than work, and diverge sharply from cost. Add --graph-metric output alongside tokens and cost. Print Note: lines under the table covering the cache-read share, models missing from the pricing table, and the reasoning tokens ccusage folds into total tokens without a column. --json gains a notes array; schemaVersion is unchanged. Also bump ccusage to 20.0.19 to refresh the bundled pricing snapshot. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.
Fleet reports read as inflated and undercount cost. Verified against raw transcripts on a four-host fleet: the aggregation arithmetic was already exact (host sums == daily rows == totals, no duplicate dates, no cross-host double counting). The problems were in pricing defaults and presentation.
Pricing defaulted to offline
ccusagedefaults tooffline: false; ccusage-fleet flipped it totrue. Every model newer than the pricing snapshot bundled with ccusage was therefore priced at$0with no indication — 9.7% of tokens (11.9B, mostlyclaude-opus-5) on the fleet under test. The same day priced$0offline and$32.14online.Default to online pricing to match ccusage.
--offlinestill selects the bundled snapshot.Total tokens is mostly cache reads
Cache reads were 96.6% of total tokens, because each turn replays the cached context at a fraction of the input rate. Bars scaled by total tokens track context size rather than work and diverge sharply from cost — 2026-07-29 was 5.6B tokens for $1.5K, while 2026-07-15 was 5.3B for $3.8K.
Add
--graph-metric outputalongsidetokensandcost.Nothing explained any of this
Print
Note:lines under the table for the cache-read share, models missing from the pricing table, and the reasoning tokens ccusage folds intototalTokenswithout giving them a column (0.00034% of the fleet total, from gemini and opencode).--jsongains anotesarray;schemaVersionis unchanged.Also bumps ccusage to 20.0.19 to refresh the bundled snapshot for
--offlineusers.Verification
npm test— 27 pass. On the live fleet, unpriced tokens fall from 9.7% to 0.0%.🤖 Generated with Claude Code