Google deprecates temperature, top_p, and top_k sampling parameters on newest Gemini models
Google has deprecated the temperature, top_p, and top_k sampling parameters on its newest Gemini models, telling developers to strip them from every request now or risk outright failures once the deprecation becomes a hard error.
What's new
Google's own Gemini API documentation states: "Sampling parameter deprecation: temperature, top_p, and top_k are deprecated. The API ignores these parameters and returns an error in future model generations." The change applies starting with Gemini 3.6 Flash and Gemini 3.5 Flash-Lite, and to all future Gemini model releases. For now, the API silently ignores the three parameters if supplied; the documentation warns that in future model generations, supplying them will return an HTTP 400 error, so Google's guidance is blunt: "Remove these parameters from all requests." A second, related change removes support for prefilling model turns — if the last non-empty turn in a request is a model turn, the API now returns a 400 error. In place of manual sampling controls, Google's recommended path is to define an explicit system instruction for the desired behavior: "To improve determinism, define a system instruction with explicit rules for your specific use case."
Context
The deprecation notice is dated July 21, the same day Google released Gemini 3.6 Flash, Gemini 3.5 Flash-Lite, and a limited-access Gemini 3.5 Flash Cyber for security teams — already covered as a model release. This item covers the separate API contract break every developer migrating to those models has to handle, distinct from the models' new capabilities themselves.
Why it matters
temperature, top_p, and top_k have been near-universal levers for controlling LLM output randomness since the early GPT-era APIs, and are baked into countless agent frameworks, eval harnesses, and application code as a default way to tune determinism versus creativity. Google removing direct control over them — in favor of steering behavior through system instructions instead — signals that Gemini's reasoning-oriented models are increasingly managing their own sampling internally rather than exposing it as a raw knob, and it hands every team building on Gemini a concrete, dated migration task before the silent-ignore behavior turns into a hard failure.
Corroborating sources
- Ai.google
https://ai.google.dev/gemini-api/docs/latest-model
“Sampling parameter deprecation: `temperature`, `top_p`, and `top_k` are deprecated. The API ignores these parameters and returns an error in future model generations.”