Skip to content

Add Claude Opus 5.5 pricing and Opus fast-mode rates - #260

Merged
mike1858 merged 2 commits into
mainfrom
models/claude-opus-5-5-pricing
Sep 22, 2026
Merged

mike1858 merged 2 commits into
mainfrom
models/claude-opus-5-5-pricing

Conversation

@mike1858

@mike1858 mike1858 commented Sep 22, 2026 •

Copy link
Copy Markdown
Member

Why

Claude Opus 5.5 is not announced yet, but it already ships in the model catalog embedded in Claude Code 2.1.280, which means real usage rows carrying claude-opus-5-5 can start appearing in transcripts the moment Anthropic flips the switch. Without an entry here those rows fall through to the unknown-model path and are priced at zero, so a user's most expensive model would silently contribute nothing to their totals on launch day.

Opus 5.5 is also the first Opus that gets cheaper than its predecessor — $4/$20 against Opus 5's $5/$25 — so the usual "assume the new Opus costs at least as much as the old one" instinct produces an over-count rather than a safe under-count.

While adding it, the same catalog turned out to carry a complete rate card for Anthropic's speed: "fast" request option on five Opus models. Splitrail's Piebald analyzer already resolves a "fast" service-tier label to ServiceTier::Priority, but no Claude model had a Priority entry, so every fast-mode row was being billed at standard rates. This PR closes that for the whole family at once rather than leaving four siblings inconsistent with the newest model.

What changed

  • Add claude-opus-5-5 at $4.00/MTok input, $20.00/MTok output, $5.00/MTok cache write, $0.20/MTok cache read.
  • Add eleven aliases: claude-opus-5.5, claude-5.5-opus, the bare mantle ID anthropic.claude-opus-5-5, and all seven Bedrock cross-region forms (us, eu, apac, jp, au, us-gov, global). Model lookup is exact-match with no prefix stripping beyond /, so each spelling needs its own entry.
  • Add ServiceTier::Priority rate cards for claude-opus-5-5, claude-opus-5, claude-opus-4-8, claude-opus-4-7, and claude-opus-4-6, covering Anthropic's speed: "fast" option.
  • Add tests pinning the Opus 5.5 rates across six alias spellings, asserting Opus 5.5 and Opus 5 stay distinct registry entries, pinning all five fast-mode cards, and asserting the new Priority entries do not perturb standard pricing.

Cache read is 1/20th of input, not 1/10th

Opus 5.5's vendor pricing tier is named tier_4_20_cache_read_0_20 rather than a plain tier_4_20, because its cache-read rate breaks the ratio every other Claude entry in this file follows:

Model Input Cache read Ratio
claude-opus-5 $5.00 $0.50 1/10
claude-sonnet-5 $2.00 $0.20 1/10
claude-opus-5-5 $4.00 $0.20 1/20

The test asserts $5.20 for 1M cache writes plus 1M cache reads specifically so that a future change re-deriving cache read from input lands on $5.40 and fails loudly.

Fast-mode multipliers are not uniform

Each of the five cards scales every one of its five components by a single factor, but the factor differs by model:

Model Standard Fast Factor
claude-opus-5-5 $4 / $20 $8 / $40 2x
claude-opus-5 $5 / $25 $10 / $50 2x
claude-opus-4-8 $5 / $25 $10 / $50 2x
claude-opus-4-7 $5 / $25 $30 / $150 6x
claude-opus-4-6 $5 / $25 $30 / $150 6x

The cards are written out per model rather than derived from a multiplier, and both the code comment and the test say why: collapsing this into one factor would misprice fast usage on 4.6/4.7 by 3x.

Compatibility

Standard pricing for every existing model is untouched; the diff adds entries and never edits an existing rate. pricing_for_service_tier falls back to standard pricing when a model has no entry for the requested tier, so models without a fast rate card — including claude-opus-4-5 and every non-Opus Claude model — keep their current behavior. A test asserts that fallback explicitly.

