fix: add explicit pricing for Opus 4.8 (claude-opus-4-8)#134
Open
Ninhache wants to merge 1 commit into
Open
Conversation
Opus 4.8 had no explicit entry in either pricing table; cost only resolved via the generic 'opus' substring fallback to 4.7's rate. Add claude-opus-4-8 (same rates as 4.7: $5/$25 in/out, $0.50 cache read, $6.25 cache write) to cli.py PRICING, dashboard.py PRICING, and the README cost table, and point the opus fallback at the latest model. Adds a regression guard test. Closes phuryn#133.
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.
Summary
Adds an explicit pricing entry for Opus 4.8 (
claude-opus-4-8), which was missing from both pricing tables. Closes #133.Before this change, cost for
claude-opus-4-8was only computed via the genericopussubstring fallback, which returned the 4.7 rate. The numbers happened to be correct (4.8 has the same API pricing as 4.7), but:opuscatch-all fallback pointed at a previous model.Changes
cli.py— addclaude-opus-4-8toPRICING; point theopusfallback atclaude-opus-4-8dashboard.py— addclaude-opus-4-8to the JSPRICING; point theopusfallback atclaude-opus-4-8README.md— add theclaude-opus-4-8row to the cost tabletests/test_cli.py— addclaude-opus-4-8to the known-models list + a regression guard (test_opus_4_8_has_explicit_entry)Rates match Opus 4.7 (verified against claude.com/pricing#api):
$5input,$25output,$0.50cache read,$6.25cache write per MTok.Testing
python3 -m unittest discover -s tests— all green (incl. the new guard and the existing cli↔dashboard pricing-parity tests).