ONLINEAGENT_OPS 2026.Q3 HOME HUBSMODELSBUILDINGCOMPANIESFILMMAKINGSECURITYLIVING WITH ITSKILLSALL HUBS, ONE TERMINAL → ARTICLES CRAFT RECORD BLOG TOOLS SKILLS SEARCH /
HOME›ARTICLES›GEMINI TEMPERATURE SETTING DEPRECATED: WHAT CHANGED
ARTICLES · EXPLAINERBEGINNER

Gemini Temperature Setting Deprecated: What Changed

Google deprecated temperature, top_p and top_k in the Gemini API on 21 July 2026 and tells developers to strip them. What replaced them, and what still works.

READ6 min
WORDS1,141
SECTIONS6
TYPEEXPLAINER
CHECKED16 SEP 26

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 newer models now tells you to delete them from your code, one of several 2026 changes collected on every Google AI tool in 2026.1

TL;DR — THE SHORT VERSION

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: “Remove deprecated sampling parameters (temperature, top_p, top_k)”.
  • 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.2

The three parameters, and what Google now says about each
ParameterStatus
temperature — randomness of word choiceDeprecated
top_p — cut-off by cumulative probabilityDeprecated
top_k — cut-off by rankDeprecated
thinking_level — how much reasoning effort to spendUse this
TAKEAWAY

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”.3

So the honest answer is: the documentation still describes the parameters, the release notes deprecate them, and the migration guide says to delete them. Google’s current docs now say what happens on its newer models; see the next section.

Which sampling settings does Gemini 3 accept?

The plain point: it depends on which Gemini 3. Google’s docs, read on 3 Nov 2026, say Gemini 3.6 and newer (and Gemini 4) take temperature, top_p and top_k in a request but ignore the values; for earlier Gemini 3 models Google asks you to keep them at their defaults.

GEMINI SAMPLING SETTINGS · WHAT GOOGLE’S DOCS SAY (READ AT SOURCE 3 NOV 2026)
Modelstemperature, top_p, top_kWhat Google says
Gemini 4 and Gemini 3.6 and newerIgnored. Deprecated.Custom values are ignored and the API returns deprecation warning headers. Google says it will return 400 errors in a future release. No date is given.
Earlier Gemini 3 modelsLeave at defaults.“keep these parameters at their default values to avoid degraded reasoning performance.”
Gemini 2.5 and olderNot stated for these.The page says the three settings “control how earlier models generate responses” and does not list which.

Two Google pages agree on the newer models. The prompt-design page says Gemini 4 and Gemini 3.6+ “ignore custom values for temperature, top_p, and top_k” and tells you to “Remove temperature, top_p, and top_k from your request configurations.”4 The migration checklist for Gemini 4 Argon says the same, in fewer words: “If provided, they are ignored.”5

The release notes carry the original notice: on 21 July 2026 “The sampling parameters temperature, top_p and top_k are now deprecated.” Gemini 3.6 Flash became generally available the same day, and Gemini 4 Argon followed on 13 October 2026. No later entry changes the status of the three settings.6

Google’s documentation has also moved. First-hand, 3 Nov 2026: the ai.google.dev/gemini-api/docs addresses cited elsewhere on this page now answer with a permanent redirect (HTTP 301) to aistudio.google.com/docs. The 13 Oct quotes above were taken from the old addresses and are kept as they were read.

TAKEAWAY

On the newest Gemini models, setting a temperature does nothing. On earlier Gemini 3 models Google asks you to keep the defaults.

What should you use instead?

Google’s checklist for moving to Gemini 3.8 Flash lists the swap directly: “Remove deprecated sampling parameters (temperature, top_p, top_k)”, and “Replace thinking_budget with the string enum thinking_level.” It also notes that minimal is not supported on 3.8 Flash, and lists candidate_count as “unsupported in Gemini 3 and later”.7

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.

RANDOMNESS · FROM A DIAL TO A SENTENCE
The same two intentions, set the old way and the way this page suggests on Gemini 3.x.
THE OLD WAY · SAMPLING PARAMETERS
No: Raise temperature for variety
No: Lower it for consistency
No: Tune top_p and top_k — deprecated on 21 July 2026
ON GEMINI 3.X · IN THE PROMPT
Yes: Ask for variety in words: “give me four options, each with a different structure”
Yes: For consistency, say what must not change, give an example of the output, and state the format
Yes: Set reasoning effort with thinking_level
Reasoning — summarises this page’s section on what to use instead, which is this site’s practice as of 16 Sep 2026, not Google guidance. The deprecation date and thinking_level come from Google’s release notes and migration checklist, cited above.
TAKEAWAY

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?

