feat(pricing): refresh built-in model prices to current list prices#145
Merged
Conversation
Refresh the built-in token->$ table against the providers' current pricing pages
(Anthropic and OpenAI, 2026-06-19). The lineup and prices had drifted, and two
prefixes were actively mispricing newer models:
- Anthropic: add Claude Fable 5 ($10/$50); Opus 4.5-4.8 dropped to $5/$25, so
add explicit longer-prefix entries for them while Opus 4 / 4.1 stay $15/$75
(previously the 'claude-opus-4' prefix priced all Opus at $15/$75). Sonnet 4.x
('claude-sonnet-4' $3/$15) and Haiku 4.5 ('claude-haiku-4' $1/$5) unchanged.
- OpenAI: add the current gpt-5.5 ($5/$30) and gpt-5.4 / -mini / -nano family;
drop the superseded bare 'gpt-5' entry (its prefix mispriced gpt-5.4/gpt-5.5;
a bare gpt-5 call is now unpriced rather than carrying a stale rate). gpt-4o /
gpt-4o-mini kept as legacy.
Prices stay fully overridable via RISKKERNEL_PRICING_FILE. Tests assert the
per-call cost for the new/changed models, the Opus version prefix split, and that
the superseded gpt-5 is unpriced.
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.
Refreshes the built-in token→$ pricing table (#87) against the providers' current published list prices — verified by fetching the official pricing pages today (2026-06-19), per the issue's "cite the provider's pricing page" requirement.
Please sanity-check the numbers against the linked pages before merging — these are the dollar-budget basis, and the lineup has moved since the last refresh.
Sources
What changed
The lineup genuinely drifted, and two prefixes were actively mispricing newer models:
Anthropic
claude-opus-4prefix was pricing all Opus at $15/$75; added explicit longer-prefix entries for 4.5/4.6/4.7/4.8 so they price correctly, while Opus 4 / 4.1 keep $15/$75.OpenAI
gpt-5.5($5/$30) andgpt-5.4/-mini/-nanofamily.gpt-5entry — its prefix was mispricinggpt-5.4/gpt-5.5at the old $1.25/$10; a baregpt-5call is now unpriced (priced:false) rather than carrying a stale rate.gpt-4o/gpt-4o-minikept as legacy.Tests
TestCost_CurrentModels(per-call cost for Fable 5, Opus 4.8/4.5, Opus 4.1, Haiku 4.5, gpt-5.5/5.4/-mini/-nano),TestCost_OpusVersionPrefixSplit(regression guard: longest-prefix prices current Opus at $5/$25, 4.1 at $15/$75), andTestCost_SupersededGpt5Unpriced. Full pricing suite +go test ./...green;gofmt/vetclean.Prices remain fully overridable via
RISKKERNEL_PRICING_FILE(the documented way to stay current between refreshes).Closes #87