Infrastructure · October 22, 2026 · 3 min read

Anthropic's 2026-10-21 API Version Rejects temperature

Claude API version 2026-10-21 returns a 400 for temperature, top_p or top_k, even at the default. Newer Claude models already rejected non-default values. Gateways must adapt.

NeuronGate teamShare on X
Anthropic's 2026-10-21 API Version Rejects temperature article preview graphic

Anthropic published a new Messages API version, 2026-10-21, and the first SDK majors that use it. The change most likely to break existing integrations is small and absolute:

In 2026-10-21, a request that sends temperature, top_p, or top_k returns a 400 error, even at the parameter's default value.

The older version, 2023-06-01, still accepts the parameters, but with an important caveat that predates this release: Claude 4.7 and later models accept only the default values. Anthropic's parameter deprecation table says earlier API versions return a 400 when these are set to a non-default value on those models.

What else changed in 2026-10-21

  • document blocks placed directly in an assistant message now return 400. Send documents in user messages.
  • A text block with a non-empty citations array in a user message now returns 400. Citations on assistant text blocks you send back are still accepted.
  • The latest SDK majors and the CLI no longer expose the three sampling parameters at all.

Anthropic's 2026-10-21 API Version Rejects temperature workflow diagram

Why this hits OpenAI-compatible gateways

OpenAI-style clients send temperature all the time. It is in tutorials, framework defaults, and almost every code sample. A gateway that translates OpenAI requests into Anthropic Messages requests and forwards temperature as-is will:

  • fail every request on API version 2026-10-21, and
  • fail requests with a non-default value on Claude 4.7 and later on any API version.

What a request loses when the parameter is removed depends on the model. Without it, sampling uses the defaults, including a temperature of 1.0. On models that accept only the defaults, such as Claude 4.7 and later, behavior is unchanged. On models that accept other values, such as Claude Sonnet 4.6, a request that lowered temperature for more consistent output loses that effect, and Anthropic notes that no other setting replaces it.

What to do

  1. Decide per model, not per request. Omit temperature, top_p and top_k for models that accept only defaults (Claude 4.7 and later). For older models, forward them only while you stay on 2023-06-01.
  2. Pin the API version deliberately. If any traffic depends on a lowered temperature on an older model, keep that traffic on 2023-06-01 until it moves to a newer model.
  3. Get consistency from the prompt. For newer models, Anthropic's guidance is to guide behavior through prompting rather than sampling parameters.
  4. Test the whole translation layer. Documents in assistant turns and citations on user text blocks also changed; replayed conversation histories are where these show up.

NeuronGate angle

NeuronGate accepts OpenAI-format requests. When it routes a Claude model directly to Anthropic, it pins API version 2023-06-01 and leaves temperature, top_p and top_k out for Claude 4.7 and later, the models that accept only the defaults, so OpenAI-style clients don't hit a 400. Older Claude models still receive the values you send. See the docs for the request format.

FAQ

Does setting temperature to 1.0 avoid the error?

Not on 2026-10-21: the parameter is rejected even at its default value. Leave it out.

Will my output change if I remove temperature?

On Claude 4.7 and later, no; they already sample with the defaults. On older models that accepted a lowered temperature, outputs may become less consistent.

Sources and context

Models in this post

Available through the NeuronGate API, billed per token.