All articles
FixesAPI errors

“temperature does not support 0 with this model”: Remove temperature and top_p on Reasoning Models (GPT-6.2 Guide)

OpenAI reasoning models reject sampling parameters such as temperature: 0. The official GPT-6.2 migration guide says to omit them. Exact 400 wording from public issues, plus Python, JS and LangChain fixes. We did not make a paid API call.

Clay illustration of a temperature dial set apart from a small model device, for the OpenAI error temperature does not support 0 with this model
Also available in中文Español

OpenAI’s GPT-6.2 migration guide is blunt about sampling parameters. When you move a Chat Completions request to gpt-6.2-astra or gpt-6.2-sol, omit temperature, top_p, logprobs and top_logprobs. For the Responses API, omit temperature, top_p and top_logprobs, and drop message.output_text.logprobs from include. If a client still sends temperature: 0, reasoning models have been returning HTTP 400 with this body:

{
  "error": {
    "message": "Unsupported value: 'temperature' does not support 0 with this model. Only the default (1) value is supported.",
    "param": "temperature",
    "code": "unsupported_value"
  }
}

That JSON is copied from public reports, not from a paid call we made. GitHub Copilot issue #907 includes the same unsupported_value payload for gpt-5-mini. qwen-code issue #224 quotes the same sentence when OPENAI_MODEL was set to gpt-5. The OpenAI changelog entry dated 3 September 2026 already said GPT-6 Astra does not support custom temperature or top_p values. We did not send a billed request to re-capture the wording on GPT-6.2.

The exact message, and close variants

The number in the sentence is the value your outbound request actually sent. It is often 0, because many tools use 0 as a default for “deterministic” answers. It is not always 0. A public report in BoltAI issue #373 quotes this wording with 0.7: Unsupported value: 'temperature' does not support 0.7 with this model. Only the default (1) value is supported. The same sentence appears with 0.2 on the official OpenAI forum, and with 0.8 in khoj issue #1377. The official GPT-6.2 guidance is still to omit the parameter, not to hunt for another number that might sneak through.

Variants of the OpenAI 400 temperature does not support 0 with this model error, including the 0.7 wording from BoltAI issue #373, and official guidance to omit top_p and logprobs

A twin failure on top_p is what the migration guide is warning you about. We did not pay to recapture a top_p response body, so we are not inventing that exact string here. If you fix temperature and the 400 moves to top_p or logprobs, keep deleting the keys the guide lists, rather than setting them to 1 one by one.

Why the request often sends 0 anyway

People hit this on the day they change the model name in a config that has carried temperature=0 for months. Chat models accepted it. Reasoning models do not. The other common path is a wrapper that injects 0 even when your latest commit never mentioned temperature. Issue #907 is a clean example: a local proxy showed Copilot sending temperature: 0.0 to gpt-5-mini, and the same request succeeded once that field was removed or changed.

This is why looking at your source is not always enough. Log the outbound JSON, or put a proxy in front of the call, and confirm which keys left the process. The 400 happens before the model writes a token, so a retry will not clear it.

Fixes in the Python and JS SDKs, and in LangChain

In the official OpenAI SDKs, delete the argument. Do not replace 0 with 0.2, and do not start by sending 1 unless a framework refuses to omit the key. A typical Python before-and-after looks like this:

from openai import OpenAI
client = OpenAI()

client.chat.completions.create(
    model="gpt-6.2-sol",
    messages=[{"role": "user", "content": "Summarize this file."}],
    temperature=0,  # remove this line
)
from openai import OpenAI
client = OpenAI()

client.chat.completions.create(
    model="gpt-6.2-sol",
    messages=[{"role": "user", "content": "Summarize this file."}],
)

The JavaScript SDK follows the same rule. Leave temperature and top_p out of the object:

const response = await client.chat.completions.create({
  model: "gpt-6.2-sol",
  messages: [{ role: "user", content: "Summarize this file." }],
  // do not set temperature or top_p
});

If you use LangChain, construct the model without a temperature argument. langchain-ai/open-swe pull request #628 fixed a related 400 by setting temperature to undefined for reasoning models, after a fallback path had sent 0 to an OpenAI thinking model. In Python that usually means:

from langchain_openai import ChatOpenAI

llm = ChatOpenAI(model="gpt-6.2-sol")
# do not pass temperature=0; if a wrapper injects it, set temperature=None

LiteLLM has had the same class of bug when it forwarded a non-default temperature to GPT-5.x reasoning models; see BerriAI/litellm issue #34301. If a gateway is in the middle, turn on parameter dropping if it has a drop_params switch, or upgrade the gateway so it stops sending the key.

What else the official guide says to remove

What to remove for the OpenAI 400 temperature does not support 0 with this model error, according to the GPT-6.2 migration guide, in Chat Completions, Responses, the SDKs and LangChain

The GPT-6.2 migration guide groups more than temperature. On Chat Completions, also omit top_p, logprobs and top_logprobs. On Responses, omit temperature, top_p and top_logprobs, and remove message.output_text.logprobs from include. Tool calling on GPT-6.2 Astra and Sol requires the Responses API; that is a separate migration, but it often sits in the same pull request.

Practical fix order for temperature does not support 0 with this model: inspect the outbound request, delete the key in your code, clear wrapper defaults, and prefer omitting the official default

The public 400 text says only the default (1) is supported. Setting the field to 1 has unblocked some GPT-5 and o-series clients in those GitHub threads. The GPT-6.2 guide still prefers omission. Follow the guide first. If a UI or a library will not let you leave the field blank, 1 is the default named in the error, not a creative sampling choice.

Prices and model IDs for the current generation are on our GPT-6.2 Astra price page. Other OpenAI HTTP errors, including a bad key or an unsupported region, are covered in 401 Incorrect API key provided and 403 Country, region, or territory not supported.

FAQ

I set temperature to 0 on purpose, for stable answers. What should I do?

On these reasoning models, that knob is not available. Remove it. Stability comes from the model and from the reasoning-effort setting, not from a sampling value of 0. The migration guide also tells you not to use effort none on GPT-6.2; start at medium, or low if you are replacing none or minimal.

Can I just set temperature to 1 and leave the rest of my client alone?

It has worked in public GPT-5 reports, because 1 is the default named in the 400. For GPT-6.2, OpenAI’s written instruction is still to omit the key. If a wrapper requires a number, 1 is the least-wrong value, not a guarantee that top_p will pass as well.

Did you confirm this 400 on GPT-6.2 with a live, paid request?

No. The exact JSON above comes from public GitHub issues. The instruction to omit the parameters comes from the official GPT-6.2 guide and from the 3 September 2026 changelog. We did not make a billed API call to re-record the status body.

Leave a thought

Your email address will not be published.