Skip to content

feat(pricing): refresh built-in model prices to current list prices#145

Merged
prashar32 merged 1 commit into
mainfrom
feat/refresh-pricing
Jun 18, 2026
Merged

feat(pricing): refresh built-in model prices to current list prices#145
prashar32 merged 1 commit into
mainfrom
feat/refresh-pricing

Conversation

@prashar32

Copy link
Copy Markdown
Owner

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

  • Add Claude Fable 5 ($10 / $50) — was unpriced ($0).
  • Opus 4.5–4.8 dropped to $5 / $25. The claude-opus-4 prefix 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.
  • Sonnet 4.x ($3/$15) and Haiku 4.5 ($1/$5) unchanged (still current).

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 was mispricing gpt-5.4/gpt-5.5 at the old $1.25/$10; a bare gpt-5 call is now unpriced (priced:false) rather than carrying a stale rate. gpt-4o/gpt-4o-mini kept 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), and TestCost_SupersededGpt5Unpriced. Full pricing suite + go test ./... green; gofmt/vet clean.

Prices remain fully overridable via RISKKERNEL_PRICING_FILE (the documented way to stay current between refreshes).

Closes #87

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.
@prashar32
prashar32 merged commit 6324af3 into main Jun 18, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add / refresh model prices in the pricing table

1 participant