Every model, no local gateway to run
AutoRouter puts frontier and open-weight models in the Codex and Claude Code pickers with no keys or gateway on your Mac, runs them on the Claude and ChatGPT plans you already pay for first, and picks one for each turn. One prompt to your coding agent puts your agents back and switches you over.
providers.json
deepseeksk-…5be0openroutersk-or-…4f2akimisk-…a71cANTHROPIC_BASE_URLhttp://127.0.0.1:3425
3keys
AutoRouter
Claude Opus 5.5Claude plan
GPT-6.2 SolChatGPT plan
DeepSeek V4.1 FlashPro
Kimi K3.1 ProPro
0keys
See what carries over
Have your coding agent switch you over, or paste Magpie’s providers.json here to see what carries over. Compare the two
Paste it into Claude Code or Codex. It switches you over, carries your rules across and keeps a backup of your old config. It never prints a key.
Stays in your browser. Keys never leave this page.
The ~/.config/magpie/providers.json that holds your providers, or one provider from it. Paste logins.json to see your sign-ins; its tokens are never read.
Switch me from Magpie to AutoRouter now. Don't ask whether to; I want it done.
1. Read my Magpie setup in ~/.config/magpie (or $XDG_CONFIG_HOME/magpie if that's set): providers.json (each provider's id, name or preset, base URLs, models, fallback and routing), applied.json (which agents Magpie wired), stash.json (the values it replaced, by name, such as claude.base_url, claude.auth_token, claude.model and claude.env.ANTHROPIC_DEFAULT_OPUS_MODEL), and from logins.json only each entry's agent, user and plan; never open its auth blobs. Also run `magpie ls` if the magpie command exists. Mask every API key and token to its last four characters before any output reaches this chat, wherever it sits; filter every file you read and never cat one raw. Never print, copy or send a full key.
2. Back up before changing anything: cp -R ~/.config/magpie ~/.config/magpie-backup-$(date +%Y%m%d), and copy each of ~/.claude/settings.json, ~/.codex/config.toml and ~/.codex/auth.json that exists to the same path with .backup-$(date +%Y%m%d) added. Delete nothing.
3. Hand over before AutoRouter writes any settings, so Magpie can't fight it. Put each agent back the way Magpie found it: run `magpie <agent> default` for every agent applied.json lists (`magpie claude default`, `magpie codex default`, and so on), which restores what stash.json kept. If the magpie command is gone, restore from stash.json by hand: in ~/.claude/settings.json, put claude.base_url back as env.ANTHROPIC_BASE_URL, claude.auth_token as env.ANTHROPIC_AUTH_TOKEN, claude.model as the top-level "model" and each claude.env.<NAME> as env.<NAME>, and remove those keys where the stash has no value, since Magpie added them; in ~/.codex/config.toml, remove the lines Magpie marked with a "# magpie:" note (model_provider = "magpie", an openai_base_url at 127.0.0.1:3425, model_catalog_json) and leave the [model_providers.magpie] table. Then confirm with grep that ~/.claude/settings.json no longer mentions port 3425 and ~/.codex/config.toml mentions it only inside [model_providers.magpie]. Then clear what would ride along to AutoRouter, which keeps any env it finds: remove ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN, ANTHROPIC_API_KEY, ANTHROPIC_CUSTOM_HEADERS, ANTHROPIC_MODEL, ANTHROPIC_SMALL_FAST_MODEL, CLAUDE_CODE_SUBAGENT_MODEL and every ANTHROPIC_DEFAULT_*_MODEL from ~/.claude/settings.json's env, even ones the stash just put back (the backups keep them), with jq or python3 and without printing the file. Show me any line in my shell profiles that sets those variables, with its file and line number; don't edit them. Last, stop Magpie: `magpie daemon stop` if its launch agent runs, `magpie autostart off`, and have me quit the Magpie app from its menu bar icon.
4. Set up AutoRouter now by following https://autorouter.com/setup.md, with its rules: I do every sign-in in the browser, you never ask for a password or use sudo, and from here on you never edit ~/.claude/settings.json or ~/.codex/config.toml. AutoRouter connects my Claude and ChatGPT plans itself, so I sign in to them there rather than through Magpie's logins.
5. Carry my setup over. Get AutoRouter's models: curl -sH "Accept: text/markdown" https://autorouter.com/models. Map each model in providers.json to the AutoRouter model that covers it; a newer version of the same family counts. Write a plain-English rule only where Magpie set a model for a purpose, like the Opus or subagent model as "Use Claude Opus 5.5 for planning and reasoning." or the Haiku model as "Use DeepSeek V4.1 Flash for background tasks." AutoRouter picks a model for each turn and falls back on its own, so fallback lists and routing need no rule. List the rules for me to add in the AutoRouter app: Routing, then Add a rule. Local models (localhost, Ollama) stay where they are.
6. Finish with setup.md's confirm step, then a short summary: models carried over, rules to add, keys I no longer need, where the backups are, and how to go back (disable each app in AutoRouter's settings, then open Magpie and connect each agent again, or copy the backups back).
- 0models covered
- 0keys you’d no longer need
- 0fallbacks and routing replaced
Models
Keys
Routing
Plans
Matched by name against the models on autorouter.com/models. Pro is $50 a month with $20 of usage included; new accounts get a week of Pro, or until $20 of usage is spent.
Questions
What people ask before they switch.
What does Magpie do well?
It’s one local gateway that routes many vendors, relays and subscription accounts behind OpenAI, Anthropic, Responses and Gemini endpoints, with per-provider fallback, key rotation and quota-aware account switching. It wires dozens of agents, keeps what it replaced so it can put each one back, and shows usage and quotas.
When should I keep Magpie?
Keep it on Windows or Linux, for agents beyond Codex, Claude Code and the other apps AutoRouter works in, or to write every fallback and routing rule yourself. AutoRouter runs on macOS 14 or later.
Does my config leave my browser?
No. JavaScript in this page reads a paste and sends nothing: no upload, no request. Keys are masked as soon as they’re read, and a pasted logins.json’s tokens are never read at all. The agent prompt has your coding agent read Magpie’s files on your Mac and mask every key to its last four characters before anything reaches the chat.
How does the prompt take Magpie out of my agents?
Through Magpie itself: magpie claude default and its kin put back what Magpie’s stash.json kept from before it wired each agent. Without the magpie command, your agent restores the stash by hand and checks nothing still points at Magpie’s gateway on port 3425, then stops Magpie.
What happens to local models and models AutoRouter doesn’t carry?
A model served on your machine stays where it is. Models are matched by name, ignoring vendor prefixes and snapshot dates, and an older model counts as the newer one AutoRouter carries in its line. Keep the key for any model that isn’t in the list.
Does AutoRouter run on Windows or Linux?
Not yet. AutoRouter is a Mac app for macOS 14 or later. It works in Codex, the Claude Code CLI, Cursor, Claude Desktop, T3 and Terminal.
What does AutoRouter cost?
Free is $0 a month and connects two subscriptions. Pro is $50 a month with $20 of usage included each month, connects any number of subscriptions and adds every other model. New accounts get a week of Pro, or until $20 of usage is spent.