The deprecation itself is Google’s, in its Gemini API. But Google is not alone in moving away from the dial: Anthropic’s developer docs say the same three parameters are not supported on Claude 4.7 and later models and Claude Mythos Preview, and that a request setting one of them to anything but the default is refused with an error.8 Other vendors’ parameters were not re-checked for this page. If you run the same code against several vendors, check each vendor’s own docs before keeping the setting.

What this page could not verify

  • Whether a call that still sets temperature errors, warns or is ignored on every model. For Gemini 4 and Gemini 3.6+, Google says ignored, with warning headers and 400 errors in a future release (see above). It does not say the same for earlier models. This page ran no test call.
  • 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.
SOURCES
  1. 1Google, Gemini API release notes, entry dated 21 July 2026, re-read directly at source 13 Oct 2026“Deprecated parameters: The sampling parameters temperature, top_p and top_k are now deprecated.” ↑
  2. 2Google, Gemini deprecations, re-read directly at source 13 Oct 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. ↑
  3. 3Google, Prompt design strategies, re-read directly at source 13 Oct 2026.↑
  4. 4Google AI Studio docs, Prompt design strategies, undated, read at source 3 Nov 2026, note under “Experiment with model parameters”: “Gemini 4 and Gemini 3.6+ models ignore custom values for temperature, top_p, and top_k” and “return deprecation warning headers (and will return 400 errors in a future release).” “Remove temperature, top_p, and top_k from your request configurations.” “For earlier Gemini 3 models, keep these parameters at their default values to avoid degraded reasoning performance.”↑
  5. 5Google AI Studio docs, Gemini 4 Argon migration page, undated, read at source 3 Nov 2026, checklist“Remove temperature, top_p, and top_k from your requests. If provided, they are ignored.” ↑
  6. 6Google AI Studio docs, Gemini API changelog, read at source 3 Nov 202621 July 2026, “The sampling parameters temperature, top_p and top_k are now deprecated.” 21 July 2026, “Gemini 3.6 Flash and Gemini 3.5 Flash-Lite generally available (GA)”. 13 October 2026, “Gemini 4 Argon (gemini-4-argon) generally available (GA)”. A 2 November 2026 entry on retiring Gemini 2.5 Pro and 2.5 Flash lists “removed sampling parameters” among the breaking changes of moving to the new models; it does not name which parameters. ↑
  7. 7Google, What’s new in Gemini 3.8 Flash, migration checklist, re-read directly at source 13 Oct 2026. On 16 Sep 2026 (read in a browser) the checklist read “Remove deprecated sampling parameters: Strip temperature, top_p, and top_k from generation configs.”; this page now quotes the current wording.↑
  8. 8Anthropic, Using the Messages API, undated documentation, read at source 5 Oct 2026“The temperature, top_p, and top_k sampling parameters are not supported on Claude 4.7 and later models and Claude Mythos Preview. Setting them to a non-default value returns a 400 error. Omit them from request payloads and use prompting to guide the model’s behavior instead.” ↑

Google, Gemini API release notes (21 July 2026 entry) · What’s new in Gemini 3.8 Flash · Prompt design strategies · Gemini deprecations. All four were first read in a browser on 16 September 2026, when they refused automated fetches, and re-read directly at source on 13 October 2026.

Model versions and vendor documentation both move. Re-read the source before relying on a specific date.

Free printable AI cheat sheets, and AI news every week.

Sixteen one-page AI guides and checklists in one free PDF, no sign-up. And if you want to keep up, the newsletter covers what changed in AI each week, in plain English, with the sources.

SUBSCRIBE FREE ↗ GET THE CHEAT SHEET PACK
aipromptgeneer://$ about this siteAI PROMPT GENEERAI explained in plain English. Every claim links to its source, with the date it was checked.NEWSLETTERWhat changed in AI each week, in plain English.SUBSCRIBE FREE ↗AI PROMPT GENEER · MACHINE ASSISTANCE DISCLOSEDEVERY ARTICLE CARRIES ITS OWN CHECKED DATE