LLM model/API behavior drift
Anthropic API temperature top_p parameter messages docs
The SDK constructs the request successfully, but the hosted API returns HTTP 400.
Agent Quick Fix
Repair against the current Claude API contract, then keep the change narrow and source-backed.
Product: Claude API
Current-contract area: Non-default `temperature`/`top_p` rejected by current model
Likely root cause: The SDK constructs the request successfully, but the hosted API returns HTTP 400.
Repair direction: Verifier checks current model ID, accepted payload, structured output/tool parsing, and behavior under retries.
Symptom
The SDK constructs the request successfully, but the hosted API returns HTTP 400.
Why This Happens
SDK types may still accept fields that the selected hosted model rejects; model retirement, tokenizer, thinking, and tool behavior are external and fast-moving.
Common Wrong Fixes
- Changing local code without checking the current external contract.
- Retrying the same install, build, or API call with no version/source change.
- Applying a broad unsafe bypass when a narrow compatibility fix is available.
Codex Search Keywords
These are the search terms observed in a neutral Codex validation run for this failure shape.
site:docs.anthropic.com Claude API temperature top_p current model rejected both temperature top_p 400
Anthropic API temperature top_p parameter messages docs
https://docs.anthropic.com/en/api/messages
https://docs.anthropic.com/llms.txt