temperature, top_p and top_k are not supported on this model
What's actually happening
A request that set temperature, top_p or top_k — sampling controls that have been part of
the API since the earliest models — starts failing outright the moment it's pointed at Opus 4.7
or anything newer in that line. Not a warning, not a silently ignored field: a rejected request.
Code that has worked unchanged across several prior model generations breaks on this one
specifically.
Why these three fields disappeared together
All three sampling controls, along with the older thinking-budget mechanism, were retired as a
set once the effort parameter took over as the primary lever for how a model reasons before it
answers. That's not a coincidence — temperature, top_p and top_k shape how a model samples
its output token by token, while effort shapes how much it thinks before producing that
output at all, and the newer models consolidated reasoning control into the one mechanism rather
than layering it on top of the older sampling knobs. Carrying request-building code forward from
an older Opus model without touching the sampling block is the most common way this gets hit —
most of the request shape stays identical across the generations, which makes the one incompatible
corner easy to miss.
Fixing it
Drop all three fields from the request body for any model in this line. There's no direct
replacement for what they did — a lower temperature value doesn't map onto a specific effort
level — so treat their removal as a genuine behaviour change to test against, not a
find-and-replace. If your use of these fields was about getting more consistent, less varied
output for a specific task, that's a different problem than reasoning depth, and worth solving at
the prompt level rather than by hunting for a sampling-control substitute that no longer exists.
What to check next
If this broke a migration you thought was otherwise complete, check the same request body for
budget_tokens too — it was removed on the identical set of models for a related but separate
reason. See budget_tokens is not supported on Opus 4.7 and later
if you haven't already hit that one, and what actually changed from Opus 4.6 to Opus 5
for the fuller picture of what else moved in the same generation.
Verified 2026-08-08 against ClaudeHow facts module (src/data/facts/) — see /about/#accuracy.