fix(models): add 1h cache write price to Claude Fable 5 - #2609
Conversation
The anthropic-pricing unit test requires every Anthropic provider mapping that sets cacheWriteInputPrice to also define cacheWriteInputPrice1h, otherwise 1h cache writes silently bill at the 5m rate. Add the missing 20.0e-6 (2x base input) value. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThis PR adds a single pricing field, ChangesClaude Fable-5 Cache Write Pricing
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
The most recent commit (#2607, "feat(models): add Claude Fable 5 to Anthropic provider") introduced a unit test failure in
apps/gateway/src/lib/anthropic-pricing.spec.ts.The
claude-fable-5provider mapping setscacheWriteInputPricebut did not definecacheWriteInputPrice1h. The pricing test enforces that every Anthropic mapping with a 5m cache-write price also defines the 1h cache-write price — otherwise 1h cache writes would silently bill at the 5m rate.This adds the missing
cacheWriteInputPrice1h: "20.0e-6", which matches the standard 2× base input price (10.0e-6) and satisfies the ratio assertions in the same test suite.Test plan
npx vitest run apps/gateway/src/lib/anthropic-pricing.spec.ts→ 119 passedpnpm formatandpnpm buildpass🤖 Generated with Claude Code
Summary by CodeRabbit