The /model command in Claude Code
How Claude Code's /model command works, which model each of its names stands for, and the other ways to choose a model, on Anthropic's API or on slashmodel.
Checked November 24, 2026
/model changes the model Claude Code uses, in the middle of a session or for the ones to come. This page lists the names it takes and the other ways to choose.
Use /model
/modelon its own opens a list to pick from./model sonnet, or any other name below, switches at once./model defaultgoes back to Claude Code's own choice.
What each name stands for
opus: Claude Opus 5.5sonnet: Claude Sonnet 5.5haiku: Claude Haiku 5.5fable: Claude Fable 5.2opusplan: Opus while Claude Code plans, Sonnet for the restsonnet[1m],opus[1m]: the same model with the 1M-token context window, which the current models have anyway- A full model id, such as
claude-fable-5-1, for a model that has no name of its own
This is what Claude Code 2.1 asked for on 24 Nov 2026: we read the model id in its requests to slashmodel. A later version can point a name at a newer model.
Other ways to choose
claude --model sonnetstarts one session on a model.- The
ANTHROPIC_MODELenvironment variable does the same. modelin~/.claude/settings.jsonsets it for every session.
{
"model": "sonnet"
}When several are set, the first of these wins: /model in the session, --model, ANTHROPIC_MODEL, then the settings file.
Point a name at another model
ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL and ANTHROPIC_DEFAULT_FABLE_MODEL set the model id each name stands for. This makes fable mean Fable 5.1:
export ANTHROPIC_DEFAULT_FABLE_MODEL="claude-fable-5-1"On slashmodel
With Claude Code set up for slashmodel, every name above works: slashmodel serves Claude Opus 5.5, Sonnet 5.5, Haiku 5.5 and Fable 5.2 in Anthropic's format. This starts a session on Sonnet:
export ANTHROPIC_BASE_URL="https://api.slashmodel.com"
export ANTHROPIC_AUTH_TOKEN="$SLASHMODEL_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
claudeA model that isn't served in Anthropic's format, such as a GPT model, fails in Claude Code with "There's an issue with the selected model". Claude Code Router is a way to use those.