Gemini deprecates temperature, top_p, and top_k
Gemini 3.6 Flash and 3.5 Flash-Lite ignore the sampling parameters; Google says future model generations will return HTTP 400 when they are supplied.
- Provider
- Surface
- Gemini API
- Change type
- parameter deprecation
- Effective
- Announced
- Last verified
What breaks
Applications can silently lose sampling control now and later begin failing if shared generation configs continue to include these fields.
- Gemini 3.6 Flash and Gemini 3.5 Flash-Lite ignore temperature, top_p, and top_k.
- Google says future model generations will return HTTP 400 when these parameters are supplied.
Affected identifiers and fields
Search your code, environment variables, gateway configuration, and stored request templates for these exact values.
gemini-3.6-flashgemini-3.5-flash-lite
temperaturetop_ptop_kgeneration_configGenerateContentConfig
Migration target
Remove the sampling parameters and use explicit system instructions to guide deterministic behavior.
No replacement identifier is required for this change.
What to do
Strip temperature, top_p, and top_k from Gemini requests and encode response constraints in a clear system instruction.
Before and after
generation_config = {
"temperature": 0.7,
"top_p": 0.9,
"top_k": 40,
}generation_config = {}
system_instruction = (
"Follow the requested format exactly and do not add introductory text."
)Official source receipts
These provider pages support the dates, identifiers, symptoms, and migration direction recorded above.
Google · Official documentation
Google · Official documentation