Skip to main content
high impact

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
Google
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-flash
  • gemini-3.5-flash-lite
  • temperature
  • top_p
  • top_k
  • generation_config
  • GenerateContentConfig

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

Beforepython
generation_config = {
    "temperature": 0.7,
    "top_p": 0.9,
    "top_k": 40,
}
Afterpython
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.

Official source 1 · verified July 26, 2026Using the latest Gemini models — API changes

Google · Official documentation

Official source 2 · verified July 26, 2026Gemini API release notes — July 21, 2026

Google · Official documentation