Skip to content

fix(cost-map): set 200k context on anthropic claude-sonnet-4-5 and drop above_200k prices - #45606

Closed
berriai-litellm-provider-info-sync[bot] wants to merge 1 commit into
mainfrom
litellm-providers/price-sync-anthropic
Closed

berriai-litellm-provider-info-sync[bot] wants to merge 1 commit into
mainfrom
litellm-providers/price-sync-anthropic

Conversation

@berriai-litellm-provider-info-sync

@berriai-litellm-provider-info-sync berriai-litellm-provider-info-sync Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Sets max_input_tokens to 200000 on anthropic claude-sonnet-4-5 and claude-sonnet-4-5-20250929 and drops all nine above_200k price fields from both rows (input_cost_per_token_above_200k_tokens, output_cost_per_token_above_200k_tokens, cache_creation_input_token_cost_above_200k_tokens, cache_read_input_token_cost_above_200k_tokens, cache_creation_input_token_cost_above_1hr_above_200k_tokens, and the _batches variants of input, output, cache creation and cache read above 200k). Every other field is unchanged. Ruling: anthropic-claude-sonnet-4-5-200k-context-drop-above-200k

Rows

claude-sonnet-4-5, kind page: max_input_tokens 1000000 to 200000, above_200k fields removed
claude-sonnet-4-5-20250929, kind page: max_input_tokens 1000000 to 200000, above_200k fields removed

Evidence

Release notes, April 30, 2026 (https://platform.claude.com/docs/en/release-notes/overview): "We've retired the 1M token context window beta (context-1m-2025-08-07) for Claude Sonnet 4.5 and Claude Sonnet 4. The beta header now has no effect on these models, and requests exceeding the standard 200k-token context window return an error"

Context windows page (https://platform.claude.com/docs/en/build-with-claude/context-windows): "Other Claude models, including Claude Sonnet 4.5 (deprecated), have a 200k-token context window"

With no request above 200k accepted, the above_200k price tier can no longer apply, so those fields are removed.

Delisted by the provider

claude-haiku-4-5, claude-opus-4-5, claude-sonnet-4-5 are aliases whose dated ids are still on /v1/models (naming mismatch). claude-mythos-5, claude-mythos-5-1 stay flagged per ruling anthropic-mythos-gated-flag-delisted. claude-mythos-preview already carries deprecation_date 2026-06-09


Note

Medium Risk
Changes model limits and billing tiers used for cost estimation on Claude Sonnet 4.5; incorrect values would misstate spend or context eligibility, but the update matches provider retirement of 1M context.

Overview
Aligns Anthropic Claude Sonnet 4.5 cost-map entries with the retired 1M context beta by setting max_input_tokens to 200000 on claude-sonnet-4-5 and claude-sonnet-4-5-20250929 (down from 1000000).

Because prompts above 200k are no longer accepted, this PR removes all above_200k price tiers for those rows (input/output, cache read/create, 1hr cache, and batch variants). The same edits are applied to model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json.

model_prices_and_context_window.schema.json drops the optional cache_creation_input_token_cost_above_200k_tokens_batches property definition (other above_200k schema fields remain for other models).

Reviewed by Cursor Bugbot for commit 5e466aa. Bugbot is set up for automated code reviews on this repo. Configure here.

…op above_200k prices

Price-Sync: litellm-providers
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@greptile-apps

greptile-apps Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

[High impact] Updates pricing and context limits for a language model.

The PR appears safe for current runtime use, with a non-blocking fix needed to preserve Rust catalog compatibility

Findings

  1. P2 Rust rejects floating token counts ▶

Summary

Updates both Anthropic Sonnet 4.5 entries and their packaged backup to a 200,000-token input limit

  • Claude Sonnet 4.5 model records now use a 200,000-token limit.

Reviews (1) · Last reviewed commit: "fix(cost-map): set 200k context on anthr..." · Reviewed by Greptile

"search_context_size_low": 0.01,
"search_context_size_medium": 0.01
},
"prompt_cache_min_tokens": 1024.0,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Rust rejects floating token counts

Changing prompt_cache_min_tokens to 1024.0 breaks Catalog::parse, which reads this field as Option<u64>. The catalog tests are skipped, so default test runs miss this. Keep 1024 in both model rows and their backup copies

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed, model_info.rs reads this as Option. The sync service writes 1024.0 on every replace, so holding this PR until that is fixed

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed. Since the sync service rewrites prompt_cache_min_tokens as 1024.0, correcting only these catalog rows would be overwritten and the generated JSON would still fail Rust’s Option<u64> parsing. This PR should remain blocked until sync serialization emits an integer (1024), after which both model rows and their backup copies should retain the integer form.

@codspeed

codspeed Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 31 untouched benchmarks


Comparing litellm-providers/price-sync-anthropic (5e466aa) with main (6d4fa56)

Open in CodSpeed

@codecov

codecov Bot commented Oct 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Closing as superseded by the rolling registry PR #45647, which carries this exact Sonnet 4.5 200k context and pricing change, verified against Anthropic docs

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.

2 participants