litellm/tests/integration/translation/messages
Sukhdeep 87478c7b6d
fix(gemini): do not inject temperature for Gemini 3+ models when omitted (#45107)
* fix(gemini): do not inject temperature for Gemini 3+ models when omitted

map_openai_params added temperature=1.0 to every Gemini 3+ request that did not set one, on both the gemini and vertex_ai routes. Google is deprecating temperature, top_p and top_k for Gemini 3+ and says upcoming models will reject them, so this default turns a request that never set temperature into one that will fail

An omitted temperature now falls back to Google's own default, which their docs give as 1.0 for all Gemini 3 models. Explicit temperature, top_p and top_k are still forwarded

Fixes #38663

* test(gemini): annotate sampling regression tests

* test(gemini): drop the injected temperature from Gemini translation cases

The nine Gemini base cases for chat completions, responses and messages send no temperature, so the provider request no longer carries the removed 1.0 default. Each new body was sent to the real Gemini API for gemini-3.5-flash, gemini-3.8-flash and gemini-3.1-pro-preview and returned 200, and the stored provider responses are unchanged

* test(gemini): drop the default-temperature wording from the thinking level test docstring

* test(gemini): cover omitted and explicit sampling on both Gemini routes

---------

Co-authored-by: mateo-berri <277851410+mateo-berri@users.noreply.github.com>
2026-10-12 20:26:49 +00:00
..
bases fix(gemini): do not inject temperature for Gemini 3+ models when omitted (#45107) 2026-10-12 20:26:49 +00:00
basic feat(bedrock): default Grok on Bedrock to native Chat Completions, mint unique tool call ids and drop stop (#45473) 2026-10-09 20:56:03 +00:00
reasoning test(integration): rename translation runner run to assert_translation (#44741) 2026-10-06 01:08:44 +00:00
sampling fix(gemini): do not inject temperature for Gemini 3+ models when omitted (#45107) 2026-10-12 20:26:49 +00:00
tool_search fix(bedrock): keep tool_reference results as text on converse (#44590) 2026-10-09 17:52:17 -07:00
tool_use feat(bedrock): default Grok on Bedrock to native Chat Completions, mint unique tool call ids and drop stop (#45473) 2026-10-09 20:56:03 +00:00
__init__.py test(integration): exact four-part translation cases on a shared fake provider and shared YAML deployment (#44451) 2026-10-04 00:09:58 +00:00