Skip to content

Model selection & multi-provider

You glance at the month’s API bill and realise you’ve been paying flagship-model rates to do… flagship-model things: renaming variables, regenerating docstrings, running greps and summarising the results, reformatting a JSON file. Tasks the cheapest model in the lineup would handle in half a second. You don’t need Opus to spell connectionTimeout correctly.

The reverse trap exists too. You’ve been letting the cheap fast model lead a complex refactor because you didn’t want to pay for the big one, and now you’re three rounds into untangling a design it tied itself in knots over. The cheap model’s hourly cost was negligible. The total cost - yours, in time spent unscrewing what it did - wasn’t.

Both traps have one root: a single model doing every kind of work. Model selection is the fix, and it is a per-task choice rather than a setting you get right once. The same CLI drives a flagship tier, a default tier, and a lightweight tier, and the pick can live anywhere from a mid-session command to a line in a subagent’s frontmatter.

The mechanics are everywhere: every CLI in scope can be steered to a specific underlying model - and most can swap models mid-session. The model is the engine: a “smarter” model reasons more deeply, plans longer, and costs more per token; a “lighter” model is faster, cheaper, and good enough for most mechanical work.

The one structural difference between the tools is single-vendor versus multi-vendor, and it decides more than which logo you see in the picker. It sets whether a model swap is a config edit or a tool migration, whether cost optimisation has anywhere to go, whether side-by-side comparison is possible at all, and how exposed you are when one provider has an outage or moves its prices. The Comparison table below splits the six along that line.

Real-world examples of how teams allocate models:

  • The main loop uses the default tier - each tool chooses a current default calibrated for general coding. Exact model names churn, so check the tool’s current model documentation before relying on one.
  • Heavy planning / review uses the flagship - switch to Opus / strongest GPT-5 for “design this feature,” “review this 800-line diff,” “debug this race condition.” Switch back after.
  • Exploration subagents use the cheap fast tier - a small model for “find every place we call X” or “summarise these 40 files.” The work is high-volume and low-stakes per call.
  • Side-by-side comparisons - you can wire up OpenCode’s multi-provider agents to send the same prompt to Claude, GPT-5, and a Gemini, then diff the answers. Useful for hard architecture questions where you don’t trust any single answer.
  • Local / private models for sensitive code - OpenCode pointed at a local Ollama or LM Studio for code that mustn’t leave the machine.
  • Provider failover - when one provider has an outage or rate-limits, OpenCode lets you swap providers without changing tool.

The test: if you’ve been using the same model for everything, you’re either overpaying or under-thinking. The right answer is usually “two or three models, picked per task.”

Pick the kind of work and where the choice should live - mid-session, at launch, pinned in config, or per subagent - and see the right tier plus the exact switch mechanism in each tool:

Work
Scope
useclaude-opus-4-7
/model
  • whyReasoning depth is the bottleneck here. The flagship’s per-token premium is cheaper than the hours you’d spend untangling a design the light model tied in knots.
  • modelThe reasoning ceiling of the lineup, with a 1M-token context window.
  • howLists the available models; the pick applies to the rest of the conversation.
  • rosterAnthropic models only. Changing vendors means changing tools - the vendor-risk trade the multi-provider tools soften.
You want to…Reach forNot
Cheaper, faster runs on simple tasksSwitch to a lighter modelA heavier prompt on the flagship
Deeper reasoning on a hard problemSwitch to the flagshipMore skills/context on a lighter one
Different model per workerPer-subagent model fieldRestarting the whole session
Compare two models on the same taskOpenCode side-by-side agentsRunning the same prompt twice manually
Run a model offline / on-premOpenCode with local providerClaude Code or Codex
Lock the team to one model for consistencyPin model in project configVerbal agreement

Switching models doesn’t replace your prompt, skills, or memory - it changes who’s reading them. If your output quality problem isn’t about reasoning depth, a model swap won’t fix it.

