Claude Opus 4.7 budget_tokens Removal: Migration from Extended Thinking

Claude Opus 4.7 budget_tokens Removal: Migration from Extended Thinking

Claude Opus 4.7, released April 16, 2026, silently removed budget_tokens from its extended thinking API. Any code that passes budget_tokens to Opus 4.7 receives an immediate 400 Bad Request error. The fix is a four-step migration: switch to adaptive thinking type, replace budget_tokens with the effort parameter, update agentic loops to use task_budget, and strip temperature, top_p, and top_k. This guide walks through each step with exact before/after code. What Changed in Claude Opus 4.7: budget_tokens Is Gone Claude Opus 4.7 removed budget_tokens entirely from the extended thinking configuration, replacing it with an adaptive thinking system that automatically allocates reasoning compute based on task complexity. The change affects every application that previously used thinking: { type: "enabled", budget_tokens: N } to control how much the model “thinks” before responding. Released April 16, 2026, Opus 4.7 also removes temperature, top_p, and top_k parameters — three additional fields that silently accepted values in 4.6 but now return 400 errors in 4.7. Pricing remains unchanged at $5/M input tokens and $25/M output tokens, and the model shows a 13% coding benchmark lift over Opus 4.6 on Anthropic’s internal 93-task evaluation. For teams upgrading by changing only the model string, these breaking changes arrive without warning in production — there is no deprecation header or soft-failure mode in the API response before the hard 400 begins. ...

April 25, 2026 · 12 min · baeseokjae