We Built a Mac App That Switches the AI Model Inside Claude Code and Codex

Claude Code and Codex are wired to one model by default, and switching normally means editing JSON, TOML and environment variables by hand. So we built a small menu-bar app that does it in one click. Here is what it does, how it works, and why lowering the cost of switching matters more than it looks.
Key takeaway
The easier it is to switch the model behind your AI tools, the less locked in you are, and lowering that switching cost is one of the most practical defences a business has against provider dependency.
Anyone who uses Claude Code or OpenAI Codex hits the same wall eventually. The tool is brilliant, but it's wired to one model by default, and the moment you want to try a cheaper one, a faster one, or a model from a completely different provider, you're suddenly editing JSON files, fiddling with TOML, and exporting environment variables. It works, but it's fiddly, error-prone, and exactly the sort of thing that puts people off experimenting at all.
So we built a small Mac app to fix it. It's called LLM Flex, it lives in your menu bar, and it switches the underlying model for Claude Code and Codex with a single click. No config editing, no remembering which file holds which key.
This is a walk through what it does, how it works, and why we think it matters more than it first appears.

The LLM Flex menu, showing the active model for Codex and Claude Code
The problem it solves
Claude Code and Codex are AI coding assistants that run in your terminal or editor. Out of the box, each one points at a specific model from a specific company. That default is sensible, but it isn't always what you want.
Maybe you want to run a cheaper model for routine work and save the expensive one for the hard problems. Maybe you've got an OpenRouter key that gives you access to dozens of models through one account. Maybe you're running a model locally on your own Mac and want to keep your code off the cloud entirely. All of these are reasonable things to want, and all of them normally mean going under the bonnet.
Under the bonnet looks like this: Claude Code reads its model and credentials from `~/.claude/settings.json`. Codex spreads its configuration across `~/.codex/config.toml`, an `auth.json` file, and a launchd environment variable that most people don't even know exists. Get one of them slightly wrong and the tool either ignores you or refuses to start. It's the kind of friction that quietly stops people from ever trying anything other than the default.
LLM Flex takes all of that and hides it behind a profile and an Apply button.
How it works
The core idea is a profile. A profile is one saved combination of provider, model, and API key. You might have one called "OpenRouter, Sonnet" and another called "Anthropic, Haiku", and you switch between them whenever you like.

Creating a profile: pick a provider, paste a key, choose a model
Setting one up takes about a minute. You pick a provider from the list, the base URL fills in automatically, you paste in your API key, and you choose a model (either by typing it or browsing a curated quick-pick of current models). There's a Test Connection button that checks the key and model actually work before you commit, so you're not left wondering why nothing happened.
One detail we're quietly proud of: your API key never touches a config file or a log. It goes straight into the macOS Keychain, keyed to the profile, and gets fetched only at the moment it's needed. Keys are the most sensitive thing in this whole flow, so they get treated accordingly.
When you hit Apply, LLM Flex does the boring work for you. For Claude Code it deep-merges the right settings into `settings.json`, preserving your existing permissions and hooks rather than flattening them. For Codex it writes a clearly marked managed block into the config, updates the auth file, and sets the launchd environment variable that Codex.app actually reads. The status panel at the top turns green and tells you exactly which model is live for each tool.

Both tools flexed: Codex on OpenRouter, Claude Code on Opencode Go
Your next session picks up the new model automatically. No restart, no copy-pasting credentials, no wondering whether it took.

Claude Code starting up on the model LLM Flex switched it to
If you ever want to go back to exactly how things were before you installed it, there's a Restore defaults button. LLM Flex snapshots your original config files the first time it touches them, so the undo is genuinely complete rather than best-effort.
The honest caveats
A couple of things are worth being straight about.
Not every provider works with every tool, because Claude Code and Codex speak different API dialects. Claude Code expects the Anthropic Messages format and Codex expects the OpenAI Responses format. LLM Flex shows you a compatibility note right in the profile editor, so you know before you save whether a combination will work directly or needs a translating proxy. It still lets you save the awkward combinations, because plenty of people route through gateways, but it tells you the truth up front.
The other one: if Codex is currently signed in with a ChatGPT account, switching is blocked. That isn't us being awkward. Codex refreshes its own token when it launches, which would quietly overwrite whatever key you'd set. Rather than let it clobber your config behind your back, the app stops you and explains why.
And to be clear about the stage we're at, this is alpha software. It's open source, it works, and we use it daily, but it has rough edges and we're actively after feedback.
Why this matters more than it looks
On the surface this is a small utility that saves you editing a few config files. Look a bit closer and it's about something we keep coming back to with clients: optionality.
If your entire AI workflow is hard-wired to one provider, you've quietly handed that provider a lot of power. When prices change, when a model gets deprecated, when a better option appears somewhere else, you want to be able to move without it being a project. The harder switching is, the longer you stay put, and the longer you stay put, the more that single dependency becomes a risk rather than a convenience.
Lowering the cost of switching is one of the most practical things you can do to stay flexible. It keeps providers honest, it lets you match the model to the job rather than the job to the model, and it means the day your preferred option lets you down, you have somewhere else to go without scrambling.
LLM Flex is a deliberately narrow example of that principle. It's only about two coding tools and a menu-bar switch. But the underlying idea, making it cheap and quick to change your mind, is one of the better defences a business has against being locked in.
We built it because we wanted it ourselves, and because building the thing you wish existed is a decent way to understand a problem properly. It's free, it's open source, and if you use Claude Code or Codex it might save you a fiddly afternoon.
If you'd like a look or fancy a chat about keeping your own AI stack flexible, come and find us at futureformed.io or drop us a message.
This piece was written by Liam Daly at Futureformed. If it sparked a thought, we’d be happy to continue the conversation.
Get in touchMore from the journal
How My Son and I Built a World Cup Tracker From Scratch
The AI Nightmares We Should Actually Be Having
We Built a Live Dashboard of Every AI Tool We Use, Here Is Why
Using Claude Cowork Efficiently in 2026
How We Built This: The Futureformed Website
AI Wattch: Seeing the Energy Cost of Your Prompts
The Hidden Cost of AI Agents
GreenPT: Sustainable AI That Doesn't Cost the Earth
AI Loyalty is Business Risk
Can't justify the compute? Give it the boot!
Breaking up from ChatGPT (it's not hard to do)
The Rise of the AI Orchestrator
The Hidden Dividend of AI: Giving Your People Their Time Back
AI Isn't a Tool. It's Your Next Operating System.
AI education is vital, but it doesn't need to be complicated
Shadow AI is already in your business. The question is what you do next.
AI isn't failing your business. Your change management is.
The first question I ask every client — and it's never about AI
AI transparency: This article was written by Liam. The analysis, views, and conclusions are his own.