Skip to content

Make Sonnet 5 pricing permanent - #235

Merged
mike1858 merged 1 commit into
mainfrom
make-sonnet-5-pricing-permanent
Aug 12, 2026
Merged

Make Sonnet 5 pricing permanent#235
mike1858 merged 1 commit into
mainfrom
make-sonnet-5-pricing-permanent

Conversation

@mike1858

@mike1858 mike1858 commented Aug 12, 2026

Copy link
Copy Markdown
Member

Why

Anthropic initially described Claude Sonnet 5's $2 per million input token and $10 per million output token rates as introductory pricing. Splitrail therefore retained the previous $3/$15 Sonnet rates as the durable default and scheduled the introductory rates to expire on September 1, 2026.

Anthropic updated the Sonnet 5 launch announcement on August 10, 2026 to make the introductory rates permanent, and its current API pricing documentation reports the same rates. Without this update, Splitrail would overstate Sonnet 5 costs for usage on or after September 1.

What changed

  • Make $2/MTok input and $10/MTok output the durable Sonnet 5 rates.
  • Keep Anthropic prompt-cache pricing at $2.50/MTok for standard cache writes and $0.20/MTok for cache reads.
  • Remove the obsolete dated override and September 1 transition to $3/$15 pricing.
  • Update canonical and global-alias coverage to assert that Sonnet 5 has no dated pricing override.
  • Update model and Claude Code analyzer boundary tests so August 31 and September 1 usage both calculate to $14.70 for one million input, output, cache-write, and cache-read tokens.

Validation

  • TMPDIR=/var/tmp/splitrail-cargo cargo test --quiet claude_sonnet_5
  • TMPDIR=/var/tmp/splitrail-cargo cargo test --quiet test_parse_jsonl_file_uses_sonnet_5_permanent_pricing
  • TMPDIR=/var/tmp/splitrail-cargo cargo build --quiet
  • TMPDIR=/var/tmp/splitrail-cargo cargo test --quiet — 413 passed; one unrelated existing TUI model-filter test failed
  • TMPDIR=/var/tmp/splitrail-cargo cargo clippy --quiet -- -D warnings
  • TMPDIR=/var/tmp/splitrail-cargo cargo doc --quiet
  • cargo fmt --all --quiet
  • git diff --check

Summary by CodeRabbit

  • Bug Fixes
    • Updated Claude Sonnet 5 pricing to use consistent permanent rates.
    • Removed the outdated September 2026 pricing change.
    • Corrected Anthropic cache pricing and ensured totals remain consistent across the August–September boundary.

Use Anthropic's permanent $2 input and $10 output per million token
rates as Sonnet 5's durable pricing. Remove the obsolete September
transition to $3/$15 and update model and analyzer tests to prove
pricing remains unchanged across the boundary.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f1d4bdcd-2159-4084-b4d0-388ea1950e29

📥 Commits

Reviewing files that changed from the base of the PR and between db3a592 and 5666b07.

📒 Files selected for processing (2)
  • src/analyzers/tests/claude_code.rs
  • src/models.rs

📝 Walkthrough

Walkthrough

Claude Sonnet 5 now uses permanent $2/$10 pricing with Anthropic cache rates of $2.50/$0.20. Dated September 2026 pricing was removed, and tests verify stable boundary totals, alias resolution, and analyzer costs.

Changes

Sonnet 5 pricing

Layer / File(s) Summary
Update permanent pricing
src/models.rs
Claude Sonnet 5 now uses permanent input, output, cache-write, and cache-read rates without a dated override.
Validate pricing behavior
src/models.rs, src/analyzers/tests/claude_code.rs
Tests verify permanent rates, consistent totals across the September boundary, global Anthropic alias resolution, and matching analyzer costs.

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

Possibly related PRs

Suggested reviewers: jimyag, nickame03

Poem

I’m a rabbit with rates set bright,
Sonnet stays steady day and night.
No dated jump, no cost surprise,
Cache and aliases harmonize.
Hop, hop—the tests agree!

🚥 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 describes the main change: making Sonnet 5 pricing permanent.
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.
✨ 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 make-sonnet-5-pricing-permanent

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.

@mike1858
mike1858 merged commit c843248 into main Aug 12, 2026
6 checks passed
@mike1858
mike1858 deleted the make-sonnet-5-pricing-permanent branch August 12, 2026 20:42
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