Claude Code · Requests and models
There's an issue with the selected model
The configured model name isn’t recognised, or your account or provider doesn’t have access to it.
Message
The exact error
There's an issue with the selected model (claude-haiku-4-5-20251001). It may not exist or you may not have access to it. Run /model to pick a different model.Also appears as:
- Non-interactive mode (-p)
- There's an issue with the selected model (…). It may not exist or you may not have access to it. Run --model to pick a different model.
- Switching by name
- Model 'claude-opus-9' not found
Meaning
What it means
Claude Code asked for a model the API doesn’t know or won’t give you. Common reasons are an old dated model ID saved in your settings, a typo, a model your plan or organisation doesn’t include, or a model that your cloud provider or region doesn’t offer yet.
Causes
Common causes
- A stale or mistyped model ID in settings,
ANTHROPIC_MODELor--model - A model not included in your plan or allowed by your organisation
- On Bedrock or Google Cloud, a model not yet available in your region
Fix
How to fix it
Pick from the list
Run
/modelwith no argument and choose one of the models available to your account.Use an alias instead of a dated ID
Aliases like
sonnetoropusalways resolve to a current model, so they don’t go stale the wayclaude-…-20251001IDs do.Remove the stale setting
If the wrong model keeps coming back, check where it’s set: the
modelkey in your settings files, theANTHROPIC_MODELvariable, and any--modelflag in scripts or aliases.macOS / Linux echo $ANTHROPIC_MODEL grep -n '"model"' ~/.claude/settings.json .claude/settings.json 2>/dev/nullWindows PowerShell $env:ANTHROPIC_MODEL Select-String -Path $HOME\.claude\settings.json, .claude\settings.json -Pattern '"model"' -ErrorAction SilentlyContinueFor -p and scripts
Pass
--modelwith a valid alias or ID, or setANTHROPIC_MODEL.
Related