Skip to content

fix(pricing): add Claude Fable and Mythos 5.2 fallback rates - #8634

Merged
Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/claude52-pricing
Nov 10, 2026
Merged

Wei-Shaw merged 1 commit into
Wei-Shaw:mainfrom
r266-tech:codex/claude52-pricing

Conversation

@r266-tech

Copy link
Copy Markdown
Contributor

When the pricing catalog is unavailable or predates the 5.2 models, claude-fable-5-2 falls back to Fable 5.0 ($10/$50 per MTok, $1 cache reads), while claude-mythos-5-2 falls 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).
  • CI-pinned golangci-lint v2.14.0 run --timeout=30m: 0 issues.
  • gofmt and git 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.

@Wei-Shaw
Wei-Shaw merged commit d216e42 into Wei-Shaw:main Nov 10, 2026
9 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 10, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants