Magpie
A menu-bar and desktop app that puts one model list in front of every agent: pick the model for Claude Code, Codex or Gemini CLI and it rewrites that agent's config. It ships a local gateway, so a spent quota moves to your next account.
macOS, Windows, Linux — plus TUI, Web UI, CLI and Docker.
Install
Download from usemagpie.ai, or:
bash
curl -fsSL https://usemagpie.ai/install.sh | shAdd LeekBox (GUI)
Open Magpie → Providers → Add provider → custom, then fill in:
| Field | Value |
|---|---|
| Name | LeekBox |
| Base URL | https://leekbox.ai/v1 |
| API key | sk-... |
| Models | gpt-6-astra, gpt-6.1-sol, claude-sonnet-5, deepseek-v4.1-flash |
Saving publishes those models on Magpie's local gateway.
Pick a model per agent
The Agents page lists each CLI; choose a model from its list:
| Agent | Suggested | Notes |
|---|---|---|
| Claude Code | claude-sonnet-5 / claude-opus-5-5 | Anthropic protocol; Magpie rewrites ANTHROPIC_BASE_URL |
| Codex | gpt-6.1-sol | Responses protocol |
| Gemini CLI | gemini-3.8-flash | Gemini protocol |
| OpenCode | any | OpenAI-compatible |
Start a new session after switching. Magpie edits the agent's own config file and keeps the previous values for switching back.
Same thing from the terminal
bash
magpie provider add "LeekBox" url=https://leekbox.ai/v1 key=sk-... models=gpt-6-astra,gpt-6.1-sol,claude-sonnet-5
magpie claude leekbox/claude-sonnet-5
magpie codex leekbox/gpt-6.1-sol
magpie quota
magpie save work-leekbox && magpie use work-leekboxWhy pair it with LeekBox
- One key for every agent — Claude Code, Codex, Gemini CLI and OpenCode all point at LeekBox, so usage and billing live in one console.
- No more env vars — Magpie writes config files, which also reaches IDE terminals where
exportnever lands. - Two layers of failover — Magpie can move to your next account when a quota runs out; LeekBox already fails over between upstreams inside a group.
Troubleshooting
| Symptom | Fix |
|---|---|
| Agent still on the official model | Confirm the switch on the Agents page and start a new session |
| 401 | Whitespace in the key, or the provider URL is missing /v1 |
| 404 model | Model id differs from your group — check GET /v1/models |
| Undo | Switch that agent back to its previous provider; --uninstall restores configs |
Just Claude Code?
CC-Switch is lighter: CC-Switch. Or edit the config yourself: Claude Code, Codex CLI.