Repository navigation
fix(pricing): add Claude Fable and Mythos 5.2 fallback rates - #8634
Merged
Merged
Conversation
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
When the pricing catalog is unavailable or predates the 5.2 models,
claude-fable-5-2falls back to Fable 5.0 ($10/$50 per MTok, $1 cache reads), whileclaude-mythos-5-2falls back to generic Claude pricing. Both models should use the official 5.2 price card: $8 input, $40 output, $10 five-minute cache writes, $16 one-hour cache writes, and $0.20 cache reads per MTok.This adds the bundled price entries and both fallback paths, including provider-prefixed names. Exact catalog overrides retain precedence, including explicit zero prices; older and future model versions retain their existing behavior. The default remote catalog already prices canonical Fable 5.2 correctly, and that case is covered as a passing control.
The regression checks cover mixed cache TTLs, 250k input contexts, standard/Fast billing, the unified resolver, and custom catalog rates. The same final tests fail on unmodified
main@ee58c0013(60 failing leaf cases, 11 passing controls) and all 71 leaf cases pass after the fix.Validation on Go 1.27.3 / macOS arm64:
go test -tags=unit ./...: passed (25,987 pass / 41 conditional skip test/subtest events).go test -tags=integration ./...: passed (15,740 pass / 16 conditional skip test/subtest events).golangci-lint v2.14.0 run --timeout=30m: 0 issues.gofmtandgit diff --check: clean.Refs #8630. This addresses pricing; model discovery and provider access are outside this patch. Tests use local fixtures and do not call a real provider.
AI disclosure: Generated and tested autonomously with Codex; no human review.