What this model error usually means
Anthropic: Claude Sonnet 4 returning 400 / context length exceeded means you should first confirm whether model ID anthropic/claude-sonnet-4 is visible for this Anthropic key, then separate permission, context, capability, rate limit, or route issues.
- Model: anthropic/claude-sonnet-4
- Provider: Anthropic
- Status code: 400