Claude Opus 4.1 rejects temperature and top_p together
On claude-opus-4-1-20250805 you may specify temperature or top_p, but not both. Request templates that always sent both parameters had to drop one when switching from Opus 4.
What does this mean for me?
Action needed
Engineering leadership
Cost, risk, timeline, team impact Worth knowingA small code change, but it signals a direction: Anthropic keeps narrowing sampling controls, and by Opus 4.7 they are gone entirely. Stop treating temperature tuning as a durable part of your architecture.
Engineer
What to change, what breaks, what to test Action neededIf a shared request builder sets both `temperature` and `top_p`, drop one for `claude-opus-4-1-20250805` or the call errors. Keep only `temperature` as the default so you are already compatible with Opus 4.7 and later, which reject `temperature`, `top_p` and `top_k` alike.
General consumer
Using the Claude apps, not the API No impactNothing to do — these are developer settings not exposed in the Claude apps.
Earlier models accepted both sampling parameters in the same request. Opus 4.1 does not: sending temperature and top_p together is an error, so shared request builders that set both needed a per-model branch.
The restriction tightened further over time — from Claude Opus 4.7 in April 2026, temperature, top_p and top_k are all rejected.
API surface
| Parameter | Change | Breaking | Models |
|---|---|---|---|
temperature | changed | yes | claude-opus-4-1-20250805 |
top_p | changed | yes | claude-opus-4-1-20250805 |