Skip to content

fix(models): add 1h cache write price to Claude Fable 5 - #2609

Merged
steebchen merged 1 commit into
mainfrom
fix/claude-fable-5-cache-write-1h
Jun 9, 2026
Merged

steebchen merged 1 commit into
mainfrom
fix/claude-fable-5-cache-write-1h

Conversation

@steebchen

@steebchen steebchen commented Jun 9, 2026 •

Copy link
Copy Markdown
Member

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-5 provider mapping sets cacheWriteInputPrice but did not define cacheWriteInputPrice1h. 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 passed
  • pnpm format and pnpm build pass

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Updates
    • Updated pricing information for Claude Fable 5 model to include cache write input pricing data.

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>
@coderabbitai

coderabbitai Bot commented Jun 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 3e1ee857-4846-4154-a816-68331e3c5338

📥 Commits

Reviewing files that changed from the base of the PR and between aedbd9c and 82a3155.

📒 Files selected for processing (1)
  • packages/models/src/models/anthropic.ts

Walkthrough

This PR adds a single pricing field, cacheWriteInputPrice1h, to the claude-fable-5 model entry in the anthropic models configuration. The change updates the exported anthropicModels data constant without altering any function signatures or exported types.

Changes

Claude Fable-5 Cache Write Pricing

Layer / File(s) Summary
Cache write input pricing for claude-fable-5
packages/models/src/models/anthropic.ts
Added cacheWriteInputPrice1h pricing field to the claude-fable-5 model provider configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding the 1h cache write price field to Claude Fable 5 model configuration.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/claude-fable-5-cache-write-1h

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@steebchen
steebchen enabled auto-merge June 9, 2026 18:39
@steebchen
steebchen added this pull request to the merge queue Jun 9, 2026
Merged via the queue into main with commit 8c1be13 Jun 9, 2026
17 checks passed
@steebchen
steebchen deleted the fix/claude-fable-5-cache-write-1h branch June 9, 2026 18:50
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.

1 participant