Repository navigation
fix(cost-map): set 200k context on anthropic claude-sonnet-4-5 and drop above_200k prices - #45606
berriai-litellm-provider-info-sync[bot] wants to merge 1 commit into
Conversation
…op above_200k prices Price-Sync: litellm-providers
|
|
|
| "search_context_size_low": 0.01, | ||
| "search_context_size_medium": 0.01 | ||
| }, | ||
| "prompt_cache_min_tokens": 1024.0, |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
|
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 |
Summary
Sets
max_input_tokensto 200000 on anthropicclaude-sonnet-4-5andclaude-sonnet-4-5-20250929and 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-200kRows
claude-sonnet-4-5, kind page: max_input_tokens 1000000 to 200000, above_200k fields removedclaude-sonnet-4-5-20250929, kind page: max_input_tokens 1000000 to 200000, above_200k fields removedEvidence
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-5are aliases whose dated ids are still on /v1/models (naming mismatch).claude-mythos-5,claude-mythos-5-1stay flagged per rulinganthropic-mythos-gated-flag-delisted.claude-mythos-previewalready carries deprecation_date 2026-06-09Note
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_tokensto 200000 onclaude-sonnet-4-5andclaude-sonnet-4-5-20250929(down from 1000000).Because prompts above 200k are no longer accepted, this PR removes all
above_200kprice tiers for those rows (input/output, cache read/create, 1hr cache, and batch variants). The same edits are applied tomodel_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.json.model_prices_and_context_window.schema.jsondrops the optionalcache_creation_input_token_cost_above_200k_tokens_batchesproperty definition (otherabove_200kschema 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.