Discord Download

Every model in Claude Code, no proxy to run

AutoRouter puts GPT, Gemini and open-weight models in the Claude Code picker beside Claude, with no proxy, keys or tier mapping, and picks one for each turn. One prompt to your coding agent switches you over, model mapping included.

Download for macOS

See what carries over

Have your coding agent switch you over, or paste the proxy’s .env here to see what carries over.

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.

Switch me from claude-code-proxy to AutoRouter now. Don't ask whether to; I want it done.

1. Read how Claude Code and Codex reach claude-code-proxy today: the env block in ~/.claude/settings.json, any .claude/settings.json or .claude/settings.local.json in this project, ANTHROPIC_* lines (exports, aliases and functions) in my shell profiles (~/.zshrc, ~/.zprofile, ~/.bashrc, ~/.bash_profile, ~/.config/fish/config.fish), and [model_providers.*] in ~/.codex/config.toml. Find the proxy: check what listens on port 8082 (lsof -nP -iTCP:8082 -sTCP:LISTEN), and find its clone's .env (a .env with BIG_MODEL, SMALL_MODEL or PREFERRED_PROVIDER, for example with find ~ -maxdepth 4 -name .env -path '*claude-code-proxy*'). Read its OPENAI_API_KEY, OPENAI_BASE_URL, GEMINI_API_KEY, PREFERRED_PROVIDER and BIG_, MIDDLE_ and SMALL_MODEL; with BIG_MODEL and SMALL_MODEL unset, 1rgs's fork uses gpt-4.1 and gpt-4.1-mini. Mask every API key to its last four characters before any output reaches this chat, wherever it sits in a line: an alias or a one-line command can set one mid-line, so filter every file you read and never cat or grep one raw. Never print, copy or send a full key.
2. Back up before changing anything: 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. Copy the proxy's .env to .env.backup-$(date +%Y%m%d) beside it. Delete nothing.
3. Hand over before AutoRouter writes any settings, so the old setup can't fight it. In ~/.claude/settings.json, remove only these keys from the env block, with jq or python3 and without printing the file: 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; also the top-level "model" if it names a model rather than an alias like opus or sonnet. That is your one edit to that file, and the backup undoes it. For the same variables in a project's .claude settings or in my shell profiles, show me each line with its file and line number to remove; don't edit those files. Stop the proxy on port 8082: docker stop its container if it runs in Docker (or docker compose down in its clone), otherwise kill the uvicorn, start_proxy.py or claude-code-proxy process. If something else holds the port, leave it running and tell me. Show me any alias or line that starts Claude Code with ANTHROPIC_BASE_URL=http://localhost:8082. Leave the clone and its .env in place. Then I open a new terminal so the old variables are gone.
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.
5. Carry my setup over. Get AutoRouter's models: curl -sH "Accept: text/markdown" https://autorouter.com/models. Map each of my models to the AutoRouter model that covers it; a newer version of the same family counts. Write a plain-English rule only for a model setting that says what the model is for: the Opus or subagent model as "Use Kimi K3.1 Pro for planning and reasoning.", the Haiku or small, fast model as "Use DeepSeek V4.1 Flash for background tasks." AutoRouter picks a model for each turn, so the main model and the Sonnet slot 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 copy the backups back over ~/.claude/settings.json and ~/.codex/config.toml, start the proxy again from its clone, and add back the shell lines I removed).

Questions

What people ask before they switch.

What does claude-code-proxy do well?

It’s a small, free, open-source proxy that lets Claude Code run OpenAI, Gemini or any OpenAI-compatible model, local servers included, by mapping Claude’s tiers to models you name in a .env. It runs anywhere Python or Docker does.

When should I keep claude-code-proxy?

Keep it on Windows or Linux, for a model server of your own behind an OpenAI-compatible endpoint, or to send every Claude Code turn to one provider you choose. 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 key written as $VAR shows only the variable’s name. The agent prompt has your coding agent read your settings on your Mac and mask every key to its last four characters before anything reaches the chat.

What happens to BIG_MODEL and SMALL_MODEL?

AutoRouter picks a model for each turn, so the tiers need no mapping. BIG_MODEL becomes a rule for planning and reasoning and SMALL_MODEL one for background tasks, such as “Use GPT-6 Luna for background tasks,” when AutoRouter carries the model or a newer one in its line.

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.

Do I get Claude back?

Yes. The proxy sends every Claude Code turn to the models it maps. With AutoRouter, Claude stays in the picker beside GPT and the rest, on your Claude plan first, and AutoRouter sends hard work to the strongest model your plans cover.

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.

Check it later

Leave your email and we’ll send you a link back to this page, then one reminder in a few days. Unsubscribe any time.