How to switch between AI coding models

No single model is best at everything. Here is when to switch, and how to switch between Claude, OpenAI and local models without changing your workflow.

Different models have different strengths and very different costs. Using the strongest model for a typo fix wastes money and usage limits; using a tiny local model for a complex refactor wastes time. Switching models per task gets you the best of each.

When to switch

TaskGood choice
Small edits, copy changes, explanationsA local model, or a lighter cloud model such as Claude Haiku
A new feature in a familiar projectA mid-sized cloud model, such as Claude Sonnet
Complex refactors, tricky bugs, unfamiliar codeThe strongest model you have, such as Claude Opus or OpenAI's top Codex model
Private or offline workA local model, which keeps your code on your machine instead of sending it to another company
A second opinionA different provider's agent

Switching inside one agent

Most agents let you change model without leaving them. Claude Code offers Anthropic's model families (Opus, Sonnet and Haiku), and Codex offers OpenAI's GPT models, including coding-tuned ones; both can change model during a session. This is the easiest switch, but it keeps you within one provider.

Switching between providers

Moving between Claude, OpenAI and local models usually means changing tools: a different terminal command, a different extension or a different app. Because your project is just files, any agent can pick up where another left off. Keeping instructions in a project file the agents read (such as CLAUDE.md for Claude Code or AGENTS.md for Codex) helps each one start with the same context.

Switching in AI editors

Editors such as Cursor, VS Code with Copilot and Zed offer model pickers, and several support your own API keys or local models. Check how each bills: some charge third-party models at API prices on top of the plan.

Switching in Nexus

Nexus is built for this. In its chat, you pick the engine for each task: Claude Code by Anthropic, the Codex app by OpenAI, or a local model through Nexus's built-in MLX engine or Ollama. You can also pick the model, and for Claude Code how hard it should think, from Low to Max. Your last choice is remembered on your Mac. Every task, whichever model did it, gets the same diff and restore point, so you can compare results and roll back. Claude Code and Codex use your own plans; local models are free. Nexus will be a one-time purchase of $199 USD, with no Nexus subscription. Connecting third-party AI services such as Claude Code or Codex is optional and at your own expense (see Nexus pricing). It's for Apple silicon Macs with macOS 12 or later (14 or later for local models and the Codex app, 13 or later for Claude Code), and Nexus is coming soon.

Frequently asked questions

Can I switch models in the middle of a project?

Yes. Your project is just files, so any agent or model can pick it up. Tools such as Nexus let you change the engine and model in the chat between tasks.

Which model should I use for simple edits?

A smaller, faster model, such as Claude Haiku or a local open model, is usually enough for simple, well-defined changes and costs less or nothing.