Repository navigation
feat(model_prices): add claude-haiku-5-5 model pricing - #45108
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4c963c4e1b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "supports_tool_choice": true, | ||
| "supports_vision": true | ||
| }, | ||
| "claude-haiku-5-5": { |
There was a problem hiding this comment.
Remove the nonexistent Haiku 5.5 entries
Anthropic’s current model list names Haiku 4.5, not 5.5, so requests using any of these new aliases will fail
AGENTS.md reference: AGENTS.md:L71-L71
Useful? React with 👍 / 👎.
|
| "input_cost_per_token_above_100k_tokens": 5e-07, | ||
| "output_cost_per_token_above_100k_tokens": 2.5e-06, | ||
| "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07, | ||
| "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06, | ||
| "cache_read_input_token_cost_above_100k_tokens": 5e-08 |
There was a problem hiding this comment.
For claude-haiku-5-5 prompts above 100K tokens, batch_cost_calculator still selects the flat _batches rates. It only finds higher batch prices through matching _above_100k_tokens_batches keys, which this entry lacks. Recorded batch costs therefore ignore the new fivefold tier. Add matching batch tier keys in both catalogs
Knowledge Base Used: Provider adapters and capabilities
| "output_cost_per_token_above_100k_tokens": 2.5e-06, | ||
| "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07, | ||
| "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06, | ||
| "cache_read_input_token_cost_above_100k_tokens": 5e-08 |
There was a problem hiding this comment.
Low: Missing long-context batch prices allow budget evasion
get_batch_cost_rates() selects only _above_*_tokens_batches tiers, so the new flat batch rates apply even above 100,000 input tokens. An authenticated user can submit a text-only batch item with 200,000 input and 1,000 output tokens that records $0.01025 against their key/team budget instead of the published $0.05125 cost, enabling repeated consumption beyond the actual budget. (platform.claude.com)
Add the long-context batch rates here and mirror them in litellm/model_prices_and_context_window_backup.json; cache modifiers also stack with the batch discount. (platform.claude.com)
| "cache_read_input_token_cost_above_100k_tokens": 5e-08 | |
| "cache_read_input_token_cost_above_100k_tokens": 5e-08, | |
| "input_cost_per_token_above_100k_tokens_batches": 2.5e-07, | |
| "output_cost_per_token_above_100k_tokens_batches": 1.25e-06, | |
| "cache_creation_input_token_cost_above_100k_tokens_batches": 3.125e-07, | |
| "cache_read_input_token_cost_above_100k_tokens_batches": 2.5e-08 |
PR overviewAdds claude-haiku-5-5 pricing to the model pricing and context-window configuration, including batch processing rates. One issue remains open: long-context batch usage is recorded at one-fifth of its published cost because the higher-tier batch rates are missing. Authenticated users can exploit this undercounting to consume more than their key or team budget should allow; no issues have been addressed yet. Open issues (1)
Fixed/addressed: 0 · PR risk: 5/10 |
Merging this PR will not alter performance
Comparing |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…schemas Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
bugbot run |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want reviews to match your repository better? Bugbot Learning can learn team-specific rules from PR activity. A team admin can enable Learning in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 208e6b1. Configure here.
| "supports_forced_tool_use": false, | ||
| "thinking_always_on": true, | ||
| "prompt_cache_min_tokens": 512, | ||
| "source": "https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonBedrockFoundationModels/current/index.json" |
There was a problem hiding this comment.
Missing 100K pricing on provider variants
High Severity
The 5x *_above_100k_tokens rates exist only on first-party claude-haiku-5-5. Every Bedrock, Azure, Vertex, and Perplexity variant bills the cheap base rate after 100K prompt tokens, so long-context usage is undercharged by 5x. The same long-context keys are already copied onto Bedrock for claude-sonnet-4-5.
Additional Locations (2)
Reviewed by Cursor Bugbot for commit 208e6b1. Configure here.
| "output_cost_per_token_above_100k_tokens": 2.5e-06, | ||
| "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07, | ||
| "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06, | ||
| "cache_read_input_token_cost_above_100k_tokens": 5e-08 |
There was a problem hiding this comment.
Rust catalog drops 100K pricing
Medium Severity
The new *_above_100k_tokens keys are allowlisted in the Python schema and tests, but litellm-rust ModelInfo only has typed 128k/200k/272k/512k fields. Serde silently drops the 100K rates, so the Rust cost path keeps first-party Haiku 5.5 on the cheap base tier.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 208e6b1. Configure here.
| "output_cost_per_token_above_100k_tokens": 2.5e-06, | ||
| "cache_creation_input_token_cost_above_100k_tokens": 6.25e-07, | ||
| "cache_creation_input_token_cost_above_1hr_above_100k_tokens": 1e-06, | ||
| "cache_read_input_token_cost_above_100k_tokens": 5e-08 |
There was a problem hiding this comment.
Missing 100K batch pricing rates
Medium Severity
First-party claude-haiku-5-5 has base batch rates at 50% of standard, but no *_above_100k_tokens_batches keys. Batch requests over 100K stay on the cheap batch rate instead of 50% of the 5x long-context tier. Sonnet 4.5 already ships the matching *_above_200k_tokens_batches fields.
Reviewed by Cursor Bugbot for commit 208e6b1. Configure here.
Takes the claude-haiku-5-5 and claude-haiku-5.5 cost map rows (Anthropic, Bedrock, Bedrock Mantle, Azure AI, Vertex AI, OpenRouter, Perplexity) from upstream v1.106.0-dev.2, along with the over-100k prompt tier fields and tests they need. The Vertex flag fix and the Azure integer prompt cache minimum come along with the rows. Upstream sources: 5cd1126 (BerriAI#45108), 46d440a (BerriAI#45151, haiku-related hunks only), d174c43 (BerriAI#45114), f0031e9 (BerriAI#45116). The rebased model info helper gets explicit kwargs for the four over-100k batch rates. The haiku config test calls the adaptive thinking helper on AnthropicModelInfo instead of the public alias that upstream added in a later refactor.
Takes the claude-haiku-5-5 and claude-haiku-5.5 cost map rows (Anthropic, Bedrock, Bedrock Mantle, Azure AI, Vertex AI, OpenRouter, Perplexity) from upstream v1.106.0-dev.2, along with the over-100k prompt tier fields and tests they need. The Vertex flag fix and the Azure integer prompt cache minimum come along with the rows. Upstream sources: 5cd1126 (BerriAI#45108), 46d440a (BerriAI#45151, haiku-related hunks only), d174c43 (BerriAI#45114), f0031e9 (BerriAI#45116). The rebased model info helper gets explicit kwargs for the four over-100k batch rates. The haiku config test calls the adaptive thinking helper on AnthropicModelInfo instead of the public alias that upstream added in a later refactor.
Takes the claude-haiku-5-5 and claude-haiku-5.5 cost map rows (Anthropic, Bedrock, Bedrock Mantle, Azure AI, Vertex AI, OpenRouter, Perplexity) from upstream v1.106.0-dev.2, along with the over-100k prompt tier fields and tests they need. The Vertex flag fix and the Azure integer prompt cache minimum come along with the rows. Upstream sources: 5cd1126 (BerriAI#45108), 46d440a (BerriAI#45151, haiku-related hunks only), d174c43 (BerriAI#45114), f0031e9 (BerriAI#45116). The rebased model info helper gets explicit kwargs for the four over-100k batch rates. The haiku config test calls the adaptive thinking helper on AnthropicModelInfo instead of the public alias that upstream added in a later refactor.
Backport of BerriAI#45108 to stable/1.103.x. Cherry-picked from 5cd1126 (main). Prerequisite for BerriAI#45151: adds the claude-haiku-5-5 entries that fix corrects. Cost-map conflicts resolved by appending the new entries; schema test lives under tests/test_litellm on this line. The cost-map schema and its schema test also allow cache_creation_input_token_cost_batches, cache_read_input_token_cost_batches and supports_anthropic_compaction, which these entries carry and main already allows.
Backport of BerriAI#45108 to stable/1.105.x. Cherry-picked from 5cd1126 (main). Prerequisite for BerriAI#45151: adds the claude-haiku-5-5 entries that fix corrects. Cost-map conflicts resolved by appending the new entries.


Summary
Add model pricing and context window configuration for claude-haiku-5-5 (Claude Haiku 5.5), announced on Anthropic's models docs page.
Pricing (verified from https://docs.anthropic.com/en/docs/about-claude/models)
Note: cache/batch/regional fields were derived from the existing
claude-sonnet-5-5variant set scaled to Haiku base rates (0.05x, matching the announced cache rates); the >100K-token tier is added on the first-partyclaude-haiku-5-5entry as*_above_100k_tokenskeys. Please verify per-provider (Bedrock/Vertex/Azure) rates before merge.Changes
model_prices_and_context_window.jsonandlitellm/model_prices_and_context_window_backup.jsonSource
https://docs.anthropic.com/en/docs/about-claude/models
Generated by
Viktor's model release pipeline — automated sub-10-minute model support.
Note
Low Risk
Changes are limited to model metadata, schema, and tests; incorrect per-provider rates could mis-estimate spend until verified, but no runtime logic paths are modified.
Overview
Adds Claude Haiku 5.5 (
claude-haiku-5-5) to LiteLLM’s model registry so routing, limits, capabilities, and cost estimation work across first-party Anthropic and hosted variants (Bedrock/Bedrock Mantle with regional IDs, Azure AI, Vertex AI, Perplexity).Each entry records 1M input / 128K output limits, reasoning/thinking flags (
thinking_always_on, adaptive thinking, xhigh effort), tool/vision/PDF/caching capabilities, and per-token plus prompt-cache pricing. The directclaude-haiku-5-5Anthropic entry also adds >100K prompt tier rates via new*_above_100k_tokenskeys (input, output, cache read/write).Registry plumbing is updated in parallel:
model_prices_and_context_window.schema.jsonandtests/unit/test_utils.pyaccept the new 100K-tier cost fields; the same model block is mirrored inlitellm/model_prices_and_context_window_backup.json.Reviewed by Cursor Bugbot for commit 208e6b1. Bugbot is set up for automated code reviews on this repo. Configure here.