Skip to content

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 | sh

Add LeekBox (GUI) ​

Open Magpie → Providers → Add provider → custom, then fill in:

FieldValue
NameLeekBox
Base URLhttps://leekbox.ai/v1
API keysk-...
Modelsgpt-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:

AgentSuggestedNotes
Claude Codeclaude-sonnet-5 / claude-opus-5-5Anthropic protocol; Magpie rewrites ANTHROPIC_BASE_URL
Codexgpt-6.1-solResponses protocol
Gemini CLIgemini-3.8-flashGemini protocol
OpenCodeanyOpenAI-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-leekbox

Why 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 export never 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 ​

SymptomFix
Agent still on the official modelConfirm the switch on the Agents page and start a new session
401Whitespace in the key, or the provider URL is missing /v1
404 modelModel id differs from your group — check GET /v1/models
UndoSwitch 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.

LeekBox — unified AI gateway