The Claude Code analyzer prices every row at ServiceTier::Standard and is unaffected by the Priority additions. Only the Piebald analyzer, which reads a service-tier label from its source data, can select them.

Provenance

Opus 5.5 is not on https://docs.claude.com/en/docs/about-claude/pricing yet, so the // Source: marker that #258 established for the Anthropic section does not cover it. Both new blocks carry their own marker naming the Claude Code 2.1.280 catalog as the source, with a note to move the entry under the section source once the public page lists it.

is_estimated is false: these are the exact rates Claude Code itself bills against, not an approximation. If Anthropic publishes different numbers at launch, the fix is the four constants in the model entry plus the matching test values.

Out of scope

  • No [1m] long-context suffix handling. Opus 5.5 has a 1M-token native context window, but Splitrail does not currently parse the [1m] model-name suffix for any model, and the vendor catalog lists a single flat tier for Opus 5.5 with no above-200K premium.
  • No date-suffixed alias. The catalog ships claude-opus-5-5 bare on every provider, matching the Opus 5 / Sonnet 5 / Opus 4.8 convention rather than the dated claude-haiku-4-5-20251001 style, so no launch-date spelling is invented here.

Validation

  • cargo build --quiet
  • cargo test --quiet
  • cargo clippy --quiet --all-targets -- -D warnings
  • cargo doc --quiet --no-deps
  • cargo fmt --all --quiet

Summary by CodeRabbit

  • New Features
    • Added support for the Claude Opus 5.5 model, including its supported naming variations and regional Bedrock identifiers.
    • Added Priority (“fast mode”) pricing for Claude Opus models.
    • Updated pricing for Claude Opus 5.5, including prompt caching rates.
    • Preserved separate standard and Priority pricing, ensuring model and pricing selection remain accurate.

@coderabbitai

coderabbitai Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

Warning

Review limit reached

Next included review available in 23 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: fa830aea-4337-4ca8-b59c-a5d72ae02191

📥 Commits

Reviewing files that changed from the base of the PR and between 3ab69fd and 321546a.

📒 Files selected for processing (1)
  • src/models.rs

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 37aa4d82-88cc-4461-a5ce-90d8f8834657

📥 Commits

Reviewing files that changed from the base of the PR and between 2be34c6 and 3ab69fd.

📒 Files selected for processing (1)
  • src/models.rs

Included review availability: Your plan provides up to 2 included reviews per hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The model registry adds Claude Opus 5.5 with standard and Priority pricing. It adds Priority pricing for four existing Opus models, aliases for Opus 5.5, and tests for pricing isolation, alias resolution, and model distinction.

Changes

Claude Opus pricing

Layer / File(s) Summary
Model and Priority pricing
src/models.rs
Adds Claude Opus 5.5 pricing and Priority rate cards for five Claude Opus models.
Aliases and pricing validation
src/models.rs
Adds Opus 5.5 aliases and tests for rate cards, standard-pricing fallback, alias resolution, and distinction from Opus 5.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Suggested reviewers: jimyag

Merge Risk: ⚪ Minimal · up to 3ab69

Claude Opus 5.5 and Priority usage will receive the new pricing, while existing standard pricing and fallback behavior remain unchanged. No merge-blocking risk is identified.

🚥 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 clearly and concisely summarizes the two main changes: Claude Opus 5.5 pricing and fast-mode rates for the Opus family.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 1 files.
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.
✨ Finishing Touches 💡 1
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
🛠️ Fix failing CI checks 💡
  • Commit to this branch
  • Create a new PR

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

A rabbit checks the rates tonight
Opus cards now balance right
New aliases hop in line
Cache costs match the design
Tests guard each pricing trail
Ears up high, the checks prevail

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

@mike1858
mike1858 merged commit e0b96b5 into main Sep 22, 2026
8 checks passed
@mike1858
mike1858 deleted the models/claude-opus-5-5-pricing branch September 22, 2026 17:04
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