LLM model/API behavior drift

Anthropic Claude API invalid_request_error budget_tokens thinking model change previous model

A request that worked on the previous model returns invalid_request_error after only the model ID changes.

Claude APIHosted AI APIsLLM model/API behavior driftanthropic_migrate

Agent Quick Fix

Repair against the current Claude API contract, then keep the change narrow and source-backed.

Product: Claude API
Current-contract area: Manual `budget_tokens` thinking rejected
Likely root cause: A request that worked on the previous model returns invalid_request_error after only the model ID changes.
Repair direction: Verifier checks current model ID, accepted payload, structured output/tool parsing, and behavior under retries.

Symptom

A request that worked on the previous model returns invalid_request_error after only the model ID changes.

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.

Anthropic Claude API invalid_request_error budget_tokens thinking model change previous model
site:docs.anthropic.com thinking budget_tokens Claude API
Anthropic API "budget_tokens" "thinking"
https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking
'invalid_request_error' in https://docs.anthropic.com/en/docs/build-with-claude/extended-thinking

Source Trail