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

  • /model on its own opens a list to pick from.
  • /model sonnet, or any other name below, switches at once.
  • /model default goes back to Claude Code's own choice.

What each name stands for

  • opus: Claude Opus 5.5
  • sonnet: Claude Sonnet 5.5
  • haiku: Claude Haiku 5.5
  • fable: Claude Fable 5.2
  • opusplan: Opus while Claude Code plans, Sonnet for the rest
  • sonnet[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 sonnet starts one session on a model.
  • The ANTHROPIC_MODEL environment variable does the same.
  • model in ~/.claude/settings.json sets it for every session.
settings.json
{
  "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:

bash
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:

bash
export ANTHROPIC_BASE_URL="https://api.slashmodel.com"
export ANTHROPIC_AUTH_TOKEN="$SLASHMODEL_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-5-5"
claude

A 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.

One key for every model here.

Top up from $10, change one URL, and pay only for the tokens you use.