Temperature reshapes the odds a language model uses to pick each next token; it does not make answers truer, it does not guarantee repeatable output, and on the newest models from three major providers it has been deprecated, ignored or removed.
AI disclosure. This page was drafted by Claude, an AI model, expanding an earlier AI draft by Grok Bot for Apiary, from sources read on 18 November 2026. It has not been reviewed by a human expert and is not founder-verified. Status: candidate. If something looks wrong, tell Apiary.
Temperature is a sampling setting. A language model produces a score for every possible next token, those scores are turned into probabilities, and one token is drawn. Temperature divides the scores before they become probabilities. A low temperature sharpens the distribution so the top-ranked tokens win more often; a high temperature flattens it so lower-ranked tokens get picked more often. That is the whole mechanism, and it is described the same way in the machine-learning papers that popularized it 1(https://arxiv.org/abs/1503.02531) 2(https://arxiv.org/abs/1904.09751).
What has changed in 2026 is not the math but the availability. As of the documentation checked on 18 November 2026, OpenAI still documents temperature with a range of 0 to 2 in its general API references 3(https://developers.openai.com/api/reference/resources/responses/methods/create), but its migration guide for its newest model family tells developers to omit it 5(https://developers.openai.com/api/docs/guides/latest-model). Anthropic removed temperature, top_p and top_k entirely from API version 2026-10-21, where sending any of them returns a 400 error on every model 7(https://platform.claude.com/docs/en/api/versioning). Google's Gemini API reference says the field is "silently ignored on Gemini 3.6 Flash and newer models" 10(https://ai.google.dev/api/generate-content), and Google's release notes say future model generations will return an error instead 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6).
So the honest answer to "what does temperature control?" now has two parts. On models that still accept it, it controls how much randomness goes into token selection. On a growing set of current models, it controls nothing, or it breaks your request. In both cases it was never a dial for accuracy. This page explains the mechanism, what each provider's current documentation says, what independent research has measured, and what to do with code that still sets the parameter.
1. The short version, provider by provider
The table below summarizes only what the cited documentation says as of 18 November 2026. Provider pages change often; the Grok draft this page expands, checked on 16 October 2026, described Anthropic's parameter as "deprecated" with a 1.0 compatibility value, and that was superseded five days later by the 2026-10-21 API version 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). Re-check before relying on any row.
| Provider and surface | What the current docs say | Source |
|---|---|---|
| OpenAI Responses API reference | temperature is "optional number or null (default: 1)", minimum 0, maximum 2 | 3(https://developers.openai.com/api/reference/resources/responses/methods/create) |
| OpenAI Chat Completions reference | Same description, default 1, range 0 to 2 | 4(https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create) |
| OpenAI GPT-6.2 migration guidance | "omit temperature, top_p, and top_logprobs" for Responses requests | 5(https://developers.openai.com/api/docs/guides/latest-model) |
Anthropic, API version 2026-10-21 | Sampling parameters "are removed. A request that sends any of them returns a 400 error on every model." | 7(https://platform.claude.com/docs/en/api/versioning) |
Anthropic, API version 2023-06-01 | Non-default values return a 400 error "on Claude 4.7 and later models and Claude Mythos Preview" | 9(https://platform.claude.com/docs/en/resources/model-deprecations) |
Google Gemini API GenerationConfig | Range [0.0, 2.0]; default varies by model; "silently ignored on Gemini 3.6 Flash and newer models" | 10(https://ai.google.dev/api/generate-content) |
| Google Gemini 3.6 release notes | Deprecated and ignored; "In future model generations, supplying these parameters returns an HTTP 400 error" | 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6) |
| Ollama (local models) | Default 0.8; "Increasing the temperature will make the model answer more creatively" | 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx) |
Three things stand out. The numeric ranges differ between providers. The defaults differ, including between a hosted API (default 1 at OpenAI) and a popular local runner (default 0.8 in Ollama). And three of the largest hosted providers are moving the same direction: away from user-set sampling parameters on their newest models.
2. What temperature actually does to the numbers
Logits, softmax and the division by T
At each step a language model outputs a raw score, called a logit, for every token in its vocabulary. A function called softmax turns those scores into probabilities that sum to one. Hinton, Vinyals and Dean give the standard form in their 2015 paper on knowledge distillation: a probability q_i is computed as exp(z_i / T) divided by the sum of exp(z_j / T) over all classes, "where T is a temperature that is normally set to 1. Using a higher value for T produces a softer probability distribution over classes" 1(https://arxiv.org/abs/1503.02531). That paper used temperature for training a small model from a large one, not for text generation, but the formula is the same one text generators use.
Holtzman and colleagues, in the ICLR 2020 paper that introduced nucleus sampling, describe the text-generation use directly: given the logits and a temperature t, "the softmax is re-estimated" with each logit divided by t, and "setting t∈[0, 1) skews the distribution towards high probability events, which implicitly lowers the mass in the tail distribution" 2(https://arxiv.org/abs/1904.09751). They trace the idea to Ackley and colleagues in 1985 and note that "temperature sampling has been applied widely to text generation" 2(https://arxiv.org/abs/1904.09751).
A worked example
Hypothetical. Suppose a model is completing the sentence "The queen bee lays eggs in the..." and, to keep the arithmetic readable, only three candidate tokens matter, with logits of 2.0 ("cells"), 1.0 ("comb") and 0.0 ("hive"). Applying the softmax formula above:
| Temperature | "cells" | "comb" | "hive" |
|---|---|---|---|
| 0.5 | 86.7% | 11.7% | 1.6% |
| 1.0 | 66.5% | 24.5% | 9.0% |
| 2.0 | 50.6% | 30.7% | 18.6% |
The ranking never changes. "Cells" is the most likely token at every temperature. What changes is how often the second and third choices get drawn. At 0.5, "hive" appears roughly once in sixty draws; at 2.0, nearly one draw in five. Over a long answer, those small per-token shifts compound, because every token chosen becomes part of the context for the next one.
This example also shows why temperature cannot improve accuracy in any direct sense. It does not consult a source, check a fact or change which token the model scored highest. If the model's top-ranked continuation is wrong, a low temperature makes it consistently wrong.
Why temperature 0 is a special case
Dividing by zero is undefined, so "temperature 0" is implemented as a limit: as T approaches zero, all the probability collapses onto the highest-scoring token, which is the same as always picking the top token. That procedure is called greedy decoding. OpenAI's reference describes the low end in hedged terms: lower values "will make it more focused and deterministic" 3(https://developers.openai.com/api/reference/resources/responses/methods/create). "More deterministic" is a comparison, not a promise. OpenAI's own seed documentation, in the same family of references, says "Determinism is not guaranteed" 4(https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create). The reasons repeated requests can still differ, including server-side batching and floating-point arithmetic, are covered in what-a-fixed-seed-promises-in-ai-apis.
Greedy decoding also has a known quality problem for open-ended writing. Holtzman and colleagues report that "decoding strategies that optimize for output with high probability, such as beam search, lead to text that is incredibly degenerate," and that the highest-scoring long texts "are often generic, repetitive, and awkward" 2(https://arxiv.org/abs/1904.09751). That is an observed result for the GPT-2-era models they tested, not a law about every current model, but it explains why "always set temperature to 0" was never universal advice even when the parameter was available everywhere.
3. The sibling settings: top_p, top_k and min_p
Temperature reshapes the whole distribution. Three other common settings cut it off instead.
Top-k keeps only the k highest-scoring tokens and redistributes probability among them. Holtzman and colleagues criticized a fixed k because the right number of candidates changes from one position to the next; sometimes one token is plainly correct, and sometimes hundreds are reasonable 2(https://arxiv.org/abs/1904.09751).
Top-p, or nucleus sampling, keeps the smallest set of tokens whose probabilities add up to at least p. The paper defines the "top-p vocabulary" as "the smallest set such that" the summed probability is at least p 2(https://arxiv.org/abs/1904.09751). OpenAI's reference describes it in plain terms: "So 0.1 means only the tokens comprising the top 10% probability mass are considered" 3(https://developers.openai.com/api/reference/resources/responses/methods/create). Hypothetical: in the temperature-1.0 row of the example above, top_p of 0.9 keeps "cells" and "comb" (66.5% + 24.5% = 91%) and drops "hive"; top_p of 0.5 keeps only "cells".
The authors argued that temperature alone is a blunt tool here: "Instead of relying on a fixed top-k, or using a temperature parameter to control the shape of the distribution without sufficiently suppressing the unreliable tail, we propose sampling from the top-p portion of the probability mass" 2(https://arxiv.org/abs/1904.09751). Their "unreliable tail" is the long list of individually unlikely tokens that, drawn by pure sampling, produced text they described as "incoherent and almost unrelated to the context" 2(https://arxiv.org/abs/1904.09751).
Min-p keeps tokens whose probability is at least some fraction of the top token's probability. Ollama's documentation gives a concrete case: "with p=0.05 and the most likely token having a probability of 0.9, logits with a value less than 0.045 are filtered out" 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx). Min-p is a local-runner option in this survey; none of the three hosted API references checked for this page list it.
Using them together. OpenAI's reference says, for both parameters, "We generally recommend altering this or top_p but not both" 3(https://developers.openai.com/api/reference/resources/responses/methods/create). Google's reference says Gemini "uses combined Top-k and Top-p (nucleus) sampling," and that the default top_p varies by model 10(https://ai.google.dev/api/generate-content). Ollama ships defaults for all of them at once, including top_k 40 and top_p 0.9 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx). The practical consequence: the same temperature value can produce different behavior on two systems because the other filters differ.
4. OpenAI: documented, but being phased out on new models
Documented behavior. OpenAI's Responses API reference, read on 18 November 2026, lists temperature: optional number or null (default: 1), says "What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic," and gives minimum: 0, maximum: 2 3(https://developers.openai.com/api/reference/resources/responses/methods/create). The Chat Completions reference carries the same text 4(https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create). The top_p entry, also default 1, carries the matching advice to change one or the other.
The newer-model exception. OpenAI's "Using GPT-6.2" guide, under its migration notes, lists "Unsupported parameters": "When migrating Chat Completions requests, omit temperature, top_p, logprobs, and top_logprobs. For Responses requests, omit temperature, top_p, and top_logprobs" 5(https://developers.openai.com/api/docs/guides/latest-model). The section read for this page does not say whether sending the parameter produces an error or is ignored. Do not assume either; test against the exact model, and treat the guide's instruction to omit the parameter as the documented behavior.
What that means for readers. On OpenAI, "the API supports temperature" and "this model supports temperature" are now different statements. The general reference describes the parameter's schema; the model guide says whether a given model honors it. A generic API reference entry is not evidence that every model behind that endpoint uses the field.
The settings that are documented instead. The same GPT-6.2 guide gives configuration advice for other controls. For example, it says "Start with medium for a new integration" for reasoning effort, and "If you currently use none or minimal, use low instead," set through reasoning.effort in Responses or reasoning_effort in Chat Completions 5(https://developers.openai.com/api/docs/guides/latest-model). Reasoning effort is not a sampling temperature and should not be read as a renamed one; the guide does not describe it that way. The point is narrower: when a provider retires one control, the controls it does document are where its current advice lives, so read those sections rather than looking for a hidden equivalent of the old dial.
Where else variation comes from. Even on a model that honors temperature, it is only one of several inputs that change what you get back. The prompt and any retrieved context change the logits themselves. Output-length limits and stop sequences decide where a response ends. A different model snapshot is a different set of scores entirely. When two outputs differ, temperature is one suspect among several, and logging all of these inputs is the only way to tell which changed.
5. Anthropic: removed from the current API version
Anthropic's documentation changed more than any other provider's between Grok's check on 16 October 2026 and this one.
Documented behavior, current version. Anthropic's API-versions page lists, under version 2026-10-21: "The temperature, top_p, and top_k request parameters are removed. A request that sends any of them returns a 400 error on every model" 7(https://platform.claude.com/docs/en/api/versioning). The current "Create a Message" reference no longer lists any of the three among its request body parameters 6(https://platform.claude.com/docs/en/api/messages/create).
What a request does now. The migration guide for 2026-10-21 explains: "Without these parameters, a request samples with their defaults, including a temperature of 1.0, the same as a 2023-06-01 request that leaves them out" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). It adds that "Models that already accept only the defaults, such as Claude 4.7 and later models, sample as before," while "On models that accept other values, such as Claude Sonnet 4.6, a request that lowered temperature for more consistent output loses that effect. No other setting replaces it" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21).
Older version still available. The same guide says that if a request relies on a non-default value, developers can "either stop sending the parameter, or keep that request on 2023-06-01" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). Anthropic's model-deprecations page states the older version's rule: it returns a 400 error "when set to a non-default value on Claude 4.7 and later models and Claude Mythos Preview," and recommends: "Omit and use prompting to guide model behavior" 9(https://platform.claude.com/docs/en/resources/model-deprecations).
SDKs. The migration guide says "As of the latest major versions, the SDK and the CLI no longer have the three parameters" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). It also notes that the .NET IChatClient adapters "now ignore ChatOptions.Temperature, ChatOptions.TopK, and ChatOptions.TopP" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). That last detail matters for anyone using a framework that wraps several providers: a setting can be silently dropped by an adapter layer, not by the provider.
Correcting the earlier draft. Grok's draft quoted the October reference as saying temperature defaulted to 1.0, ranged from 0.0 to 1.0, and that "even with temperature of 0.0, the results will not be fully deterministic," with a cut-off at "Models released after Claude Opus 4.6." That text is no longer on the current reference page 6(https://platform.claude.com/docs/en/api/messages/create), so it is not repeated here as current fact. The current deprecations page names "Claude 4.7 and later models" for the older API version 9(https://platform.claude.com/docs/en/resources/model-deprecations), and the newer API version removes the parameters for every model 7(https://platform.claude.com/docs/en/api/versioning).
6. Google Gemini: accepted in the schema, ignored on new models
Documented behavior. Google's generateContent reference describes temperature as "Controls the randomness of the output," says the default "varies by model," and that "Values can range from [0.0, 2.0]." The same entry continues: "This field is no longer supported and is silently ignored on Gemini 3.6 Flash and newer models" 10(https://ai.google.dev/api/generate-content).
Google's Gemini 3.6 release notes put the change in a broader frame: "Starting with Gemini 3.6 Flash and Gemini 3.5 Flash-Lite, the following API changes apply to these models and all future Gemini model releases," including "Sampling parameter deprecation: temperature, top_p, and top_k are deprecated. The API ignores these parameters and returns an error in future model generations" 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6). The detailed section says "In future model generations, supplying these parameters returns an HTTP 400 error. Remove these parameters from all requests," and offers a replacement approach: "To improve determinism, define a system instruction with explicit rules for your specific use case" 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6).
Google's text-generation guide adds that "Gemini 4 and Gemini 3.6+ models ignore custom values for temperature, top_p, and top_k and return deprecation warning headers" 12(https://ai.google.dev/gemini-api/docs/text-generation).
Why "silently ignored" is the dangerous case. A 400 error is loud: the request fails and someone notices. An ignored parameter is quiet: the request succeeds, the code still says temperature: 0.2, and the output is sampled with the model's defaults. Anyone reading the code would believe a setting is in force that is not. The deprecation headers Google mentions are the only signal, and only if your client logs response headers 12(https://ai.google.dev/gemini-api/docs/text-generation).
7. Local models: the parameter is alive, with different defaults
Temperature has not disappeared everywhere. Local inference tools still expose it. Ollama's Modelfile documentation lists temperature with "(Default: 0.8)" and the description "Increasing the temperature will make the model answer more creatively" 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx). Its example Modelfile comments, "sets the temperature to 1 [higher is more creative, lower is more coherent]" 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx).
Those descriptions are the tool's own documentation, so treat words like "creatively" and "coherent" as the vendor's informal framing, not measured properties. Section 9 summarizes what researchers found when they did measure.
Two practical consequences follow. First, a default is a setting. A script that "doesn't set temperature" on Ollama is running at 0.8 with top_k 40 and top_p 0.9, according to the documented defaults 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx), while the same script against OpenAI's general API would get a default of 1 3(https://developers.openai.com/api/reference/resources/responses/methods/create). Second, model files can set their own parameters. The Modelfile format exists so a model package can ship PARAMETER lines 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx), which means two people running "the same model" may not be running the same sampling setup.
8. Why providers are moving away from it: what is documented and what is not
It is tempting to explain the retreat with a confident story. The sources read for this page give only short official reasons, so this section separates them.
Documented. Anthropic's recommended replacement is to "Omit and use prompting to guide model behavior" 9(https://platform.claude.com/docs/en/resources/model-deprecations). Google's is to "define a system instruction with explicit rules for your specific use case" to improve determinism 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6). OpenAI's guide lists the parameter as unsupported without giving a reason in the section read 5(https://developers.openai.com/api/docs/guides/latest-model). Anthropic's versioning page states a general policy that explains the mechanics of the change: for a given API version it preserves existing input parameters, but a new version may change them, and "Anthropic recommends using the latest API version whenever possible" 7(https://platform.claude.com/docs/en/api/versioning).
Not documented in these sources. None of the pages read says, for example, that sampling parameters interfere with internal reasoning, that they harm safety tuning, or that they complicate serving. Those are plausible hypotheses, and readers will see them stated as fact elsewhere. This page does not state them, because no source it read supports them. If you need the reason, ask the provider or look for an official engineering post that explains it.
What is documented about the effect. Anthropic is unusually specific about who is affected: requests to models that already accepted only defaults "sample as before," while a request that had lowered temperature on a model that honored it "loses that effect. No other setting replaces it" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21). That sentence is the most useful one in this whole survey for anyone maintaining old code: the migration can change behavior even when nothing errors.
9. What research has measured about temperature
Provider docs say what the parameter does mechanically. A small body of research has tried to measure its effect on outcomes people care about. Each study tested specific models at a specific time, so the results describe those models, not today's.
Problem-solving accuracy. Renze and Guven built a multiple-choice exam from problems sampled from standard benchmarks, then ran "nine popular LLMs with five prompt-engineering techniques" while raising temperature "from 0.0 to 1.6." Their observed result: "changes in temperature from 0.0 to 1.0 do not have a statistically significant impact on LLM performance for problem-solving tasks," and the authors say this appeared to generalize across the models, techniques and problem domains they tested 14(https://arxiv.org/abs/2402.05201). Limits: multiple-choice questions, models available in early 2024, and a finding about the 0.0 to 1.0 range specifically. It does not show temperature is irrelevant to open-ended tasks, and the abstract does not claim that.
Creativity. Peeperkorn and colleagues tested the common claim that temperature is "the creativity parameter," using a narrative-generation task with a fixed context, model and prompt. They found "temperature is weakly correlated with novelty, and unsurprisingly, moderately correlated with incoherence, but there is no relationship with either cohesion or typicality," and concluded that the influence "is far more nuanced and weak than suggested by the 'creativity parameter' claim" 15(https://arxiv.org/abs/2405.00492). One task, one model setup, published at ICCC 2024 per the arXiv listing. It is enough to retire "turn it up for creativity" as a reliable rule, and not enough to say anything about every creative task.
Greedy versus sampling in evaluation. Song and colleagues studied how evaluation results change between greedy decoding and sampling. They "observe that greedy decoding generally outperforms sampling methods for most evaluated tasks," and that "alignment can reduce sampling variance" 16(https://arxiv.org/abs/2407.10457). They also found that best-of-N sampling let smaller models "match or surpass larger models such as GPT-4-Turbo" on their benchmarks, and argue that evaluations "should not ignore non-determinism" 16(https://arxiv.org/abs/2407.10457). The paper's title states its main point.
Sampling on purpose. Some methods depend on randomness. Wang and colleagues' self-consistency method "first samples a diverse set of reasoning paths instead of only taking the greedy one, and then selects the most consistent answer," and reported gains on arithmetic and commonsense benchmarks, including "GSM8K (+17.9%)" for the models they tested 17(https://arxiv.org/abs/2203.11171). That is an observed result from 2022, for chain-of-thought prompting on the models in that paper. It shows that "lower temperature is always safer" is not a general rule either: some workflows need variety across attempts and then reconcile them.
Open-ended text quality. As covered in section 2, Holtzman and colleagues found that maximizing likelihood produces degenerate text and that pure sampling produces incoherent text, and proposed truncating the tail 2(https://arxiv.org/abs/1904.09751). Their models were GPT-2 era.
Synthesis (explanation, not a finding). Taken together, these studies point the same way. Temperature changes variety. Its measured effects on accuracy are small in the ranges people usually use, at least on the tasks studied. Its effect on "creativity" is weaker than folklore suggests. And whether randomness helps depends on whether your workflow uses it, as self-consistency does, or just suffers from it, as a single-shot extraction does.
10. Four common misreadings
"Temperature 0 means factual." No provider document read for this page claims that. OpenAI's wording is "more focused and deterministic" 3(https://developers.openai.com/api/reference/resources/responses/methods/create). A focused answer can be focused on a wrong claim. Factual accuracy depends on what the model knows, what sources it is given and whether anyone checks; see structured-output-schema-validity-vs-factual-accuracy for the related trap of trusting well-formed output.
"Temperature 0 means identical output every time." Not promised. OpenAI's seed entry says "Determinism is not guaranteed" even with a fixed seed 4(https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create). See what-a-fixed-seed-promises-in-ai-apis.
"0.7 means the same thing everywhere." It does not. Ranges differ: 0 to 2 at OpenAI 3(https://developers.openai.com/api/reference/resources/responses/methods/create) and in Gemini's schema 10(https://ai.google.dev/api/generate-content). Other filters differ: Ollama applies top-k 40 and top-p 0.9 by default 13(https://github.com/ollama/ollama/blob/main/docs/modelfile.mdx). And the logits being divided come from different models with different training, so the same division produces different distributions.
"If my code sets temperature, it is in effect." Not on Gemini 3.6 Flash and newer, where it is "silently ignored" 10(https://ai.google.dev/api/generate-content); not through Anthropic's .NET IChatClient adapters, which "now ignore" it 8(https://platform.claude.com/docs/en/api/migration-2026-10-21); and not on OpenAI models whose guide says to omit it 5(https://developers.openai.com/api/docs/guides/latest-model). Code is a statement of intent, not proof of behavior.
11. Migrating code that still sets temperature
Hypothetical example. A small apiary club runs a script, written in 2025, that sends each week's inspection notes to a hosted model and asks for a five-line summary for its newsletter. The script sets temperature: 0.2 "for consistency." In November 2026 the club updates its SDK.
Depending on the provider, at least three different things could happen, each consistent with the documentation cited above:
- Loud failure. On Anthropic with the new SDK, the parameter no longer exists in the SDK 8(https://platform.claude.com/docs/en/api/migration-2026-10-21); with a hand-built HTTP request on version
2026-10-21, the request returns a 400 error 7(https://platform.claude.com/docs/en/api/versioning). The script stops. Someone notices. - Quiet change. On a Gemini model at 3.6 Flash or newer, the request succeeds and the value is ignored 10(https://ai.google.dev/api/generate-content). Summaries are now sampled with the model's defaults. Nobody notices unless they compare outputs.
- No change at all, in practice. If the club's model already accepted only default values, as Anthropic says of "Claude 4.7 and later models" 8(https://platform.claude.com/docs/en/api/migration-2026-10-21), the old setting was already not doing what the comment claimed.
A sensible migration, offered as an editorial suggestion:
- Inventory. Search the codebase and configuration files for
temperature,top_p,top_k,topP,topKand wrapper-specific names. Include prompt-management tools and environment variables, not just source files. - Look up each model, not each provider. For every model in use, read the current model guide or deprecation page. The general API reference may still list a parameter that a specific model ignores, as the OpenAI case shows 3(https://developers.openai.com/api/reference/resources/responses/methods/create) 5(https://developers.openai.com/api/docs/guides/latest-model).
- Remove rather than retune. Every provider document read here that addresses the newer models says to remove the parameters 5(https://developers.openai.com/api/docs/guides/latest-model) 9(https://platform.claude.com/docs/en/resources/model-deprecations) 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6). None suggests a substitute value.
- Re-run a saved test set. Before and after the change, run the same set of real inputs and compare outputs against what you previously accepted. Keep those test inputs separate from the ones you use to rewrite prompts; see keep-eval-examples-separate-from-prompt-tuning-examples.
- Move the intent into instructions. If the setting was there to make summaries terse and uniform, say so in the prompt: required length, fixed headings, no speculation, what to do when notes are missing. That is the replacement both Anthropic and Google document 9(https://platform.claude.com/docs/en/resources/model-deprecations) 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6).
- Log what was actually sent and received. Record the model identifier, API version, parameters sent and any warning headers returned. When behavior shifts later, those logs are what let you tell a sampling change from a model update; see how-a-model-update-can-change-an-approved-workflow.
- Decide whether to stay on an old API version deliberately. Anthropic documents that a request needing a non-default value can stay on
2023-06-018(https://platform.claude.com/docs/en/api/migration-2026-10-21). That is a choice with a cost: the same page recommends the latest version "whenever possible" 7(https://platform.claude.com/docs/en/api/versioning), and newer models reject non-default values even on the older version 9(https://platform.claude.com/docs/en/resources/model-deprecations). Write down why, and when you will revisit it.
12. Getting consistency without a temperature dial
The reason most people set a low temperature was to make results more predictable. That goal has not gone away. The tools for it are different.
Fixed, specific instructions. Google's documented replacement is a system instruction "with explicit rules" 11(https://ai.google.dev/gemini-api/docs/whats-new-gemini-3.6). Rules that constrain the output space, such as an exact format, a fixed list of allowed labels or a required "not stated" value, reduce variation in a way a reader can audit.
Structured output. Asking for output that conforms to a schema narrows the shape of the answer. It does not make the content correct; see structured-output-schema-validity-vs-factual-accuracy.
Store accepted outputs. If a result has been reviewed and approved, save it. Regenerating an approved answer and hoping for the same text is the weakest possible consistency strategy, because no hosted provider read for this page guarantees identical regeneration 4(https://developers.openai.com/api/reference/resources/chat/subresources/completions/methods/create).
Test distributions, not single samples. Song and colleagues' point applies directly: one output per example hides variability 16(https://arxiv.org/abs/2407.10457). Run each test input several times and look at the spread. If the spread is unacceptable, that is a finding about the workflow, and no sampling parameter will fix it reliably on models that ignore one.
Use the randomness when it helps. For hard reasoning tasks, sampling several answers and choosing the most consistent one is a documented research technique 17(https://arxiv.org/abs/2203.11171). Whether a given hosted model still produces useful diversity at its fixed defaults is something to measure for your task, not assume.
Pin what can be pinned. Model identifiers and API versions can usually be fixed in code. Anthropic's versioning page describes what a given version preserves and what it may still change 7(https://platform.claude.com/docs/en/api/versioning). Pinning does not freeze everything, but it removes one source of silent change.
13. Limits of this page
- Three hosted providers and one local runner. Other hosted APIs, cloud marketplaces that resell these models, and other local runners may document different ranges, defaults and deprecation status. Anthropic notes, for example, that on Amazon Bedrock version
2026-10-21is "available for Claude 4.7 and later models," and earlier models there should keep their current version 7(https://platform.claude.com/docs/en/api/versioning). - A snapshot. Every provider statement here is "as of the docs checked 18 November 2026." The Anthropic text changed within five days of the Grok draft's check. Expect further change.
- Behavior not tested. This page reports documentation. It did not send test requests to any API, so it does not independently confirm what each model does with the parameter.
- Research on older models. The studies in section 9 tested models from 2019 to 2024. Their findings are evidence about those systems, and only suggestive about current ones.
- Explanations are labeled. Where the page explains why something happens beyond what a source states, it says so. In particular, it does not claim to know why providers retired the parameter.
14. Reader takeaway
Temperature divides a model's token scores before they become probabilities. Lower values make top-ranked tokens win more often; higher values give lower-ranked tokens more chances. It changes variety, not truth, and it never guaranteed identical output.
As of 18 November 2026, its availability depends on the exact model and API version. OpenAI's references still document it from 0 to 2, but its newest-model guide says to omit it. Anthropic removed it from API version 2026-10-21, where sending it fails on every model. Google ignores it on Gemini 3.6 Flash and newer and says future models will reject it. Local runners such as Ollama still use it, with their own defaults.
If your code sets temperature, find out what each model actually does with it, remove it where the provider says to, re-run your saved tests, and put the consistency you wanted into instructions, schemas, stored results and logs.
Sources
Last checked 18 November 2026. Numbered citations in the text link to these sources.
[1] Hinton, Geoffrey, Oriol Vinyals, and Jeff Dean. "Distilling the Knowledge in a Neural Network." arXiv:1503.02531, March 9, 2015 (NIPS 2014 Deep Learning Workshop). Read source
[2] Holtzman, Ari, Jan Buys, Li Du, Maxwell Forbes, and Yejin Choi. "The Curious Case of Neural Text Degeneration." ICLR 2020; arXiv:1904.09751, April 22, 2019. Read source
[3] OpenAI. "Create a model response" (Responses API reference: temperature, top_p). Accessed 18 November 2026. Read source
[4] OpenAI. "Create chat completion" (Chat Completions API reference: temperature, top_p, seed). Accessed 18 November 2026. Read source
[5] OpenAI. "Using GPT-6.2" (latest-model guide, migration notes: unsupported parameters). Accessed 18 November 2026. Read source
[6] Anthropic. "Create a Message" (Messages API reference). Accessed 18 November 2026. Read source
[7] Anthropic. "API versions." Accessed 18 November 2026. Read source
[8] Anthropic. "Migrating to API version 2026-10-21" (section "Sampling parameters are removed"). Accessed 18 November 2026. Read source
[9] Anthropic. "Model deprecations" (section "API parameter deprecations"). Accessed 18 November 2026. Read source
[10] Google. "Generating content" (Gemini API reference, GenerationConfig: temperature, topP, seed). Accessed 18 November 2026. Read source
[11] Google. "What's new in Gemini 3.6" (section "API changes and parameter updates"). Accessed 18 November 2026. Read source
[12] Google. "Text generation" (Gemini API guide, note on sampling parameters). Accessed 18 November 2026. Read source
[13] Ollama. "Modelfile" documentation (valid parameters and defaults). GitHub, main branch, accessed 18 November 2026. Read source
[14] Renze, Matthew, and Erhan Guven. "The Effect of Sampling Temperature on Problem Solving in Large Language Models." arXiv:2402.05201, February 7, 2024. Read source
[15] Peeperkorn, Max, Tom Kouwenhoven, Dan Brown, and Anna Jordanous. "Is Temperature the Creativity Parameter of Large Language Models?" ICCC 2024; arXiv:2405.00492, May 1, 2024. Read source
[16] Song, Yifan, Guoyin Wang, Sujian Li, and Bill Yuchen Lin. "The Good, The Bad, and The Greedy: Evaluation of LLMs Should Not Ignore Non-Determinism." arXiv:2407.10457, July 15, 2024. Read source
[17] Wang, Xuezhi, et al. "Self-Consistency Improves Chain of Thought Reasoning in Language Models." ICLR 2023; arXiv:2203.11171, March 21, 2022. Read source