[IND] 5 min readOraCore Editors

5 model config tips for Claude Code users

5 model config tips for Claude Code users, including aliases, startup flags, and admin controls that shape model choice.

Share LinkedIn
5 model config tips for Claude Code users

Claude Code model config lets you choose, pin, and restrict models for each session.

Claude Code lets you pick from aliases, full model names, and provider-specific IDs, with claude --model at startup and /model during a session.

ItemBest forNotable behavior
defaultMost usersUses the recommended model for your account type
sonnetDaily codingLatest Sonnet model for general work
opusComplex reasoningLatest Opus model; can map to different versions by provider
haikuFast, simple tasksEfficient model for lightweight requests
opusplanPlanning plus executionOpus for plan mode, then Sonnet for implementation

1. Use model aliases when you want speed with less memorizing

Get the latest AI news in your inbox

Weekly picks of model releases, tools, and deep dives — no spam, unsubscribe anytime.

No spam. Unsubscribe at any time.

Claude Code supports aliases such as default, best, sonnet, opus, haiku, sonnet[1m], opus[1m], and opusplan. These are handy when you want a behavior, not a version string.

5 model config tips for Claude Code users

Aliases point to recommended releases for your provider and can change over time, which is useful if you want the current default rather than a pinned build. If you need a fixed version, use the full model name instead, such as claude-opus-4-8.

  • default clears overrides and returns to the recommended model for your account type
  • best maps to the most capable available model
  • opusplan uses Opus in plan mode and Sonnet in execution mode

2. Start with claude --model when you want a clean session

The startup flag sets the model for the terminal session you launch, which is useful when you want different models in different windows. The docs note that --model and ANTHROPIC_MODEL apply only to the session you start with them.

That makes startup selection a good fit for side-by-side work: one terminal can stay on Opus for hard reasoning while another uses Sonnet or Haiku for routine edits. If you resume a prior session, Claude Code keeps the model that was active when the transcript was saved.

claude --model opus claude --model sonnet

3. Use /model in-session when you need to switch quickly

The /model command changes the active model without restarting the app. In current versions, opening the picker and pressing Enter saves the choice as the default for new sessions, while s switches only the current session.

5 model config tips for Claude Code users

This is the fastest path when you realize a task needs a different balance of speed and reasoning. Claude Code also asks for confirmation when the conversation already has prior output, because the next response re-reads the full history without cached context.

  • Type /model sonnet to switch directly
  • Run /model with no argument to open the picker
  • Use Enter in the picker to save the choice

4. Pin versions and set defaults when consistency matters

If you need repeatable behavior, the docs recommend pinning a full model name or setting environment variables such as ANTHROPIC_DEFAULT_OPUS_MODEL and ANTHROPIC_DEFAULT_SONNET_MODEL. This matters because aliases can move to newer releases as Anthropic updates them.

Version pinning is especially useful in team settings, managed deployments, and long-lived workflows where the same prompt should keep landing on the same model. The docs also note that Opus 4.8 requires Claude Code v2.1.154 or later.

  • model in your settings file sets the startup default
  • ANTHROPIC_DEFAULT_SONNET_MODEL pins what sonnet and Default resolve to
  • ANTHROPIC_DEFAULT_OPUS_MODEL pins Opus resolution

5. Add admin limits when you need to control user choice

Enterprise admins can use availableModels in managed or policy settings to limit what users can pick. That list is enforced in the picker, the --model flag, and ANTHROPIC_MODEL, so users cannot move outside the allowlist.

For tighter control, combine availableModels with a model setting and the default-model environment variables. The docs warn that the picker’s Default option still resolves to the system default for the user’s tier unless you pin what Default maps to.

{ "model": "claude-sonnet-4-5", "availableModels": ["claude-sonnet-4-5", "haiku"], "env": { "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-5" } }

How to decide

Pick aliases if you want quick selection and are fine following Anthropic’s recommended updates. Pick full model names and default environment variables if you need stable, repeatable runs across sessions or providers.

If you are an admin, use availableModels plus a pinned default to shape what users can choose and what Default means. If you are an individual user, start with claude --model for a fresh session, then use /model when you want to switch on the fly.