Because Google deprecated it. On 21 July 2026 the Gemini API deprecated the three sampling parameters — temperature, top_p and top_k — and Google’s own migration checklist for its newest model now tells you to delete them from your code, one of several 2026 changes collected on every Google AI tool in 2026.Google, Gemini API release notes, entry dated 21 July 2026, read in a browser 16 Sep 2026 (the docs refuse automated fetches): “Deprecated parameters: The sampling parameters temperature, top_p and top_k are now deprecated.”
The knob is gone on purpose. Gemini 3.x is tuned to run at its defaults, and Google now asks you to remove the parameters rather than tune them.
- Deprecated on 21 July 2026. That is Google’s word, in its own release notes.
- The migration instruction is blunt. Google: “Strip temperature, top_p, and top_k from generation configs.”
- Google warns against tuning them on 3.x — it says changing them can cause looping or degraded performance.
- The replacement knob is reasoning effort, set with
thinking_level, not randomness. - Everything else moves into the prompt. Ask for the variation or the strictness you want in words.
What changed, and when?
Google shipped two new Flash models on 21 July 2026. The same release-notes entry deprecated the sampling parameters. Nothing was announced as removed on that date; deprecation is the announcement that support is ending.Google, Gemini deprecations, read in a browser 16 Sep 2026: “A ‘deprecation’ is the announcement that we no longer provide support for a model, and that it will be ‘shut down’ in the near future.” That page tracks models; no shutdown date for the parameters was found on it.
| Parameter | Status |
|---|---|
temperature — randomness of word choice | Deprecated |
top_p — cut-off by cumulative probability | Deprecated |
top_k — cut-off by rank | Deprecated |
thinking_level — how much reasoning effort to spend | Use this |
If your code still sets a temperature on Gemini, it is carrying a parameter Google has told you to remove. That is a five-minute cleanup, not a redesign.
Do the parameters still do anything?
Google’s prompt-design page still documents them — and, in the same breath, tells you to leave them alone: “Although you can modify these parameters, we strongly recommend keeping them at their default values for Gemini 3.x models.” It goes further about what happens if you do not: changing them “can cause unexpected behavior, such as looping or degraded performance, particularly in complex mathematical or reasoning tasks”.Google, Prompt design strategies, read in a browser 16 Sep 2026.
So the honest answer is: the documentation still describes the parameters, the release notes deprecate them, and the migration guide says to delete them. This page did not test whether an API call that still sets a temperature fails, warns, or is silently ignored — so it does not say.
What should you use instead?
Google’s checklist for moving to Gemini 3.8 Flash lists the swap directly: “Remove deprecated sampling parameters: Strip temperature, top_p, and top_k from generation configs. Replace thinking_budget with the string enum thinking_level.” It also notes that minimal is not a supported level on 3.8 Flash, and that candidate_count is unsupported from Gemini 3 onwards.Google, What’s new in Gemini 3.8 Flash, migration checklist, read in a browser 16 Sep 2026.
The control you have left is the prompt. Where you used to raise the temperature for variety, ask for variety — “give me four options, each with a different structure”. Where you used to lower it for consistency, say what must not change, give an example of the output you want, and state the format.Reasoning: that paragraph is this site’s practice as of 16 Sep 2026, not Google guidance. The vendors’ own prompting rules are collected on the LLM cheat sheet.
temperature for varietytop_p and top_k — deprecated on 21 July 2026thinking_levelthinking_level come from Google’s release notes and migration checklist, cited above.Randomness used to be a dial. On Gemini 3.x it is a sentence: ask for the variation you want, or for the constraint you want held.
Does this apply to other AI models?
No — this is a change to Google’s Gemini API. Other vendors’ parameters were not re-checked for this page, so nothing here should be read as describing them. If you run the same code against several vendors, treat Gemini as the one that no longer wants the setting.
What this page could not verify
- Whether a call that still sets
temperatureerrors, warns or is ignored. Google gives a deprecation notice and a migration instruction, not an error contract. - A removal date. The deprecations page tracks model shutdowns; no shutdown date for these parameters was found there.
- Behaviour on Gemini 2.x models. The recommendation to keep defaults is written for 3.x.
Google, Gemini API release notes (21 July 2026 entry) · What’s new in Gemini 3.8 Flash · Prompt design strategies · Gemini deprecations. All read in a browser on 16 September 2026, because these pages refuse automated fetches.
Model versions and vendor documentation both move. Re-read the source before relying on a specific date.