Models: use the live /model picker and current model configuration. Stable aliases commonly include opus, sonnet, and haiku; full IDs, provider prefixes, context-window options, and availability change over time and can depend on plan/provider. Do not assume every model has the same context window; 1M context is conditional.

Switching: /model mid-session lists available models; pick one to switch the rest of the conversation. Pin a default via the model setting or the ANTHROPIC_MODEL env var.

Tier strategy:

  • Opus - use for hard reasoning, planning, and long-diff review when available.
  • Sonnet - a balanced choice for most coding work.
  • Haiku - use for fast, smaller tasks when available.

Claude Code does not support non-Anthropic models.

AspectClaude CodeCodexOpenCodeCursorCopilotPi
Vendor lock-inAnthropic onlyOpenAI onlyMulti-provider (catalog changes)Multi-provider (built-in roster plus Cursor’s own Composer family)Multi-provider (curated roster) - gated by plan and org policyMulti-provider (user-configured roster)
In-session switch/model/model, --modelPer-agent / TUIPer-chat pickerPer-chat picker (/model in CLI)/model, or Ctrl+L / Ctrl+P picker
Curated model listCurrent Anthropic rosterCurrent OpenAI rosterZen (curated)Composer + rosterPlan-tier rostermodels.json (user-defined roster)
Auto-routing mode---Auto ModeAuto model selection (10% discount)-
Different model per subagentYes (frontmatter model:)Yes (model field in the agent’s TOML)Yes (per-agent markdown frontmatter model:)Yes (subagent frontmatter)Yes (frontmatter model:; fallback behavior is surface/policy-dependent)N/A (no built-in subagents)
Side-by-side comparisonN/AN/ANative: two agents, two providers, one prompt 2---
Org / policy gatingManaged settingsManaged settingsConfigTeam / EnterpriseBusiness / Enterprise allow-deny-

1 Model availability and fallback behavior can vary by surface, account, and organization policy; verify the current agent schema before relying on a list.

2 OpenCode’s per-agent provider is the only built-in path to a comparison run. Everywhere else you send the same prompt twice by hand and hold both answers in your head.

  • Vendor risk. If you’ve standardised on Claude Code or Codex and need to switch providers, you switch tools, not just config. Cursor, OpenCode, and Copilot soften that by carrying multiple vendors inside one tool.
  • Premium-request burn (Copilot). Coding Agent runs and model choices can consume plan-governed premium requests; check the current quota rules before using an expensive model for high-volume sweeps.
  • A model pick that changes your billing mode (Cursor). MAX Mode expands the context window to the model’s maximum and can change the pricing treatment of that request. Cursor’s MAX Mode documentation does not establish one durable auto-enable list or override behavior across models and releases, so check the current model picker before treating either as universal.
  • Planning on one model, building on another. Cursor’s Plan mode splits the loop across two models natively - the only tool in scope that does. Elsewhere the same effect needs a mid-session switch, and a second switch back that is easy to forget.
  • Catalogs that move under you (Codex). Codex publishes no static model list; codex debug models prints what your account can actually drive. Run it before trusting a model ID copied out of a tutorial.
  • “Model” sometimes means the family (Opus, Sonnet, GPT-5) and sometimes the snapshot ID (claude-opus-4-7-20...). Be explicit when documenting model selection - snapshot IDs change over time.
  • “Auto” means different things across tools. Cursor’s Auto Mode picks a model on Cursor’s terms from a discounted pool. Copilot’s Auto model selection picks for you with a 10% premium-request discount. They are not the same primitive.

A model policy is worth ten minutes and rarely gets them. Go back over your last week of sessions and find the ones that ran on the flagship only because it happened to be selected: the greps, the file summaries, the docstring passes. Those move down a tier. Then pin the everyday default in project config so the team stops re-picking by hand, and when you name a tier in your rules, name a family rather than a snapshot ID. The IDs on this page will rot; the tiers won’t.