Skip to content

Instantly share code, notes, and snippets.

@Gabe-LS
Last active July 2, 2026 15:47
Show Gist options
  • Select an option

  • Save Gabe-LS/b618db48f84e438efbb546a5f7d19997 to your computer and use it in GitHub Desktop.

Select an option

Save Gabe-LS/b618db48f84e438efbb546a5f7d19997 to your computer and use it in GitHub Desktop.
How to use Claude Opus 4.6 1M in Claude Code

Using Claude Opus 4.6 1M in Claude Code

Claude Opus 4.6 with the 1M context window can be used in Claude Code in two ways.

Option 1: Launch with the model flag

claude --model claude-opus-4-6\[1m\]

This sets the model for the current session only, without changing your default.

Option 2: Switch models inside a session

Start Claude Code normally:

claude

Then use the slash command to switch models:

/model claude-opus-4-6[1m]

Note: /model saves the choice as your new default. To use a model temporarily without changing your default, use --model at launch (Option 1).

Restore default model

If /model or another setting change overwrote your default, restore it with:

sed -i '' 's/"model": ".*"/"model": "claude-opus-4-6[1m]"/' ~/.claude/settings.json
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment