Repository navigation
feat: add codeburn audit token-source view - #578
Merged
Merged
Conversation
Adds a per-(provider, model) audit table showing the raw token fields each provider records (input, output, reasoning, cache write/read) alongside the totals codeburn displays and prices. It makes the normalizations explicit: reasoning folds into output, the Anthropic cacheReadInput / OpenAI cached vocabularies collapse to a per-call max, and cache write/read use the 1.25x / 0.1x input multipliers when a model omits explicit cache rates. --format json adds per-component cost, the applied rates, both raw cache-read fields, and recomputed vs attributed cost, so any token-to-cost drift is visible in one command. Same options as `codeburn models`.
iamtoruk
force-pushed
the
feat/token-audit
branch
from
June 30, 2026 09:04
3a6321f to
e6b1449
Compare
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.
What
Adds
codeburn audit, a token-source / conversion-transparency view to make token-amount mismatches (the #574 class of report) diagnosable in one command.For each (provider, model) it shows the raw token fields the provider records next to the totals codeburn displays and prices, so any drift is visible:
max(Anthropic cacheReadInput, OpenAI cached); cache write/read priced at 1.25x / 0.1x input when a model omits explicit cache rates--format jsonIt turns "your numbers look off" reports (cache pricing, reasoning tokens, unpriced models) into a one-command diff. On real data it immediately surfaces things like an unpriced model showing $0 and the reasoning-token split on GPT-5.5.
Notes
codeburn models(period / from / to / provider / format).tests/audit-report.test.tspins the normalizations (reasoning fold, per-call cache-read max, unpriced model -> null rates). Full suite green.