How to Switch to Claude Opus 5 in Cursor, Claude Code & the API
Claude Opus 5 went live on July 24, 2026. Because it lands at the same price as Opus 4.8 — $5 / $25 per 1M tokens — switching is one of the rare upgrades with no rate increase attached. But like every Claude release, it doesn’t appear on every surface at once: some places update server-side, some need a CLI update, and the API needs an exact model-ID string.
This is the complete switch guide for every surface, with the exact commands, the model-ID format, and the one Opus-5-specific gotcha — a silent fallback to Opus 4.8 on flagged requests — that quietly changes which model your security-adjacent calls actually run on.
Key facts:
- Claude API model ID (and alias):
claude-opus-5. All dashes. (Source: Anthropic models overview) - Pricing: $5 / $25 per 1M input/output tokens — identical to Opus 4.8. (Source: Anthropic, 2026-07-24)
- Context window: 1M tokens. Max output: 128k tokens (up to 300k via the Message Batches API beta header). (Source: Anthropic models overview)
- The
effortparameter defaults tohighon the Claude API and Claude Code. (Source: Anthropic models overview) - A new Fast Mode runs ~2.5× faster for 2× the base price.
- Flagged cyber requests silently fall back to Opus 4.8 on claude.ai, Claude Code, and Cowork. (Source: Anthropic, 2026-07-24)
The 30-second answer
| Where you use Claude | How to switch to Opus 5 |
|---|---|
| Claude Code | claude update, then /model and pick Opus 5 |
| Claude Code (one session) | claude --model claude-opus-5 |
| claude.ai / desktop app | Click the model name in the prompt box → Opus 5 |
| Anthropic API | Set model to claude-opus-5 (all dashes) |
| AWS Bedrock | anthropic.claude-opus-5 (Messages-API endpoint) |
| Google Vertex AI | claude-opus-5 |
| Cursor / Cline / other IDE tools | Update the extension, then select Opus 5 in its model menu |
| GitHub Copilot | Pick Claude Opus 5 in the Copilot model dropdown (Pro+, Max, Business, Enterprise) |
If you only do one thing: in Claude Code, run claude update and then /model. That fixes the “Opus 5 isn’t in my list” problem for almost everyone.
For what actually changed in Opus 5 and whether it’s worth switching, see our companion piece: Claude Opus 5 lands at the same price as Opus 4.8.
Should you switch at all? (Yes — here’s the honest version)
Because the per-token rate is unchanged from Opus 4.8, a like-for-like switch to claude-opus-5 is a genuine free upgrade on the sticker price. On Anthropic’s own numbers, the gap is largest on the agentic tasks that burn the most tokens:
- Agentic terminal coding (Frontier-Bench v0.1): 43.3%, more than double Opus 4.8’s 21.1%.
- Computer use (OSWorld 2.0): 70.6% vs 55.7%.
- Business workflows (AutomationBench): 26.0% vs 17.0%.
Two honest caveats before you flip every workload:
- It doesn’t win everything. GPT-5.6 Sol still leads DeepSWE v1.1 (72.7% vs 68.8%), and Fable 5 stays ahead on legal and health evals.
- Fast Mode changes the math. At 2× base price, Fast Mode is easy to leave on without noticing. Check your usage dashboard the first week.
The clean migration move: re-run your own eval suite (not Anthropic’s benchmarks) on claude-opus-5 at default effort, compare cost-per-completed-task against your current model, and only then decide.
Claude Code: the full walkthrough
This is where most people get stuck, so it gets the most detail.
Step 1 — Update the CLI
claude update
The model picker only shows what your installed CLI version knows about. An old CLI has no idea Opus 5 exists — so if you open Claude Code, you’re still on Opus 4.8, and Opus 5 isn’t even in the /model list, this is almost always a stale CLI, not an account problem.
The version that matters: Claude Code v2.1.219 or later. Below that, Opus 5 doesn’t appear in the picker at all. (Verified while writing this guide: claude --version reporting 2.1.220 (Claude Code) runs Opus 5 fine.)
Re-run claude --version afterward to confirm you’re on 2.1.219+.
Step 2 — Open the model picker
Inside a Claude Code session, type:
/model
You’ll get an interactive picker. Arrow to Opus 5, hit Enter. Selecting a model in /model saves it as the default for all new sessions — it writes the model field into your user settings, so you don’t have to re-pick every time. (Source: Claude Code model configuration)
In the picker, Opus 5 is listed with its 1M context window and marked as the recommended default.
Step 3 — Or switch for a single session
claude --model claude-opus-5
The CLI also accepts the short alias opus for “the latest Opus,” but pinning the explicit claude-opus-5 is safer if you want to stay on this exact version after the next Opus ships.
Step 4 — Or pin it in settings
To set it permanently without the picker, add the model field to your Claude Code user settings (~/.claude/settings.json):
{
"model": "claude-opus-5"
}
This is the same field /model writes for you. Editing it by hand is useful for dotfiles, shared team configs, or CI environments where you can’t run an interactive picker.
Step 5 — Verify
Run /status inside a session, or /model again and look for the checkmark next to Opus 5.
claude.ai and the desktop app
No update needed here. Anthropic rolls the model out server-side.
- Open claude.ai (or the Mac/Windows desktop app).
- In the prompt box, click the model name at the bottom-right.
- Pick Opus 5 from the dropdown.
Opus 5 sits at the top of the picker as the most capable everyday model. The Effort row defaults to High; you can push it higher for hard one-shot problems, but High is the right default for almost everything — the cost-quality curve flattens fast above it.
The Anthropic API: the model ID
For direct API use, switching is a one-line change — set the model field to:
claude-opus-5
It’s all dashes. Starting with the 4.6 generation, Anthropic uses a dateless, all-dashes format where each ID is a pinned snapshot, not an evergreen pointer — so claude-opus-5 will keep resolving to this exact model even after the next Opus ships. (Source: Anthropic models overview)
Minimal curl to confirm it works:
curl -s https://api.anthropic.com/v1/messages \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{
"model": "claude-opus-5",
"max_tokens": 100,
"messages": [{"role": "user", "content": "Reply with the model you are running."}]
}'
In the official SDKs it’s the same string:
# Python
import anthropic
client = anthropic.Anthropic()
msg = client.messages.create(
model="claude-opus-5",
max_tokens=100,
messages=[{"role": "user", "content": "hello"}],
)
// TypeScript
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic();
const msg = await client.messages.create({
model: "claude-opus-5",
max_tokens: 100,
messages: [{ role: "user", content: "hello" }],
});
Thinking and effort on Opus 5
Two things changed from the older thinking parameter world worth knowing:
- Adaptive thinking is on for Opus 5 — the model decides how much to think per turn. The older explicit
thinking.type: "enabled"extended-thinking toggle is not supported on Opus 5 (it was on Sonnet 4.5-era models). (Source: Anthropic models overview) effortdefaults tohighon the Claude API and Claude Code. Set it explicitly (low/medium/high/ higher) to change it. See Anthropic’s Effort guide.
Need more than 128k output?
Max output on the synchronous Messages API is 128k tokens. On the Message Batches API, Opus 5 supports up to 300k output tokens with the output-300k-2026-03-24 beta header. (Source: Anthropic models overview)
The silent fallback that bites security tooling
This is the Opus-5-specific gotcha. Opus 5 ships with tightened cyber safeguards, and on claude.ai, Claude Code, and Cowork, requests its cyber classifiers flag are silently routed to Opus 4.8 instead of running on Opus 5. (Source: Anthropic, 2026-07-24)
If you run security-adjacent workloads — vulnerability scanning, penetration testing, exploit analysis, binary review — some of your calls may quietly execute on the older, weaker-for-your-task model without an error. Two implications:
- Reproducibility: the same prompt can land on two different models depending on classifier state. If you’re benchmarking Opus 5 on security tasks and getting inconsistent results, this is a likely cause.
- Getting unblocked: Anthropic points enterprises and researchers to its Cyber Verification Program to lift the restriction for legitimate defensive work.
Test which of your prompts trip the classifier before you assume Opus 5 is running end-to-end.
Cloud platforms: AWS Bedrock, Vertex AI, Microsoft Foundry
Opus 5 is available on the Claude API, Amazon Bedrock, Claude Platform on AWS, Google Cloud, and Microsoft Foundry. (Source: Anthropic models overview) The exact model-ID string differs per platform:
| Platform | Opus 5 model ID |
|---|---|
| Claude API | claude-opus-5 |
| Claude Platform on AWS | claude-opus-5 (same as the Claude API, not a Bedrock-style ID) |
| Amazon Bedrock | anthropic.claude-opus-5 (via the Messages-API Bedrock endpoint) |
| Google Vertex AI | claude-opus-5 |
Confirm the exact current string in your platform’s model catalog before shipping — Bedrock and Vertex offer global vs regional endpoint variants, and cloud model IDs occasionally carry version suffixes the first-party API does not. You can also query capabilities and token limits programmatically with the Models API.
One caveat worth checking yourself: Microsoft Foundry is listed as a supported platform, but Anthropic’s overview doesn’t break out a separate Foundry model ID or context figure for Opus 5 — and on Foundry, Opus 4.8 was capped at a 200k context rather than the full 1M. If you deploy via Foundry, confirm the context window there before assuming 1M.
Cursor, Cline, and other third-party IDE tools
These wrap the Anthropic API, so two things have to line up:
- The tool’s model list has to include Opus 5. That ships in an app/extension update — so update Cursor / Cline / your tool of choice first.
- The underlying SDK has to be recent enough to accept any new message shapes. If the tool errors, it’s running an old SDK and you wait for its next release.
In practice: update the extension, then pick Claude Opus 5 from its model dropdown. If it’s not listed yet, the tool hasn’t shipped support — there’s nothing to change on your end except wait or, if the tool lets you type a raw model ID, enter claude-opus-5.
GitHub Copilot
Claude Opus 5 is available in GitHub Copilot as of the launch, for Copilot Pro+, Max, Business, and Enterprise users, with a gradual rollout. (Source: GitHub Changelog, 2026-07-24) Open the Copilot model picker (in VS Code, the chat panel’s model dropdown) and select Claude Opus 5. If you don’t see it yet, update the GitHub Copilot extension and check back — the rollout is staged.
Migrating from Opus 4.8: what to check
Anthropic publishes an official Opus 4.8 → Opus 5 migration guide. The short checklist for a clean swap:
- Swap the model string.
claude-opus-4-8→claude-opus-5everywhere you pin it. Same dash format. - Nothing changes on price. $5 / $25 in both directions — the migration is cost-neutral at the token rate.
- Same 1M context / 128k output envelope. No prompt-restructuring needed for context limits.
- Re-test effort levels. Opus 5 verifies its work and iterates more carefully; you may be able to drop from a higher effort level to
high(orhightomedium) on some tasks and still hit quality, saving tokens. - If you were on Opus 4.1, you must move.
claude-opus-4-1is deprecated and retires August 5, 2026 — Opus 5 is the recommended target. (Source: Anthropic models overview)
Which effort level should you use?
| Effort | Use it for |
|---|---|
| high (default) | Almost everything — coding, agent loops, normal chat |
| higher | A single hard sub-step: an architecture decision, a tricky refactor, a planning turn |
| max | Hardest one-shot problems with no time pressure; research-grade reasoning |
The clean pattern in Claude Code: bump effort up for the planning turn of a multi-step task, drop back to default for the execution turns. The plan benefits from more thinking; the execution usually doesn’t.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
Opus 5 not in Claude Code /model list | Stale CLI version | claude update, then /model |
| Still on Opus 4.8 after opening Claude Code | Old default pinned, or old CLI | claude update; /model → Opus 5 |
| Security prompt behaves like an older model | Cyber classifier fell back to Opus 4.8 | Expected; use the Cyber Verification Program for legitimate defensive work |
| Inconsistent results benchmarking Opus 5 | Some calls silently fell back to Opus 4.8 | Test which prompts trip the classifier; pin and log the returned model |
| Spend doubled unexpectedly | Fast Mode left on (2× base price) | Check usage dashboard; disable Fast Mode for routine calls |
| Opus 5 missing in Cursor / Cline | Tool hasn’t shipped support | Update the extension; wait if not listed |
| Cloud call rejects the model ID | Wrong per-platform string | Bedrock: anthropic.claude-opus-5; Vertex/API: claude-opus-5 |
Bottom line
For most people the whole “how do I switch to Opus 5” question is solved by one of two things: in Claude Code, run claude update and then /model; everywhere else, just pick Opus 5 in the model menu or set the API string to claude-opus-5. Because it’s the same price as Opus 4.8, the upgrade is cost-neutral — the only real thing to watch is the silent Opus 4.8 fallback on flagged cyber requests.
For what changed and whether it’s worth it, see Claude Opus 5 lands at the same price as Opus 4.8. For the outgoing flagship’s switch mechanics, see how to switch to Claude Opus 4.8.
Sources
- Models overview — Anthropic docs (model IDs, pricing, context, effort default, cloud IDs)
- Introducing Claude Opus 5 — Anthropic (pricing, Fast Mode, cyber fallback, betas)
- Opus 4.8 → Opus 5 migration guide — Anthropic docs
- Claude Code model configuration — Claude Code docs
- Claude Opus 5 is now available in GitHub Copilot — GitHub Changelog