AI EngineerGuide

temperature, top_p and logprobs raise an error on GPT-5 models

Rejected Applies to gpt-5, gpt-5-mini, gpt-5-nano, gpt-5.2*, gpt-5.4* on the OpenAI Chat Completions and OpenAI Responses API.

OpenAI's docs describe this error but don't quote the exact message, so we don't either.

How to fix it

Remove temperature, top_p and logprobs. On GPT-5.4 and GPT-5.2 they’re only accepted with reasoning effort none.

Before
{
  "messages": [
    {
      "content": "Summarize this ticket.",
      "role": "user"
    }
  ],
  "model": "gpt-4o-2024-08-06",
  "temperature": 0.2
}
After (GPT-5.4)
{
  "messages": [
    {
      "content": "Summarize this ticket.",
      "role": "user"
    }
  ],
  "model": "gpt-5.4"
}

Official source

Requests that include these fields will raise an error for GPT-5.4 or GPT-5.2 with any other reasoning effort setting, or for older GPT-5 models

https://developers.openai.com/api/docs/guides/latest-model/gpt-5.4 (last checked 2026-11-02)

All migration errors

FAQ

How do I fix this when moving to gpt-5, gpt-5-mini, gpt-5-nano, gpt-5.2*, gpt-5.4*?

Remove temperature, top_p and logprobs. On GPT-5.4 and GPT-5.2 they’re only accepted with reasoning effort none.

Where is this documented?

In OpenAI’s official docs: https://developers.openai.com/api/docs/guides/latest-model/gpt-5.4, last checked 2026-11-02.