Claude Opus 4.7 removes sampling parameters in API migration
Claude Opus 4.7 removes temperature, top_p, and top_k sampling parameters entirely, requiring developers to migrate code and use prompting instead to guide model behavior.
Score breakdown
Developers using Claude Opus 4.7 must remove sampling parameters from API calls and switch to adaptive thinking with effort control, requiring code updates and a shift from parameter-based to prompt-based behavior guidance.
- 01Claude Opus 4.7 removes temperature, top_p, and top_k sampling parameters; setting them to non-default values returns a 400 error
- 02Extended thinking is replaced with adaptive thinking, controlled via an effort parameter with values 'low', 'medium', 'high', 'max', or 'xhigh'
- 03Adaptive thinking is off by default on Claude Opus 4.7; developers must explicitly set thinking: {type: 'adaptive'} to enable it
Claude Opus 4.7 introduces several breaking API changes that require migration from previous Claude versions. The most significant change is the removal of sampling parameters: setting `temperature`, `top_p`, or `top_k` to any non-default value now returns a 400 error. The safest migration path is to omit these parameters entirely from request payloads, with prompting recommended as the way to guide model behavior on Claude Opus 4.7.
Extended thinking is replaced with adaptive thinking, which is off by default.
Extended thinking is replaced with adaptive thinking, which is off by default. Developers must explicitly set `thinking: {type: "adaptive"}` to enable it, and control thinking depth using the `output_config` parameter with effort levels: "low", "medium", "high", "max", or "xhigh". Additionally, thinking blocks now omit their thinking field by default—a silent change from Opus 4.6, which returned summarized thinking text. To restore summarized thinking content, developers must set `thinking.display` to "summarized".
Anthropic provides automation for this migration through a Claude API skill accessible in Claude Code via `/claude-api migrate`, which applies model ID swaps, breaking parameter changes, prefill replacement, and effort calibration across codebases and produces a manual verification checklist. Claude Opus 4.7 maintains the same feature set as Opus 4.6, including 1M token context window, 128k max output tokens, adaptive thinking, prompt caching, batch processing, Files API, PDF support, vision, and a full set of server-side and client-side tools.
Key facts
- 01Claude Opus 4.7 removes temperature, top_p, and top_k sampling parameters; setting them to non-default values returns a 400 error
- 02Extended thinking is replaced with adaptive thinking, controlled via an effort parameter with values 'low', 'medium', 'high', 'max', or 'xhigh'
- 03Adaptive thinking is off by default on Claude Opus 4.7; developers must explicitly set thinking: {type: 'adaptive'} to enable it
- 04Thinking content is omitted from responses by default; developers must set thinking.display to 'summarized' to restore summarized thinking text
- 05Claude Opus 4.7 maintains 1M token context window, 128k max output tokens, and the same feature set as Opus 4.6 at $5/$25 per MTok pricing
- 06Anthropic provides a Claude API skill in Claude Code (/claude-api migrate) to automate migration across codebases