Skip to content

Add Claude Sonnet 5.5 pricing - #266

Merged
mike1858 merged 1 commit into
mainfrom
models/claude-sonnet-5-5-pricing
Sep 28, 2026
Merged

mike1858 merged 1 commit into
mainfrom
models/claude-sonnet-5-5-pricing

Conversation

@mike1858

@mike1858 mike1858 commented Sep 28, 2026 •

Copy link
Copy Markdown
Member

Why

Claude Code now ships Claude Sonnet 5.5 (claude-sonnet-5-5) and makes it the default Sonnet on first-party. Splitrail has no entry for it, so sessions using Sonnet 5.5 show up as an unknown model with no cost.

Sonnet 5.5 is not on Anthropic's public pricing page yet. The pricing therefore comes from the model catalog in Claude Code 2.1.284, the same source used for Opus 5.5 in #260. The catalog prices claude-sonnet-5-5 as tier_2_10:

tier_2_10: { input: 2, output: 10, cache_write_5m: 2.5, cache_write_1h: 4, cache_read: 0.2, web_search: 0.01 }

This is the same named tier Claude Code assigns to Sonnet 5.

What changed

  • Add claude-sonnet-5-5 at $2 input / $10 output per MTok, $2.50 cache write, and $0.20 cache read. Like the other Claude entries, cache writes use the 5-minute rate because Splitrail does not get the TTL split.
  • Keep Sonnet 5.5 as its own model rather than an alias of Sonnet 5. The two have the same rates today, but they are different vendor models whose prices can change independently, and usage reports should list them separately.
  • Add aliases: claude-sonnet-5.5, claude-5.5-sonnet, the mantle ID anthropic.claude-sonnet-5-5, and all seven Bedrock cross-region forms (us, eu, apac, jp, au, us-gov, global), matching the Opus 5.5 set.
  • No fast-mode (ServiceTier::Priority) card. Claude Code's speed: "fast" price switch only covers Opus 5.5, Opus 5/4.8, and Opus 4.6/4.7, and the Sonnet 5.5 catalog entry lacks the fast_mode capability. Priority usage therefore falls back to standard rates.
  • Tests: pricing across the aliases, including the anthropic/ provider prefix, plus a test that Sonnet 5.5 and Sonnet 5 are distinct registry objects and that Priority resolves to standard rates.

Validation

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

Summary by CodeRabbit

  • New Features
    • Added support for the Claude Sonnet 5.5 model, including its pricing and regional naming variants.
    • Priority-tier requests use standard rates when separate Priority pricing is unavailable.

@coderabbitai

coderabbitai Bot commented Sep 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

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

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: 7d3fc28b-a19c-4928-bc5a-e2b2fde26165

📥 Commits

Reviewing files that changed from the base of the PR and between 76677d7 and 96ccea3.

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

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.


📝 Walkthrough

Walkthrough

The model registry adds Claude Sonnet 5.5 with standard and cache pricing, maps its naming variants and provider IDs to the model, and tests alias pricing, distinct identity from Sonnet 5, and Priority-tier fallback.

Changes

Sonnet 5.5 pricing and aliases

Layer / File(s) Summary
Model registration and verification
src/models.rs
Registers Sonnet 5.5 with standard and cache rates, adds naming and provider-ID aliases, and tests pricing, registry identity, and Priority-tier fallback.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Feature

Suggested reviewers: jimyag

Merge Risk: ⚪ Minimal · up to 96cce

The added aliases resolve to the new model, and Priority pricing uses its standard rates. The available source does not confirm Sonnet 5.5 pricing specifically, but no contrary rate is established, so no concrete merge blocker was found.

Architecture Summary

Architecture risk: 🔵 Low · up to 96cce

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/models.rs: Registers claude-sonnet-5-5 separately from Sonnet 5 with the same standard input, output, and cache rates. No Priority rate card is registered.
  • observed — Modified behavior in src/models.rs: Adds aliases mapping Sonnet 5.5 naming variants and Anthropic mantle/Bedrock IDs, including regional prefixes, to claude-sonnet-5-5.
  • observed — Modified behavior in src/models.rs: Adds a test asserting that the listed Sonnet 5.5 aliases resolve to non-estimated pricing of $2 input, $10 output, and $2.70 for one million cache-write and cache-read tokens.
  • observed — Modified behavior in src/models.rs: Adds a test asserting Sonnet 5.5 and Sonnet 5 resolve to distinct registry objects, and that Sonnet 5.5 Priority input and output pricing falls back to the standard $2/$10 rates.
🚥 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 identifies the primary change: adding Claude Sonnet 5.5 pricing.
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 5 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
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • 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 model list,
Sonnet 5.5 joins the gist.
Cache rates hop into the chart,
Aliases find their matching part.
Priority rates use standard fare,
The rabbit leaves with ears in the air.

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

@mike1858
mike1858 merged commit 558be82 into main Sep 28, 2026
8 checks passed
@mike1858
mike1858 deleted the models/claude-sonnet-5-5-pricing branch September 28, 2026 17:48
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