litellm/tests/test_litellm/llms/azure
Tin Chi Lo e5c3df2da2 fix(gpt-5): resolve temperature support from the model's default reasoning effort
A gpt-5 model accepts a non-default temperature only while its effective reasoning
effort resolves to "none". litellm had no representation of the effort a model applies
when the request omits reasoning_effort, so it substituted supports_none_reasoning_effort,
which is a different fact. Every model that supports "none" without defaulting to it
therefore had temperature forwarded and rejected upstream, and because the carve-out
returned before the drop_params branch, drop_params: true could not save it.

Declare the fact instead. A new cost-map key, default_reasoning_effort, states the effort
the provider applies when the request omits one, and one shared predicate resolves the
effective effort from it: an explicit reasoning_effort wins, otherwise the declared
default, otherwise the catalogue decides.

That last step matters because the cost map is fetched from the published branch at import
time, so it can be OLDER than the code reading it. On such a map every model looks
undeclared, and reading that as "reasoning is active" would strip temperature from the 39
gpt-5.1/5.2/5.4 entries that accept it, a regression caused by data lag rather than by
anything about the model. So an absent declaration is only meaningful once the catalogue
carries the key at all; a map that predates the feature keeps the answer litellm gave
before it existed, and the conservative answer applies from the moment the data lands.

The top_p/logprobs/top_logprobs gate carried the same assumption spelled differently and
now shares the predicate, as does the Responses API, which reimplemented the rule and is
what the default /v1/messages bridge routes openai models through. Azure normalises its
routing names in one resolver that every capability lookup goes through, which replaces
its bespoke per-lookup rewrite.

Declared on the 37 gpt-5.1/5.2/5.4 entries measured to accept temperature=0 today, so
their behaviour is unchanged. The 23 gpt-5.5/5.6 entries that reject it stay undeclared
and are fixed once the catalogue carries the key.

Resolves LIT-3797
Resolves LIT-5028
2026-08-27 18:46:18 -07:00
..
batches test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
chat fix(gpt-5): resolve temperature support from the model's default reasoning effort 2026-08-27 18:46:18 -07:00
image_edit Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
image_generation test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
passthrough test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
realtime refactor(azure/realtime): keep auth header build within lint budgets after merge 2026-08-25 17:32:21 +00:00
response test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
search fix(azure/search): reject bool and non-positive max_results for bing_grounding count 2026-08-24 12:53:44 -07:00
text_to_speech style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
videos test(lint): ban blind pytest.raises(Exception) with ruff B017 (#37731) 2026-08-20 18:09:42 -07:00
test_azure_common_utils.py Merge pull request #35415 from BerriAI/litellm_azure_ai_entra_auth 2026-08-24 11:54:48 -07:00
test_azure_cost_calculation.py fix(cost): pass service_tier through azure and azure_ai cost calculation (#24926) 2026-05-01 17:26:45 +05:30
test_azure_embedding.py test: run the 30 test files stranded in the second mirror (#37595) 2026-08-20 10:59:43 -07:00
test_azure_exception_mapping.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_azure_fine_tuning_api.py refactor: refactor testing 2026-03-28 18:39:32 -07:00
test_azure_speech_audio_transcription.py feat(azure): add speech transcription config support (#27482) 2026-05-23 12:16:01 -07:00