[DOCS] Conflicting info on `temperature` and `top_p` mutual exclusivity for Claude 4.5 models

Resolved 💬 3 comments Opened Jan 18, 2026 by coygeek Closed Feb 13, 2026

Documentation Type

Unclear/confusing documentation

Documentation Location

Section/Topic

  • Migration Guide: "Migrating from Claude Sonnet 3.7 to Claude Sonnet 4.5" -> Step 2: Update sampling parameters. - OpenAI SDK compatibility: "Detailed OpenAI Compatible API Support" -> Request fields. - Messages API Reference: "Body Parameters" -> temperature and top_p definitions.

Current Documentation

The Migration Guide for Claude 4.5 states:

"Use only temperature OR top_p, not both... Before (Claude Sonnet 3.7) - This will error in Sonnet 4.5."

However, the OpenAI SDK compatibility page lists:
| Field | Support status |
|-------|----------------|
| temperature | Between 0 and 1 (inclusive). Values greater than 1 are capped at 1. |
| top_p | Fully supported |

The Messages API reference lists both parameters as "optional" but does not explicitly state that they are mutually exclusive for Claude 4.5 models.

What's Wrong or Missing?

There is a critical contradiction between the Migration Guide and the rest of the documentation regarding Claude 4.5's handling of sampling parameters:

  1. OpenAI SDK users are at high risk: Most standard OpenAI client implementations (and many community libraries) send default values for both temperature and top_p in every request. Because the compatibility page marks both as "Fully supported" without the Claude 4.5 caveat, users migrating their base URL to Anthropic will face immediate 400 Invalid Request errors that aren't explained on the compatibility page.
  2. API Reference Lack of Detail: The main Messages API reference documentation describes temperature and top_p as independently optional, failing to mention that a combination of the two will trigger a validation error for the latest model family.
  3. Inconsistency: Only the Migration Guide mentions this as a breaking change. Developers who bypass that guide and go straight to the API Reference or the OpenAI Compatibility layer will be misled.

Suggested Improvement

Update the OpenAI SDK compatibility page:
Add a specific note to the temperature and top_p rows:

"Note: For Claude 4.5 models, temperature and top_p are mutually exclusive. Providing both will result in an error. This is a common point of failure for clients that provide default values for both fields."

Update the Messages API Reference:
Add a validation rule to the description of both temperature and top_p:

"Note for Claude 4.5: You should alter temperature or top_p, but not both. Providing both parameters in a single request to Claude 4.5 models will return a 400 error."

Impact

High - Prevents users from using a feature

Additional Context

  • Related Documentation: The Model deprecations page and Models overview should also ideally flag this behavioral shift for the 4.5 family to prevent integration friction.
  • Example of the issue: A user using a standard openai-python client against the Anthropic endpoint with model="claude-sonnet-4-5" will crash if their client is initialized with standard defaults, even if they didn't explicitly set both values in the create call.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