Repository navigation
fix(azure): correct azure_ai/claude-haiku-5-5 forced tool use and thinking flags - #45114
Conversation
|
|
|
| "cache_read_input_token_cost_above_100k_tokens": 5e-08, | ||
| "deprecation_date": "2027-09-29", | ||
| "input_cost_per_token": 1e-07, | ||
| "input_cost_per_token_above_100k_tokens": 5e-07, |
There was a problem hiding this comment.
New prices lack required tests
This row adds a 100k boundary and separate cache prices without focused tests. AGENTS.md requires meaningful tests for new features. Before merging, add an Azure cost test covering the boundary and cache tiers, using catalog-derived rates rather than fixed vendor prices
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
There was a problem hiding this comment.
Data only cost map row, read by the existing abovek_tokens path in _get_token_base_cost; CLAUDE.md says tests must never pin vendor prices we do not own
There was a problem hiding this comment.
You're right: this is a catalog-only addition, and a test asserting vendor rates would violate the repository rule. I’m withdrawing the request.
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 6e99841. Configure here.
6e99841 to
c10c9ae
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
c10c9ae to
6e7e5fc
Compare
…nking flags Price-Sync: litellm-providers
6e7e5fc to
9d7a3f6
Compare
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.

TLDR
Problem this solves:
azure_ai/claude-haiku-5-5, added as a base-only row in feat(model_prices): add claude-haiku-5-5 model pricing #45108, carries two capability flags that Anthropic's Haiku 5.5 docs contradict:supports_forced_tool_usefalse andthinking_always_ontrueHow it solves it:
supports_forced_tool_useto true andthinking_always_onto false onazure_ai/claude-haiku-5-5, and pointssourceat the Anthropic migration guide that states bothRow evidence
azure_ai/claude-haiku-5-5, kind page, both quotes fetched raw with curl:supports_forced_tool_usetrue: https://platform.claude.com/docs/en/models/haiku-5-5/migration-guide "Claude Haiku 5.5 accepts a forced tool_choice ( any or a named tool), but the response starts with the tool call and has no thinking block"thinking_always_onfalse: https://platform.claude.com/docs/en/models/haiku-5-5/whats-new-haiku-5-5 "While you can still turn thinking off with thinking: {"type": "disabled"} at high effort or below"Every other field on the row already matches the sourced values (prices, cache prices, 1M/128K limits,
deprecation_date2027-09-29 from the Azure list API, the rest of the flags), so nothing else changes. The over 100k prompt price tier is left out under ruling azure-claude-haiku-5-5-drop-above-100k, so the row keeps base prices onlyChanged pricing pages
The black-forest-labs, fireworks, kimi and llama Azure pricing pages changed, but every price they state matches the catalog, so no row changes.
azure_ai/flux.2-prostays as is under ruling azure-flux-2-pro-megapixel-leave-unchangedDelisted by the provider
No exact retirement date was found on the Azure retirement schedule or retired models page for: azure/computer-use-preview, azure/container, azure/gpt-3.5-turbo, azure/gpt-3.5-turbo-instruct-0914, azure/gpt-35-turbo, azure/gpt-35-turbo-instruct, azure/gpt-35-turbo-instruct-0914, azure/gpt-4-0125-preview, azure/gpt-4-1106-preview, azure/gpt-4-turbo, azure/gpt-4-turbo-vision-preview, azure/gpt-5.2-pro, azure/gpt-5.5-pro, azure/gpt-5.6, azure/o1-mini, azure/sora-2-pro, azure/sora-2-pro-high-res. azure/mistral-large-2402 and azure/mistral-large-latest stay undated under ruling azure-mistral-large-conflicting-retirement-stay-undated. The other delisted ids already carry a
deprecation_datePre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
uv run pytest tests/test_litellm/<your_test_file>.py -v. Leave the suites (make test-unit-*,make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more@greptileaito re-request a review after pushing changes)Screenshots / Proof of Fix
Data only change to two capability flags. No completion call was made; the values rest on the quoted Anthropic pages
Note
Low Risk
Catalog-only flag and documentation URL updates with no runtime logic changes.
Overview
Corrects capability metadata for
azure_ai/claude-haiku-5-5inmodel_prices_and_context_window.jsonand its backup so LiteLLM matches Anthropic’s Haiku 5.5 behavior.supports_forced_tool_useis set fromfalsetotrue, andthinking_always_onfromtruetofalse. The row’ssourcenow points at the Haiku 5.5 migration guide instead of the Azure management API list URL. No pricing, context limits, or other flags on the row change.Reviewed by Cursor Bugbot for commit 9d7a3f6. Bugbot is set up for automated code reviews on this repo. Configure here.