Avoid specifying both temperature and top_p for Opus 4.1
Opus 4.1 API requires using only temperature or top_p, not both.
When using Opus 4.1, specify either the temperature parameter or the top_p parameter, but not both.
API calls with Opus 4.1 fail or behave unexpectedly when both temperature and top_p are set.
The Opus 4.1 model has a limitation where it cannot process both temperature and top_p parameters simultaneously.
Opus 4.1 API users must choose between the 'temperature' and 'top_p' parameters. Specifying both will cause issues. This fix ensures correct API usage by selecting only one parameter for controlling randomness.
This adheres to the specific constraints of the Opus 4.1 model, preventing parameter conflicts and ensuring predictable output generation.
- Claude Platform release notes — May 10th, 2024 ↗Anthropic · Claude Platform Release Notes · May 9, 2024 · paraphrased
First seen on Subvolts May 9, 2024. Updated Sep 11, 2026. Spotted a problem? Tell us.
- Claude Platform release notes — May 10th, 2024Anthropic · Claude Platform Release Notes · May 9, 2024
The Playbook: reusable how-tos, prompts, configs and tips pulled out of the news.
- Setting tipUse only one parameter: temperature or top_pOpus 4.1 API users must choose between temperature and top_p for controlling output randomness. · 1 min
- PromptGenerate a flashcard web application with specific featuresCreate a flashcard app with features for creation, search, review, and statistics. · 15 min
- Cost tipUse multi-model strategies for cost and intelligence balanceCombine lower-cost and frontier models to optimize expenses while maintaining high intelligence. · 15 min
- Troubleshooting fixRecovering from agent container failureRe-provision a new container when the old one fails, allowing the harness to retry tool calls. · 10 min
- Troubleshooting fixRecovering from agent harness failureReboot the harness with a session ID and retrieve the event log to resume agent work after a crash. · 10 min
- Safety tipIsolate agent sandbox from credentialsEnsure credentials are never reachable from the sandbox where Claude's generated code runs to prevent prompt injection. · 10 min
Questions people ask
- Which AI tools does this work with?
- The sources used it with Claude.
- Where did this come from?
- Anthropic (Claude Platform Release Notes). Subvolts collected, normalized and credited it; the link above opens the original.

