Repository navigation
fix(model-registry): add gpt-5.1-mini/nano and fix azure/gpt-5.4 family reasoning effort flags - #28701
fix(model-registry): add gpt-5.1-mini/nano and fix azure/gpt-5.4 family reasoning effort flags#28701mohamedelhabib wants to merge 2 commits into
Conversation
…ly reasoning effort flags - Add gpt-5.1-mini and gpt-5.1-nano entries with supports_none_reasoning_effort=true, matching the gpt-5.1 family contract (xhigh=false, minimal=true). These models were absent from the registry causing a spurious 400 UnsupportedParamsError for any temperature != 1 even when reasoning_effort was omitted. - Fix azure/gpt-5.4 and azure/gpt-5.4-2026-03-05: missing all three flags, now set to none=true/xhigh=true/minimal=true (aligned with azure_ai/gpt-5.4). - Fix azure/gpt-5.4-mini, azure/gpt-5.4-mini-2026-03-17, azure/gpt-5.4-nano, azure/gpt-5.4-nano-2026-03-17: had none=false/xhigh=false explicitly, now none=true/xhigh=true/minimal=false (aligned with azure_ai counterparts). - Mirror all changes to model_prices_and_context_window_backup.json. Fixes: BerriAI#27351 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Greptile SummaryThis PR fixes two classes of missing/incorrect reasoning-effort capability flags in the model registry and adds the corresponding regression tests. Both JSON files (primary and backup) are updated in sync.
Confidence Score: 5/5Safe to merge — the changes are additive registry corrections with no logic changes, and the flag values were verified against the azure_ai counterparts. All changes are confined to two JSON registry files and two test files. The reasoning-effort flag corrections align with the existing azure_ai entries, the new gpt-5.1-mini/nano entries use distinct and realistic pricing, both JSON files are kept in sync, and the tests exercise the exact code paths fixed by the registry updates. No files require special attention.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds gpt-5.1-mini and gpt-5.1-nano registry entries with correct reasoning-effort flags; fixes azure/gpt-5.4 (missing flags) and azure/gpt-5.4-mini/nano (false→true) to align with azure_ai counterparts. |
| litellm/model_prices_and_context_window_backup.json | Mirrors all changes from the primary JSON exactly — reasoning-effort flag updates and new model entries are consistent between the two files. |
| tests/test_litellm/llms/openai/test_gpt5_transformation.py | New parametrised tests cover gpt-5.1-mini/nano: none-effort flag check, temperature pass-through, explicit none+temperature, rejection of high-effort with non-1 temperature, and openai/-prefixed normalisation. |
| tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py | Adds use_local_model_cost_map autouse fixture (without the problematic add_known_models call) and four new parametrised test groups covering azure/gpt-5.4, gpt-5.4-mini, and gpt-5.4-nano reasoning-effort and temperature behaviour. |
Reviews (4): Last reviewed commit: "fix(model-registry): use proportional pr..." | Re-trigger Greptile
Greptile SummaryThis PR fixes missing and incorrect reasoning-effort capability flags in the model registry for the gpt-5.1 and gpt-5.4 families. It adds new
Confidence Score: 3/5The reasoning-effort flag corrections are correct and well-tested, but the new gpt-5.1-mini and gpt-5.1-nano entries carry pricing values copied verbatim from the base gpt-5.1 model, making both variants cost the same as the full model and the same as each other. The flag corrections for azure/gpt-5.4* variants and the missing registry entries for gpt-5.1-mini/nano are sound. However, gpt-5.1-mini and gpt-5.1-nano were assigned identical token costs to gpt-5.1, and identical costs to each other — which is inconsistent with how every other mini/nano pair in the registry is priced. If these prices go live, every cost estimate for these two models will be wrong until a follow-up corrects them. model_prices_and_context_window.json and litellm/model_prices_and_context_window_backup.json — specifically the pricing fields of the new gpt-5.1-mini and gpt-5.1-nano entries.
|
| Filename | Overview |
|---|---|
| model_prices_and_context_window.json | Adds gpt-5.1-mini and gpt-5.1-nano registry entries and fixes reasoning-effort flags for azure/gpt-5.4 family; new mini/nano entries carry identical pricing to the base gpt-5.1 model, which is likely incorrect. |
| litellm/model_prices_and_context_window_backup.json | Mirror of the main JSON changes; carries the same pricing inconsistency for gpt-5.1-mini and gpt-5.1-nano. |
| tests/test_litellm/llms/azure/chat/test_azure_gpt5_transformation.py | Adds autouse fixture to load local model cost map and new regression tests for azure/gpt-5.4 variants; autouse fixture calls add_known_models with a side-effect not cleaned up by monkeypatch. |
| tests/test_litellm/llms/openai/test_gpt5_transformation.py | Adds well-structured regression tests covering gpt-5.1-mini and gpt-5.1-nano temperature and reasoning_effort behavior; no issues found. |
Reviews (2): Last reviewed commit: "fix(model-registry): add gpt-5.1-mini/na..." | Re-trigger Greptile
…drop add_known_models side-effect
- gpt-5.1-mini and gpt-5.1-nano were priced identically to the base gpt-5.1 model.
Apply the same ~30% (mini) and ~8% (nano) ratios used by the gpt-5.4 family:
gpt-5.1-mini: input 3.75e-07, output 3e-06 (was 1.25e-06 / 1e-05)
gpt-5.1-nano: input 1e-07, output 8e-07 (was 1.25e-06 / 1e-05)
Note: official OpenAI pricing for these aliases is not yet published; values
are proportional estimates and will be updated when pricing is confirmed.
- Remove litellm.add_known_models() call from the Azure test autouse fixture —
it mutates module-level sets (open_ai_chat_completion_models, etc.) that
monkeypatch does not roll back, creating hidden test-ordering dependencies.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@greptile-apps all feedbacks fixed |
|
@greptile-apps all feedbacks fixed check the latest commit |
|
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
|
Superseded by rolling registry audit #37902, which reverified and absorbed the provider-documented metadata changes at field level |
Fixes: #27351
Relevant issues
Linear ticket
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/test_litellm/directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit@greptileaiand received a Confidence Score of at least 4/5 before requesting a maintainer reviewDelays in PR merge?
If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).
CI (LiteLLM team)
Branch creation CI run
Link:
CI run for the last commit
Link:
Merge / cherry-pick CI run
Links:
Screenshots / Proof of Fix
Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes