# magpie

> magpie is a free, open-source (MIT) desktop app for macOS, Windows and Linux that lets every AI coding agent use every model. Add a provider once (DeepSeek, Kimi, GLM, Qwen, MiniMax, OpenRouter, Ollama, or the Claude and ChatGPT subscriptions you already pay for), then pick it in Codex, Claude Code, Gemini CLI or any other agent. It runs a local gateway that speaks the OpenAI, Anthropic and Gemini APIs and translates between them, with streaming, tool calls and reasoning intact.

magpie lives in the menu bar (tray on Windows and Linux), with a full window, a TUI and a CLI. The Mac download is about 15 MB, built on the system WebView (no Electron). It is signed and notarised on macOS and updates itself.

Key facts:

- Website: https://usemagpie.ai/ (English), https://usemagpie.ai/zh/ (中文), https://usemagpie.ai/ja/ (日本語), https://usemagpie.ai/de/ (Deutsch)
- Source code: https://github.com/yetone/magpie
- Downloads: https://github.com/yetone/magpie-releases/releases/latest
- Install from a terminal (macOS, Linux): `curl -fsSL https://usemagpie.ai/install.sh | sh`
- Community: Discord, linked from the website
- Price: free
- Full text of every docs page in one file: https://usemagpie.ai/llms-full.txt

## What it does

- **One model switcher for every agent.** Each agent can use a different provider's model: Codex on DeepSeek, Claude Code on Kimi, Gemini CLI on GLM. magpie edits only the one setting it changes in each agent's config (settings.json, config.toml, config.yaml), keeping comments, order and indentation, and restores it when you pick the agent's own model again.
- **A local gateway at 127.0.0.1:3425.** It speaks OpenAI Chat Completions, OpenAI Responses, Anthropic Messages and Google Gemini, and translates in both directions, so Codex (Responses only) and Claude Code (Messages only) can use any vendor's model. Any client that can set a base URL can use it: `OPENAI_BASE_URL`, `ANTHROPIC_BASE_URL`, `GOOGLE_GEMINI_BASE_URL`.
- **Subscription sharing.** A sign-in you made in one agent becomes a provider every other agent can use: a Claude Pro/Max sign-in in OpenCode, Pi or Goose; a ChatGPT Plus/Pro sign-in in Claude Code; a GitHub Copilot seat in any agent.
- **Routing.** Put several keys and subscriptions behind one model name. magpie picks the account for each request (by intent, in order, round robin, least used first, or by which quota resets first), skips rate-limited and out-of-credit accounts for as long as the vendor says, and fails over to the next account before the agent sees an error. Intent routing asks a small fast model which of your rules a turn belongs to.
- **Privacy masking.** Before a request leaves the computer, magpie replaces API keys, private keys, tokens, email addresses, and card and ID numbers with placeholders, and puts the real values back in replies and tool calls. An optional local model also finds names, addresses and passwords. Values are never written to disk.
- **Usage per agent.** Tokens, cache hits and cost for every agent and model that goes through the gateway.
- **Library.** Instructions, MCP servers, skills, hooks and subagents written once for every agent, and an MCP router.
- **Remote and Docker.** Share one magpie on the network, or run it in Docker on a server or NAS (`ghcr.io/yetone/magpie`).
- **Plugins.** OpenCode plugins add providers and subscriptions.

## Supported agents

Claude Code, Claude Desktop (chat, Code and Cowork), Codex, Gemini CLI, OpenCode, Pi, Goose, Cursor CLI, GitHub Copilot CLI, VS Code, Crush, Droid, Kimi Code, Grok Build, Hermes Agent, Devin, MiniMax Code, MiMo Code, DevEco Code, Command Code, ZCode, Snow CLI, Alma, Cherry Studio and more.

## Supported providers

DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenAI, Google Gemini, Mistral, xAI, Groq, OpenRouter, AiHubMix, Ollama and other local servers, any OpenAI- or Anthropic-compatible endpoint, plus Claude, ChatGPT and GitHub Copilot subscriptions.

## Docs

- [Get started](https://usemagpie.ai/docs/start): how magpie fits together; add providers, pick a model for each agent, route one model over several accounts.
- [Models in Claude Code](https://usemagpie.ai/docs/claude-code-models): run Claude Code on DeepSeek, Kimi, GLM, Qwen, MiniMax or a ChatGPT plan's GPT models; how the opus, sonnet and haiku tiers map and what changes in settings.json.
- [Models in Codex](https://usemagpie.ai/docs/codex-models): run Codex on DeepSeek, Kimi, GLM, Qwen or a Claude subscription; the /model list with reasoning efforts and what changes in config.toml.
- [Models in Gemini CLI](https://usemagpie.ai/docs/gemini-cli-models): run Gemini CLI on DeepSeek, Kimi, GLM, Qwen or a Claude or ChatGPT subscription; what changes in ~/.gemini/.env and settings.json, and how to switch back.
- [Subscriptions in any agent](https://usemagpie.ai/docs/subscriptions): sign in to Claude, ChatGPT, GitHub Copilot, Gemini Code Assist or Antigravity in magpie and use its models in Claude Code, Codex, Gemini CLI or OpenCode, with several accounts and failover.
- [ChatGPT in Claude Code](https://usemagpie.ai/docs/claude-code-chatgpt): use a ChatGPT Plus or Pro subscription in Claude Code with no API key; signing in, picking a GPT model, how the opus, sonnet and haiku tiers map, reasoning effort, usage limits, several accounts and switching back.
- [Local models in Claude Code and Codex](https://usemagpie.ai/docs/local-models): run Claude Code and Codex on Ollama, LM Studio, oMLX, MLX-Serve, vLLM or llama.cpp; default addresses, which API each server speaks, context window and masking.
- [Models in OpenCode](https://usemagpie.ai/docs/opencode-models): run OpenCode on DeepSeek, Kimi, GLM, Qwen or a Claude, ChatGPT or Copilot subscription; what magpie writes in opencode.json, reasoning variants and cost, and how to switch back.
- [magpie vs CC Switch vs Claude Code Router](https://usemagpie.ai/docs/alternatives): a fair comparison of the three: agents, config rewrite or local proxy, protocol translation, subscription sign-ins, routing and failover, GUI and CLI, platforms and license, and which one fits.
- [DeepSeek in every agent](https://usemagpie.ai/docs/deepseek): use DeepSeek V4 in Claude Code, Codex, Gemini CLI and OpenCode; the API key, endpoints, thinking on tool turns, reasoning effort, prompt cache and balance.
- [Kimi K2 and Kimi Code in every agent](https://usemagpie.ai/docs/kimi): Kimi API or Kimi Code membership keys, global and China endpoints, in Claude Code, Codex, Gemini CLI and OpenCode; usage windows and web search.
- [GLM Coding Plan in every agent](https://usemagpie.ai/docs/glm): Zhipu GLM and Z.ai, pay as you go or Coding Plan, each plan's endpoints, the 1113 "insufficient balance" fix, thinking and plan windows.
- [Volcengine Ark Coding Plan in every agent](https://usemagpie.ai/docs/volcengine): 火山方舟 Coding Plan, Agent Plan and pay as you go, each plan's endpoints, its Doubao, GLM, DeepSeek and Kimi models, Ark's own web search, Seedream and Seedance, and the plan windows through an AccessKey.
- [Tencent Cloud Token Plan in Claude Code and Codex](https://usemagpie.ai/docs/tencent-cloud): TokenHub's personal and enterprise Token Plan and pay as you go, their endpoints and models, and the enterprise quota read with a SecretId and SecretKey.
- [Baidu Qianfan Token Plan in Claude Code and Codex](https://usemagpie.ai/docs/baidu-qianfan): Qianfan's personal and enterprise Token Plans and pay as you go, their endpoints, and the DeepSeek and GLM models each plan has.
- [SiliconFlow in Claude Code and Codex](https://usemagpie.ai/docs/siliconflow): SiliconFlow's China and Global sites, model names with their maker, Chat Completions converted for Claude Code and Codex, and the retired balance query.
- [ModelScope in Claude Code and Codex](https://usemagpie.ai/docs/modelscope): ModelScope API-Inference on an access token, not DashScope; Chat Completions and Responses; its async image tasks.
- [Huawei Cloud MaaS Token Plan in Claude Code and Codex](https://usemagpie.ai/docs/huaweicloud): the Token Plan and pay as you go endpoints at api.modelarts-maas.com, GLM, Kimi and DeepSeek, Codex converted to Chat Completions.
- [Xiaomi MiMo Token Plan in Claude Code and Codex](https://usemagpie.ai/docs/xiaomi-mimo): tp- keys per region (China, Singapore, Europe) and pay as you go, Chat, Responses and Anthropic at each host, mimo-v2.6-pro.
- [StepFun Step Plan in Claude Code and Codex](https://usemagpie.ai/docs/stepfun): China (api.stepfun.com) and international (api.stepfun.ai) sites, Step Plan keys only at step_plan, Codex converted, the 5-hour and weekly windows via a platform sign-in.
- [Meituan LongCat in Claude Code and Codex](https://usemagpie.ai/docs/longcat): api.longcat.chat with Chat, Responses and Anthropic, the key as a Bearer, LongCat-2.0.
- [Qwen in every agent](https://usemagpie.ai/docs/qwen): Alibaba Cloud Model Studio (DashScope), Bailian, the Qwen and Bailian Token Plans and Qwen Cloud in Claude Code, Codex, Gemini CLI and OpenCode; which endpoint each key works on, thinking and images.
- [MiniMax and the Coding Plan in every agent](https://usemagpie.ai/docs/minimax): MiniMax M3 and M2.7, pay as you go or Coding Plan keys, global and China endpoints, interleaved thinking, effort and the plan's usage windows.
- [OpenRouter in every agent](https://usemagpie.ai/docs/openrouter): one OpenRouter key for Claude Code, Codex, Gemini CLI and OpenCode; which endpoint each agent's requests use, the model list, reasoning, Claude's prompt cache, cost and credits, several keys and free models.
- [GitHub Copilot in every agent](https://usemagpie.ai/docs/copilot): a Copilot seat's models in Claude Code, Codex, Gemini CLI and OpenCode; signing in (editors, Copilot CLI, GHE.com), Copilot Auto, premium requests, several accounts and errors.
- [Gemini in every agent](https://usemagpie.ai/docs/gemini): a Google AI Studio key (or Vertex AI) in Claude Code, Codex, Gemini CLI and OpenCode; endpoints, thinking levels, thought signatures across tool calls, tool schemas, search and rate limits.
- [Grok in every agent](https://usemagpie.ai/docs/grok): an xAI API key in Claude Code, Codex, Gemini CLI and OpenCode; which API each agent's requests use, what magpie fixes for xAI, reasoning effort, web search, prompt cache and several keys.
- [Mistral in every agent](https://usemagpie.ai/docs/mistral): a Mistral API key in Claude Code, Codex, Gemini CLI and OpenCode; the model list, what magpie fixes for Mistral (thinking parts, refused fields), effort, search, cache and the plan card.
- [Ollama in every agent](https://usemagpie.ai/docs/ollama): local Ollama, Ollama on another computer and Ollama Cloud in Claude Code, Codex, Gemini CLI and OpenCode; addresses, model list, context window, reasoning, tools, masking, pricing, and magpie as an Ollama server.
- [Anthropic in every agent](https://usemagpie.ai/docs/anthropic): an Anthropic API key in Claude Code, Codex, Gemini CLI and OpenCode; endpoints, the model list and 1M context, prompt cache marks (5-minute and 1-hour), adaptive thinking and effort, web search, cost and workspaces.
- [OpenAI in every agent](https://usemagpie.ai/docs/openai): an OpenAI API key (or Azure OpenAI) in Claude Code, Codex, Gemini CLI and OpenCode; Responses vs Chat Completions, prompt_cache_key, reasoning effort and Fast (priority tier), web search, cost and several keys.
- [Intent routing](https://usemagpie.ai/docs/intent): how a turn is routed by what the user asks for.
- [Privacy masking](https://usemagpie.ai/docs/masking): what is masked before a request leaves the computer and how values come back.
- [Claude Desktop on any model](https://usemagpie.ai/docs/claude-desktop): run Claude Desktop's chat, Code and Cowork tabs on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through its third-party gateway mode, no Anthropic sign-in; model list, Code tab tiers, chats, the separate Claude Magpie app on a Mac and switching back.
- [OpenClaw on any model](https://usemagpie.ai/docs/openclaw): run OpenClaw (the personal assistant on WhatsApp, Telegram and Discord) on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription; what magpie writes in openclaw.json, the model refs, chats that keep a model (/model default), profiles and switching back.
- [Hermes Agent on any model](https://usemagpie.ai/docs/hermes): run Nous Research's Hermes Agent and each of its bots on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription; what magpie writes in config.yaml, model and reasoning effort, profiles, WSL and switching back.
- [Cline on any model](https://usemagpie.ai/docs/cline): run Cline's CLI, VS Code extension and desktop app on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through Cline's built-in OpenAI-compatible provider; model and reasoning effort, new sessions, VS Code's reload and switching back.
- [Goose on any model](https://usemagpie.ai/docs/goose): run Block's Goose, its CLI and desktop app, on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through a custom provider magpie adds; context windows, thinking effort, restarting Goose and switching back.
- [Droid on any model](https://usemagpie.ai/docs/droid): run Factory's Droid CLI on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through custom models magpie adds to settings.json; the /model picker, thinking levels, your own BYOK models kept, restarting droid and switching back.
- [Zed on any model](https://usemagpie.ai/docs/zed): run the Zed editor's agent panel on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through an OpenAI-compatible provider magpie adds to settings.json; the key in the system credential store, context windows, thinking levels and switching back.
- [Crush on any model](https://usemagpie.ai/docs/crush): run Charm's Crush on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through a provider magpie adds to crush.json; the large and small models, reasoning effort, Crush's data file and switching back.
- [Raycast on any model](https://usemagpie.ai/docs/raycast): use DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription in Raycast AI's Quick AI, AI Chat and AI Commands through a custom provider magpie adds to providers.yaml (Raycast Pro); which models the picker lists, tools, vision and reasoning, and switching back.
- [Copilot CLI on any model](https://usemagpie.ai/docs/copilot-cli): run GitHub Copilot CLI on DeepSeek, Kimi, GLM, Qwen, GPT or a ChatGPT subscription through a BYOK provider magpie adds to providers.json, with no GitHub sign-in; the magpie/ model in settings.json, effortLevel, your own providers kept and switching back.
- [Qwen Code on any model](https://usemagpie.ai/docs/qwen-code): run Qwen Code (qwen) on DeepSeek, Kimi, GLM, GPT, Claude or a ChatGPT subscription through modelProviders entries magpie adds to ~/.qwen/settings.json; the MAGPIE_QWEN_API_KEY key, /auth skipped, your own models kept, WSL and switching back.
- [Kimi Code on any model](https://usemagpie.ai/docs/kimi-code): run Kimi Code (Moonshot's kimi CLI) on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through the provider and model tables magpie adds to ~/.kimi-code/config.toml; thinking levels, images and tools, the old kimi-cli, WSL and switching back.
- [Pi on any model](https://usemagpie.ai/docs/pi): run the pi coding agent on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through magpie: the magpie provider in ~/.pi/agent/models.json, settings.json's default, thinking levels, the Ctrl+P list, decision and image models, your files put back.
- [Cursor Private Inference on any model](https://usemagpie.ai/docs/cursor-private-inference): run the Cursor build whose agent runs on your machine on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through magpie: CURSOR_LOCAL_AGENT_BASE_URL and _API_KEY set for your user, its models, effort, when it takes effect, settings that come first.
- [Antigravity on any model](https://usemagpie.ai/docs/antigravity): run Google Antigravity and its agy CLI on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through magpie: the gateway block in its settings, real context windows, effort, the agy shell function, what the Google sign-in gives, switching back.
- [Snow CLI on any model](https://usemagpie.ai/docs/snow-cli): run Snow CLI (snow-ai) on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through magpie: its own profile beside yours, real context windows and image support, the light model, thinking, Snow App, switching back.
- [JetBrains Air on any model](https://usemagpie.ai/docs/jetbrains-air): run JetBrains Air and Air in JetBrains IDEs on DeepSeek, GLM, Qwen, GPT, Claude or a ChatGPT subscription through magpie: the Magpie ACP agent in acp.json, OpenCode's ACP server, the model menu, WSL projects, provider keys in the environment, switching back.
- [CodeBuddy on any model](https://usemagpie.ai/docs/codebuddy): run Tencent's CodeBuddy Code CLI and CodeBuddy IDE (codebuddy.ai and codebuddy.cn) on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through the custom models magpie writes to ~/.codebuddy/models.json; no CodeBuddy sign-in, settings.json's model, the IDE's picker, your own models kept, WSL and switching back.
- [Obsidian on any model](https://usemagpie.ai/docs/obsidian): run Obsidian's Copilot for Obsidian plugin on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through the magpie provider magpie writes into every vault with Copilot; no API key to enter, the model list, your own models and default kept, reloading Copilot, Copilot 3 and switching back.
- [T3 Code on any model](https://usemagpie.ai/docs/t3-code): run T3 Code (pingdotgg/t3code) on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through two provider instances magpie writes into its settings.json, magpie on Claude Code and magpie · Codex on Codex; reasoning levels, the Thinking switch, your own instances kept, Claude Code's own routing and switching back.
- [Craft Agents on any model](https://usemagpie.ai/docs/craft-agents): run Craft Agents (lukilabs/craft-agents-oss) on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through the magpie connection magpie writes into its config.json; no key to enter, new sessions taking the change, your own connections and default kept, and switching back.
- [OpenChamber on any model](https://usemagpie.ai/docs/openchamber): run OpenChamber, the desktop, web and VS Code front end for OpenCode, on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through magpie: its default and small models in preferences.json, a project's own default going first, magpie's provider in the OpenCode config, new sessions taking the change, and switching back.
- [nanobot on any model](https://usemagpie.ai/docs/nanobot): run nanobot (HKUDS/nanobot, pip install nanobot-ai) on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through the magpie provider magpie writes into ~/.nanobot/config.json; agents.defaults' model and context window, modelPreset stashed and put back, when its gateway and WebUI take the change, WSL, and switching back.
- [AstrBot on any model](https://usemagpie.ai/docs/astrbot): run AstrBot, the chatbot framework for QQ, Telegram, Discord and Lark, on DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription through the magpie source and models magpie writes into data/cmd_config.json; the default chat model, why AstrBot needs a restart, what a WebUI save writes over, Docker, and switching back.
- [AionUi on any model](https://usemagpie.ai/docs/aionui): use DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription in AionUi through magpie: AionUi's aionui://add-provider link fills in magpie as an OpenAI-compatible provider for you to confirm; the model list, how magpie reads AionUi's database read-only to know it was added, and usage and keys.
- [QwenPaw on any model](https://usemagpie.ai/docs/qwenpaw): use DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription in QwenPaw (formerly CoPaw) through magpie: the custom/magpie.json provider, each agent's active_model and thinking_level, the one restart after connecting, ACP backends, and switching back.
- [Zoo Code on any model](https://usemagpie.ai/docs/zoo-code): use DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription in VS Code's Zoo Code (a fork of Roo Code) through magpie: the magpie profile it imports through zoo-code.autoImportSettingsPath, Reload Window, VS Code profiles, why the JetBrains build isn't wired, and switching back.
- [jcode on any model](https://usemagpie.ai/docs/jcode): use DeepSeek, GLM, Kimi, Qwen, GPT, Claude or a ChatGPT subscription in jcode (a coding agent in Rust) through magpie: the openai-compatible [providers.magpie] profile in config.toml, every model in /model and its levels in /effort, the restart, your own keys kept, and switching back.
- [Every magpie model in Paseo](https://usemagpie.ai/docs/paseo): use DeepSeek, GLM, Kimi, Qwen, GPT or a ChatGPT subscription in Paseo (getpaseo/paseo) through magpie: why Paseo's picker misses magpie's models, the additionalModels magpie writes in ~/.paseo/config.json, Claude Code connected first, the daemon restart, and your own entries kept.
- [Reasonix Studio on any model](https://usemagpie.ai/docs/reasonix): use DeepSeek, GLM, Kimi, Qwen, GPT or a ChatGPT subscription in Reasonix Studio 2.x and its CLI through magpie: the magpie provider in config.toml, the key in .env, separate executor and planner models, effort, the restart, and switching back undoing only magpie's part.
- [AtomCode on any model](https://usemagpie.ai/docs/atomcode): use DeepSeek, GLM, Kimi, Qwen, GPT or a ChatGPT subscription in AtomCode (AtomGit's Rust terminal coding agent) through magpie: the magpie account and model tables in ~/.atomcode/config.toml, the defaults, context windows and effort, the restart, and your own defaults put back.
- [Shelley on any model](https://usemagpie.ai/docs/shelley): Shelley (exe.dev's coding agent) on any magpie model: a custom model added over Shelley's own API on its socket, made the default profile's model for new conversations.
- [Cindy on any model](https://usemagpie.ai/docs/cindy): Cindy (the desktop app that runs Claude Code, Codex and Pi) on any magpie model: Cindy's own import link adds magpie as a custom provider with an endpoint per runtime, confirmed in Cindy.
- [Lody on any model](https://usemagpie.ai/docs/lody): Lody's Claude Code, Codex, Pi, dsh, Kimi Code, Grok and Bub on any magpie model: Lody's own import link adds magpie as a custom provider, confirmed in Lody; loopback addresses only.
- [Empryo on any model](https://usemagpie.ai/docs/empryo): Empryo on any magpie model: a magpie provider in ~/.empryo/config.json's providers (no envVar) and defaultModel magpie/<ref>; restart empryo.
- [miniQ on any model](https://usemagpie.ai/docs/miniq): miniQ (desktop + miniq terminal) on any magpie model: settings.json's provider set to the gateway's /v1 with apiProtocol chat_completions; a running miniq-daemon is told through settings.update.
- [OpenBot on any model](https://usemagpie.ai/docs/openbot): OpenBot's model picker lists magpie's models: a keyless magpie endpoint at /agent/openbot/v1 in openbot-custom-providers-v1.json, at most 64 models; restart OpenBot.
- [Tuanjie Cowork on any model](https://usemagpie.ai/docs/tuanjie-cowork): Tuanjie Cowork (团结 Cowork) on any magpie model: a magpie provider and model in ~/.codely/settings.json, picked once in Cowork's model menu.
- [DS Bot on any model](https://usemagpie.ai/docs/ds-bot): DS Bot (DeepSeek Bot) on GLM, Kimi, Qwen, Claude, GPT or a ChatGPT subscription through magpie: its data folder, the route in profiles/ds-bot/cordis.patch.yml, new and older Bots, web search, switching back.
- [Prime Agent on any model](https://usemagpie.ai/docs/prime-agent): Prime Intellect's Prime Agent (prime-agent) on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: settings.json and models.json in ~/.prime/agent, PRIME_AGENT_CODING_AGENT_DIR, allowedModels, switching back.
- [OpenHanako on any model](https://usemagpie.ai/docs/openhanako): OpenHanako (HanaAgent) on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: the magpie provider in ~/.hanako, the primary agent's chat model, its local API, the catalog sealed since 1.0, switching back.
- [Kun on any model](https://usemagpie.ai/docs/kun): Kun (KunAgent), its desktop app and the kun TUI, on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: the magpie model connection through kun serve's admin API, the default model, switching back.
- [Alma on any model](https://usemagpie.ai/docs/alma): the Alma desktop app on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: the magpie provider through Alma's local API, thinking levels, image generation, switching back.
- [OpenPencil on any model](https://usemagpie.ai/docs/openpencil): the OpenPencil design canvas's chat on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: the magpie builtin agent in settings.json, quitting OpenPencil first, the model list, switching back.
- [Muse Code on any model](https://usemagpie.ai/docs/muse-code): Meta's muse CLI on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: endpoint_transport and model in settings.json, auth none, the model list, switching back.
- [Paimon on any model](https://usemagpie.ai/docs/paimon): the Paimon terminal coding agent (aisk/paimon) on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: model, providers.litellm and the context window in config.json, switching back.
- [PenguinHarness on any model](https://usemagpie.ai/docs/penguin): PenguinHarness (the penguin CLI and desktop app) on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: default_model, [providers.magpie] and [[models]] in .project_config.toml, no restart, switching back.
- [MothX on any model](https://usemagpie.ai/docs/mothx): MothX (oschina/mothx, formerly vibecoding) on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: defaultProvider, defaultModel and providers.magpie in settings.json, thinking levels, switching back.
- [Avibe on any model](https://usemagpie.ai/docs/avibe): Avibe (avibe-os, the vibe CLI) and the Claude Code, Codex and OpenCode it runs on DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription through magpie: magpie as a Model Hub source, chat completions, the model list, removing it.
- [StepCode on any model](https://usemagpie.ai/docs/stepcode): StepCode (StepFun's step command) on any model through magpie: defaultProvider and defaultModel in ~/.stepcode/config.toml, providers.magpie in models.json, the enabledModels scope, and switching back.
- [omp on any model](https://usemagpie.ai/docs/omp): omp (oh-my-pi) on any model through magpie: a model and thinking level per role in ~/.omp/agent/config.yml, the magpie provider in models.yml, enabledModels, profiles, image models, and switching back.
- [Ante on any model](https://usemagpie.ai/docs/ante): Ante (antigma.ai) on any model through magpie: the magpie provider and preferred_models in ~/.ante/catalog.json, provider and model in settings.json, no auth block, restarting, and switching back.
- [Aside on any model](https://usemagpie.ai/docs/aside): providers.magpie in each Aside account's models.json, the default model, categories and image model set through aside repl, which account, switching back.
- [fx on any model](https://usemagpie.ai/docs/fx): Vercel Labs' fx (fx.sh): provider, models and a keyless providers.magpie in ~/.fx/settings.json, the 256-model list, what the user set kept, switching back.
- [Grok App on any model](https://usemagpie.ai/docs/grok-app): RongleCat/grok-app: magpie as the [model.magpie] custom provider in agent-home/config.toml, models and efforts in its picker, the route switched by Use in the App, disconnecting.
- [Mister Morph on any model](https://usemagpie.ai/docs/mister-morph): morph's llm keys in ~/.morph/config.yaml on the Responses API, context_window_tokens, reasoning_effort, profiles and routes left alone, switching back.
- [mu on any model](https://usemagpie.ai/docs/mu): mu (mu-agent, Pi with a judgment kernel) on any model through magpie: ~/.mu/agent settings.json and models.json, no mu setup needed, its own magpie-mu key, the judge left alone.
- [Claude Science on any model](https://usemagpie.ai/docs/claude-science): Claude Science, Anthropic's research app, on any model through magpie: its claude-science daemon restarted with ANTHROPIC_BASE_URL set to the gateway, claude-magpie aliases in its model menu, the Claude sign-in never passed on, WSL.
- [VS Code on any model](https://usemagpie.ai/docs/vscode): VS Code's own Chat (GitHub Copilot Chat) on any model through magpie, with no Copilot plan: a Custom Endpoint group in chatLanguageModels.json, chat.defaultModel, every profile, Insiders, VSCodium's OpenAI Compatible provider.
- [WorkBuddy on any model](https://usemagpie.ai/docs/workbuddy): Tencent's WorkBuddy and WorkBuddy AI with magpie's models in ~/.workbuddy/models.json, the custom-local picker, context sizes, and your own settings kept.
- [Pencil on any model](https://usemagpie.ai/docs/pencil): Pencil (pen.dev) with magpie as a custom provider in ~/.pencil/models.json, on OpenAI Completions, picked in its agent composer.
- [Mistral Vibe on any model](https://usemagpie.ai/docs/mistral-vibe): Mistral Vibe (the vibe CLI) with magpie's provider and models in ~/.vibe/config.toml, the key in extra_headers, and active_model put back on switching off.
- [OpenMausBot on any model](https://usemagpie.ai/docs/openmausbot): OpenMausBot's bots on a magpie engine (a Claude endpoint) in ~/.openmausbot/config.json, the default fleet kept, and why to quit it before a change.
- [JetBrains Copilot on any model](https://usemagpie.ai/docs/copilot-jetbrains): Copilot Chat in IntelliJ IDEA, PyCharm, GoLand and Android Studio on magpie's models through Bring Your Own Key's byok.json, the Copilot plan it needs, and agent mode.
- [Kiro Crew on any model](https://usemagpie.ai/docs/kirocrew): Kiro Crew's sessions on a harness connected to magpie (Codex, Claude Code, OpenCode, Pi or Goose), set in config.json, with config.local.json left alone and the ACP adapters each needs.
- [Cherry Studio](https://usemagpie.ai/docs/cherry-studio): add magpie to Cherry Studio as one OpenAI-compatible provider in one click, confirmed in Cherry Studio, and use every magpie model there, Claude, ChatGPT and Copilot subscriptions included; model list, status and usage.
- [Fixing common errors](https://usemagpie.ai/docs/troubleshooting): what the gateway's errors mean and the fix: 401 and 403, 429 and rest periods, 502 and 504, model not found, an agent that doesn't show a model, port 3425 in use, agents in WSL, use from another computer and subscriptions moved to plugins.
- [When an agent stops going through magpie](https://usemagpie.ai/docs/agent-drift): what the Agents page means when an agent's config was changed, a model was switched outside magpie, an agent still runs on its old config, an address off loopback doesn't answer (WSL's firewall) or Codex's proxy doesn't pass requests on, and the fix for each.
- [Web search for any model](https://usemagpie.ai/docs/web-search): how magpie gives web search to models that can't search (DeepSeek, GLM, Qwen) in Claude Code's WebSearch and Codex's web_search: providers that search for other models, Search APIs (Tavily, Brave Search, Exa, You.com, SearXNG and more), results per search, and the search as an MCP server for Cursor and Claude Desktop.
- [Round robin and failover across accounts, keys and providers](https://usemagpie.ai/docs/routing-groups): several accounts or API keys on one provider and routing groups across providers: Smart, In order, In turn, Least used first, Weekly pace, By weight, Free first and Manual routings, Stays for the prompt cache, auto-found groups, patterns, rules, magpie group CLI and templates.
- [Quota left on every subscription and key](https://usemagpie.ai/docs/quota): each window's use and reset on Claude, Codex, Copilot and other subscriptions and each key's balance: magpie quota and --json, GET /v1/magpie/quotas, quota alerts, magpie quota wait to go on once allowance is back, history, and a Codex account's resets and credits.
- [Image recognition and generation for any model](https://usemagpie.ai/docs/images): an Image recognition model describes images for models that can't see; analyze_image MCP server; Magpie Image generates images and videos into the project
- [Token usage and cost per agent](https://usemagpie.ai/docs/usage): tokens and cost per agent, model, account and session; magpie usage --csv; magpie model price for a relay's real price; Claude Code status line; /v1/magpie/usage
- [Google Vertex AI in Claude Code, Codex and other agents](https://usemagpie.ai/docs/vertex): Gemini, Claude and partner models (DeepSeek, GLM, gpt-oss) from your own Google Cloud project, signed with gcloud credentials or a service account, no API key; models per location, Model Garden, PayGo headers and common errors.
- [Amazon Bedrock in Claude Code, Codex and other agents](https://usemagpie.ai/docs/bedrock): the bedrock and bedrock-mantle presets with one Bedrock API key and no SigV4; regions, global inference profiles for Claude and GPT, other makers' in-region ids, Mantle's own model list, and CLAUDE_CODE_USE_BEDROCK.
- [Azure OpenAI in Codex, Claude Code and other agents](https://usemagpie.ai/docs/azure): the azure preset at your own resource, its v1 API under /openai/v1, the key in api-key, deployments as model ids, API Management gateways and headers.
- [Groq in Claude Code, Codex and other agents](https://usemagpie.ai/docs/groq): the groq preset with one key, Claude Code translated to Chat with the cache counted, per-model rate limits, overflows that make the agent compact, Whisper and speech.
- [Vercel AI Gateway in Claude Code, Codex and other agents](https://usemagpie.ai/docs/vercel): the vercel preset with Chat, Responses and Anthropic Messages set, Claude models kept on Messages for the cache, and the model list sorted by Vercel's own types.
- [NVIDIA NIM in Claude Code, Codex and other agents](https://usemagpie.ai/docs/nvidia): the nvidia preset on Chat Completions at integrate.api.nvidia.com, Claude Code and Codex translated, free models marked in the pickers, imported keys folded into one provider.
- [API relays in Claude Code, Codex and other agents](https://usemagpie.ai/docs/relay): preset relays (AiHubMix, PipeLLM, 302.AI, CherryIN, 鱼鱼连线) and any OpenAI- or Anthropic-compatible address, Claude models on Messages for caching, model price, model wire, context and output limits, scheduled list refresh.
- [Fireworks and Fireworks Nexus in Claude Code, Codex and other agents](https://usemagpie.ai/docs/fireworks): the fireworks preset on Chat Completions, pay as you go; fireworks-nexus on Nexus Auto (Pro and Team take only auto), Claude and GPT with your own keys in x-anthropic-api-key and x-openai-api-key.
- [Free models in Claude Code, Codex and other agents](https://usemagpie.ai/docs/free-models): OpenCode Zen's and Kilo Gateway's free models with no key, the free mark in pickers, and free models first in a routing group.
- [OpenCode Go and ClinePass in Claude Code, Codex and other agents](https://usemagpie.ai/docs/coding-plans): the $10 and $9.99 monthly plans for open coding models in any agent, each Go model on its own protocol, Go's quota windows, ClinePass's plan and free models.
- [Keep magpie in sync across computers: WebDAV, S3 and GitHub](https://usemagpie.ai/docs/sync): providers, keys, settings, agents' models and the library synced every 3 minutes, sealed with a passphrase; encrypted backup and restore.
- [Mirrors in China: faster magpie plugin, Bun and update downloads](https://usemagpie.ai/docs/mirrors): the Plugins page's Mirrors in China switch (npmmirror, jsDelivr), --proxy and --mirror for installs and updates, MAGPIE_MIRRORS fallback, and what is checksum-checked.
- [Library](https://usemagpie.ai/docs/library): instructions, MCP servers, skills, hooks and subagents for each agent.
- [MCP router](https://usemagpie.ai/docs/mcp-router): one magpie MCP server per agent.
- [Remote magpie](https://usemagpie.ai/docs/remote): use one magpie from several computers.
- [Docker](https://usemagpie.ai/docs/docker): run magpie on a server or NAS.
- [Add to magpie](https://usemagpie.ai/docs/import): import links that add a provider and its models in one click.
- [Integrate your app](https://usemagpie.ai/docs/integrate): how an AI app or agent works with magpie's gateway.
- [Writing plugins](https://usemagpie.ai/docs/plugins): OpenCode plugins that add a provider.
- [Privacy](https://usemagpie.ai/docs/privacy): what magpie sends on its own, and every switch that turns it off.

## Common questions

- **How do I use DeepSeek, Kimi or GLM in Claude Code?** Add the provider's key in magpie, then pick its model for Claude Code. magpie points Claude Code at its gateway and translates Anthropic Messages to the provider's API.
- **How do I use a model other than OpenAI's in Codex?** Add the provider in magpie and pick the model for Codex; it appears in Codex's /model list with matching reasoning efforts.
- **Can I use my ChatGPT or Claude subscription in other agents?** Yes: sign in once in magpie and the subscription's models appear in every agent's picker.
- **Is it a CC Switch or claude-code-router alternative?** It covers much of the same ground for every agent at once: switching providers, a translating gateway, routing and failover. See the comparison: https://usemagpie.ai/docs/alternatives
- **Does magpie read API keys from my shell?** No. It never reads keys from environment variables; it uses only what you add.
