Codex on any model: magpie makes Codex Router unnecessary

Codex on any model: magpie makes Codex Router unnecessary

Share:

Models end up scattered everywhere: one OpenRouter account, separate API keys for DeepSeek and Kimi, separate subscriptions for Cursor, Copilot and Grok. On top of that, Codex, Claude Code and OpenCode each ship their own model picker with its own configuration, so switching Codex to a cheaper model means remembering how to edit config.toml by hand.

magpie (source, catalog entry: magpie) is a free, MIT-licensed menu bar app built for exactly this. It runs a local gateway on 127.0.0.1:3425, collects every provider you add and every subscription you are signed into, and hands the combined model list to every agent installed on your machine.

magpie cover: one panel, every model

One panel for every provider and subscription

Open magpie's Providers panel and OpenRouter (24 models), OpenCode Zen and OpenCode Go sit next to Codex (ChatGPT), Copilot, Cursor and Grok, the subscription-backed entries that reuse an existing sign-in. The "Add a provider" section below has a row of Subscriptions tiles too: Claude, ChatGPT, Cursor, Grok and Copilot, each a sign-in away with no key to paste.

magpie's Providers panel, vendors and subscriptions in one list

"Reusing a subscription" does not mean copying a key into a second place. magpie reads the agent's own credential file directly (Codex keeps its ChatGPT login in ~/.codex/auth.json, for example) and refreshes tokens the same way that agent does. Sign out inside that agent and the provider disappears from magpie too; nothing extra is stored on disk.

Codex's own picker sees every model

Once Codex points at a provider, its native model picker lists entries like "MiMo-V2.6-Flash · OpenRouter", "Grok 4.7 · OpenRouter" and "Big Pickle · OpenCode Zen" directly, no second panel to open and no separate router project to install first. Codex stays Codex.

Codex's native model picker listing OpenRouter and OpenCode Zen models

This is the biggest difference from Codex Router, which we wrote about earlier. Codex Router is a solid idea: when your Codex quota runs low, it wires DeepSeek or Grok into Codex so you can keep working in the same workspace. magpie solves the same underlying problem in a lighter way. There is no separate router project to install, no setup steps to remember, just a menu bar app you click through. It is also not Codex-only: Claude Code, OpenCode, Gemini CLI and other agents draw from the same provider list. If you already use Codex Router, magpie is not a replacement for it, just a broader, lower-effort path to the same result.

How the gateway works

Codex only speaks the OpenAI Responses API. Claude Code only speaks the Anthropic Messages API. Gemini CLI speaks Google's own format. The local gateway magpie runs accepts all of them: pick a model, and magpie translates the request into whatever format the chosen provider understands, streaming and tool calls included.

How the magpie gateway works: agents point at the local gateway, which forwards to providers and subscriptions

For Codex specifically, magpie edits configuration surgically. It adds a [model_providers.magpie] table to ~/.codex/config.toml and writes a ~/.codex/magpie-models.json catalog file, which is what makes new models show up in Codex's own list. Switching back to a native model undoes all of it, and your ChatGPT sign-in is never touched. Model lists are not hardcoded either. magpie asks each vendor which models it currently serves and fills in names and reasoning effort from the models.dev catalog, so a model released this morning shows up in the picker on the next refresh.

Getting started in a few steps

  1. Download the desktop app from usemagpie.ai, or install from a terminal: curl -fsSL https://usemagpie.ai/install.sh | sh
  2. Open the Providers panel and add a provider (paste an OpenRouter key, for example), or use a Subscriptions tile if you are already signed into Claude, ChatGPT, Cursor, Grok or Copilot, no key needed.
  3. Switch to the Agents panel, click the Codex row, and pick a model from the list that opens.
  4. Fully quit and reopen Codex, or start a new session. Configuration changes apply to the next session, not one already running.

What to watch for

magpie is still a young project, so treat it like early software: try it on something that is not mission critical first, and pin a version before you rely on it for important work. The feature that saves you a re-login, reading the agent's own credential file directly, also means magpie touches those local files. Check the relevant vendor's terms before routing a subscription into a different agent. Configuration changes only take effect on the next session, an already-running window will not pick them up automatically. And the gateway only listens on loopback, but any other process on the same machine can still reach that port; it is not fully isolated.

In one line: models no longer need to stay scattered across a dozen providers and subscriptions. magpie collects them into one panel, Codex keeps working the way it always has, and you no longer need a separate router to get there. If you have not read our earlier piece on why the model picker matters, see this article.

Sources: magpie's website, the GitHub repository (full README and configuration details).

Comments

No comments yet. Be the first to comment!

Related Tools

Related Articles

Publisher

AI Nexus Team

AI Nexus Team

@hunterzhang86

5 min read

Categories