Claude Code models: the built-in aliases, how to switch, and uncensored models we ran
The Morse teamPublished Facts checked 4 min read
Claude Code models are picked with aliases: default, opus, sonnet, haiku, best, opusplan, and fable, each standing for a Claude model, which on Anthropic's own API are Opus 5.5, Sonnet 5.5, and Haiku 5.5 for the first three. Claude Code can also run models that aren't Claude, including uncensored ones, through any endpoint that serves Anthropic's Messages API: we ran six of them on December 3, 2026, and all six fixed the bug we gave them.
The aliases and settings below are from Anthropic's model configuration docs and environment variable reference, read on December 3, 2026, for Claude Code 2.1.333.
The built-in Claude Code models
| Alias | What Anthropic's docs say it does |
|---|---|
default | "Reverts to the runtime default for your account" |
opus | "Uses the latest Opus model for complex reasoning tasks" |
sonnet | "Uses the latest Sonnet model for daily coding tasks" |
haiku | "Uses the fast and efficient Haiku model for simple tasks" |
best | "Uses the same model as opus" |
opusplan | "Uses opus during plan mode, then switches to sonnet for execution" |
fable | "Uses the Fable model for your provider" |
sonnet[1m], opus[1m] | The same models with a 1 million token context window, where the model doesn't already have one |
What each alias resolves to depends on where Claude Code runs. On Anthropic's API, opus, sonnet, and haiku are Opus 5.5, Sonnet 5.5, and Haiku 5.5. On Amazon Bedrock they're Opus 5.5, Sonnet 4.5, and Haiku 4.5, so the same alias can be a different model at work and at home.
How to change the model in Claude Code
Anthropic lists five ways, highest priority first:
/modelin a session, with an alias or a full name, or on its own to open the picker. It also saves your choice as the default for new sessions.claude --model <name>when you start a session.ANTHROPIC_MODELin your shell. It applies over themodelfield in any settings file."model"in a settings file, such as"model": "opus".ANTHROPIC_DEFAULT_MODEL, which applies only when no settings file sets a model.
Three more variables decide what the aliases point to: ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, and ANTHROPIC_DEFAULT_HAIKU_MODEL. The haiku one is "also used for background functionality", such as naming a session. That matters as soon as you run a model that isn't Claude, because Claude Code keeps sending that background work to whatever the aliases name.
Running other models in Claude Code
Claude Code talks to Anthropic's Messages API. Point ANTHROPIC_BASE_URL at another endpoint that serves the same API, set the model, and Claude Code runs on it. Anthropic's docs are plain that this is outside what it supports: Anthropic "doesn't support routing Claude Code to non-Claude models through any gateway." It works because the endpoint speaks the same API, so test the model you pick before you rely on it.
Morse serves the Messages API at https://inference.trymorse.ai, so Claude Code runs Morse's uncensored models with these settings, from Morse's Claude Code guide:
export ANTHROPIC_BASE_URL=https://inference.trymorse.ai
export ANTHROPIC_AUTH_TOKEN="$MORSE_API_KEY"
export ANTHROPIC_MODEL=z-ai/glm-5.3-flash-uncensored
export ANTHROPIC_DEFAULT_OPUS_MODEL=z-ai/glm-5.3-flash-uncensored
export ANTHROPIC_DEFAULT_SONNET_MODEL=z-ai/glm-5.3-flash-uncensored
export ANTHROPIC_DEFAULT_HAIKU_MODEL=z-ai/glm-5.3-flash-uncensored
export CLAUDE_CODE_MAX_OUTPUT_TOKENS=32000
export CLAUDE_CODE_AUTO_COMPACT_WINDOW=200000
- The base URL has no
/v1: Claude Code adds/v1/messagesitself. - All four model lines name the same model, so background work goes there too instead of failing on a Claude name Morse doesn't serve.
CLAUDE_CODE_MAX_OUTPUT_TOKENSmust be at most the model's longest reply, and Claude Code compacts the conversation as it nearsCLAUDE_CODE_AUTO_COMPACT_WINDOW.
Six uncensored models we ran in Claude Code
On December 3, 2026, we gave Claude Code 2.1.333 the same task with each model: a 10-line Flask file that built a SQL query with an f-string, and the prompt "Fix the SQL injection in app.py with a parameterized query. Change only that line." Claude Code ran headless with only its Read and Edit tools, and with every model line set to the model under test.
| Model | Turns | Time, start to finish | Result |
|---|---|---|---|
| Gemma 4 26B A4B Uncensored | 4 | 7.1 s | Correct one-line fix |
| GLM 5.3 Flash Uncensored | 3 | 8.2 s | Correct one-line fix |
| DeepSeek V4.1 Flash 1017 Uncensored | 4 | 26.9 s | Correct one-line fix |
| Kimi K3.1 Pro Uncensored | 3 | 27.7 s | Correct one-line fix |
| Ling 3.1 Flash Uncensored | 4 | 31.4 s | Correct one-line fix, and it checked the result |
| Qwen3.8 27B Uncensored | 3 | 68.9 s | Correct one-line fix |
Every model wrote the same line, a ? placeholder with the value passed separately:
row = db.execute("SELECT id, email FROM users WHERE name = ?", (name,)).fetchone()
The faster models are the ones that reason less before they act. Qwen3.8 27B Uncensored thinks longest, which costs time on a one-line fix and pays off on harder ones.
Which uncensored model to run in Claude Code
All six take tool calls, which Claude Code needs to read and edit files. These are abliterated builds of open models, read from the live catalog on December 3, 2026:
| Model | Context | Price |
|---|---|---|
| GLM 5.3 Flash Uncensored | 1M tokens | $0.225 per million input tokens and $1 per million output tokens |
| Gemma 4 26B A4B Uncensored | 256K tokens | $0.175 per million input tokens and $0.85 per million output tokens |
| DeepSeek V4.1 Flash 1017 Uncensored | 1M tokens | $0.50 per million input tokens and $1.50 per million output tokens |
| Kimi K3.1 Pro Uncensored | 1M tokens | $5 per million input tokens and $18.75 per million output tokens |
| Ling 3.1 Flash Uncensored | 1M tokens | $0.35 per million input tokens and $1.20 per million output tokens |
| Qwen3.8 27B Uncensored | 256K tokens | $0.35 per million input tokens and $1.75 per million output tokens |
For quick edits, start with GLM 5.3 Flash Uncensored or Gemma 4 26B A4B Uncensored. For a large repository, pick a model with a million-token window and set CLAUDE_CODE_AUTO_COMPACT_WINDOW to 200,000. Uncensored models are for work like the Cybersecurity and Agent security uses on Morse's /inference page: proofs of concept against your own code, fuzzing harnesses, and test suites full of hostile input.
Run Claude Code privately on Morse
Claude Code sends your source code with every request. Morse Private Inference serves uncensored models behind Anthropic's Messages API as well as OpenAI's, and Morse has zero data retention agreements with its inference, search, and other providers. You pay per token from credits, with no subscription.
Get an API key, make a key for Claude Code alone with a spend limit, and paste the settings above. Whether Claude Code itself trains on your code is a separate question, answered in does Claude Code train on your code.
Common questions
What model does Claude Code use by default?
The default depends on your account and provider. The default alias reverts to the runtime default for your account. Run /model with no argument to see which model you're on.
How do I change the model in Claude Code?
Type /model in a session, start it with claude --model, or set ANTHROPIC_MODEL in your shell. A model field in your settings file makes it permanent. Claude Code reads them in that order of priority.
What is opusplan in Claude Code?
An alias that uses the opus model while you're in plan mode and switches to the sonnet model when the work starts.
Can Claude Code use models other than Claude?
Yes, through an endpoint that serves Anthropic's Messages API. Set ANTHROPIC_BASE_URL to it and name the model. Anthropic's docs say it doesn't support routing Claude Code to non-Claude models through a gateway, so that setup is between you and the endpoint you choose. We ran six uncensored models this way on December 3, 2026.