+
+
+Use your ChatGPT Plus or Pro subscription in Claude Code · magpie
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Docs · Guide
+
Use your ChatGPT Plus or Pro subscription in Claude Code
+
Claude Code can run on the GPT models of your ChatGPT Plus or Pro plan. Sign in to ChatGPT in magpie, pick a codex/… model for Claude Code, and keep working as before. No OpenAI API key.
+
+
Claude Code speaks Anthropic’s Messages API. magpie runs a gateway on your computer, at 127.0.0.1:3425, that translates each of Claude Code’s requests for the GPT model and each reply back, streaming and tool calls included. magpie writes the gateway’s address and key into Claude Code’s settings.json, and your ChatGPT sign-in stays in magpie.
In the Agents tab, click the model on Claude Code’s row and choose a codex/… model. From a terminal:
+
Terminal
magpie models # every model, as provider/model
+magpie claude codex/gpt-5.5
+
Inside Claude Code, /model lists magpie’s models too, marked “via magpie”, so you can switch there.
+
Only some sessions on GPT? Leave Claude Code unconnected in magpie and run claude-magpie when you want it on a GPT model. It starts the same claude with magpie’s settings for that session only, and settings.json is not rewritten.
Claude Code asks for models by tier: opus, sonnet, haiku and fable. Its own small jobs, such as a session’s title and Explore subagents, go to the haiku tier. With a GPT model as the main model:
The effort Claude Code asks for goes to the GPT model as its reasoning effort, on requests where Claude Code has thinking on. magpie also tells Claude Code which effort levels each model has.
+
To hold one effort whatever Claude Code asks, set effort on Claude Code’s row. opus effort, sonnet effort, haiku effort, fable effort and subagent effort set it per tier. Each starts at the effort Claude Code asks for. An open Claude Code session keeps the effort it started with, so restart it to use a new one.
Requests are served on your ChatGPT account, so they count toward your plan’s usage limits, as Codex’s own requests do.
+
+
See what’s used. Turn on status line on Claude Code’s row: it shows the 5h and 7d use of the accounts magpie serves, under Claude Code’s prompt. magpie accounts lists each account and how much of its allowance is used. The Usage tab has the history.
+
When an account runs out. magpie sets it aside until the reset OpenAI’s refusal names, else until its full window renews, else for 5 hours, and sends requests to your next account or the provider’s Fallback. The account comes back on its own once its window renews.
Add another account. Click the ChatGPT tile again, or run magpie accounts add codex again. Each account is listed under the provider.
+
Spread requests over them. Open the provider’s row and tick every account to use. Smart routing, the default, sends requests to the account with quota to spare whose allowance renews soonest.
+
Fall back to another model. The provider’s Fallback lists models to use when every account is out, rate limited or down, a model from another subscription or an API key included.
Pick one of Claude Code’s own models on its row, or run:
+
Terminal
magpie claude default
+
That takes magpie’s wiring out of Claude Code and puts back what it had. Disconnect on Claude Code’s row does the same.
+
Your claude.ai sign-in. On a magpie model, Claude Code’s sign-in setting is magpie’s key by default: claude.ai is signed out for it, so /usage plan limits, connectors, voice and /teleport are off. Set it to claude.ai to keep them.
A Claude Pro or Max subscription works in Codex the same way. Sign in to Claude in magpie and pick a claude/… model for Codex. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
+
Terminal
magpie accounts add claude
+magpie codex claude/claude-opus-5-5
Can I use my ChatGPT Plus or Pro subscription in Claude Code?
+
Yes. Sign in to ChatGPT in magpie and pick a codex/… model on Claude Code’s row, or run magpie claude codex/gpt-5.5. magpie translates Claude Code’s requests for the GPT model and the replies back, tool calls included.
+
Do I need an OpenAI API key?
+
No. magpie signs in on OpenAI’s own page, and Claude Code gets the gateway’s key. Your sign-in stays in magpie.
+
Does it use my ChatGPT plan’s limits?
+
Yes. Requests are served on your ChatGPT account and count toward its usage limits. magpie’s status line shows each account’s 5h and 7d use under Claude Code’s prompt.
+
Which model do Claude Code’s Haiku requests use?
+
The GPT model you picked, unless you give the haiku tier a model of its own with magpie claude haiku <model>.
+
How do I go back to Claude’s own models?
+
Run magpie claude default, or pick one of Claude Code’s own models on its row in magpie.
+
Do my requests go through a magpie server?
+
No. The gateway runs on your computer. Requests go from it to OpenAI; magpie has no server of its own in that path.
+
+
+
+
+
+
+
+
+
diff --git a/site/public/docs/claude-code-models.html b/site/public/docs/claude-code-models.html
index 6c912f5fa..d2414e9a8 100644
--- a/site/public/docs/claude-code-models.html
+++ b/site/public/docs/claude-code-models.html
@@ -240,7 +240,7 @@ magpie claude haiku "" # back to the main model<
Sign in to the subscription in magpie: + Add provider, then the ChatGPT or Copilot tile. magpie opens the vendor’s own sign-in page. The account’s models then show in Claude Code’s picker as codex/… or copilot/….
Terminal
magpie accounts add codex # sign in to a ChatGPT account
magpie claude codex/gpt-5.5
-
Claude Code still speaks Anthropic Messages. magpie translates each request for the GPT model and the reply back, tool calls included. Antigravity accounts work the same way, as antigravity/….
+
Claude Code still speaks Anthropic Messages. magpie translates each request for the GPT model and the reply back, tool calls included. Antigravity accounts work the same way, as antigravity/…. For a ChatGPT plan in full, tiers, effort and limits included, see ChatGPT in Claude Code.
Claude Pro や Max のサブスクも同じように Codex で使えます。magpie で Claude にサインインし、Codex に claude/… のモデルを選びます。Claude サブスクのリクエストはコンピュータにインストールされた Claude Code を通るので、アンインストールしないでください。
+
ターミナル
magpie accounts add claude
+magpie codex claude/claude-opus-5-5
“… not an API reply”プロバイダは応答しましたが、Web ページ(サインインページ、Cloudflare のチャレンジ)、空の本文、JSON でない内容でした。たいていはベース URL が API ではなく Web サイトを指しています。ベンダーのドキュメントと照らし合わせ、/v1 で終わるべきかも確認してください。
+
OpenCode:“… which is no error, not an API reply”。OpenCode のゲートウェイは、モデル名だけを含む 400 を返すことがあります。同じリクエストは数秒後に通るので、magpie はこれを 502 とみなし、リクエストの待ち時間内に再試行するか、グループの次のメンバーを試します。誰も休ませません。非常に大きなツール一覧を含むリクエストで起きます。
“<provider>: no first token in Ns”。ルーティンググループは各メンバーに応答開始までの時間(最初のトークン)を与えます。それを過ぎたので次のメンバーに移りました。遅いモデルにはグループで長くします。
+
“no member of the group answered within its Ns budget”。グループの時間内に全メンバーを試し、どれも応答しませんでした。
+
“magpie held this request for … without routing it to any provider”。リクエストが magpie の中で待ちすぎたため、待たせ続けずに止めました。送り直してください。繰り返すときは、ルーティング ページでそのリクエストの レポートをコピー して共有してください。
The model id is magpie’s (magpie models). Sharing lets other computers on your network in with a gateway key; see Remote magpie.
-
Stuck, or have a setup worth sharing? Ask on Discord. Vendors who want to hand their users a ready-made provider: see Add to magpie.
+
An error from the gateway? See Fixing common errors. Stuck, or have a setup worth sharing? Ask on Discord. Vendors who want to hand their users a ready-made provider: see Add to magpie.
Can I use my ChatGPT Plus or Pro subscription in Claude Code?
-
Yes. Sign in to ChatGPT in magpie and pick a codex/… model on Claude Code’s row, or run magpie claude codex/gpt-5.5. magpie translates Claude Code’s Anthropic requests for the GPT model and the replies back, tool calls included.
+
Yes. Sign in to ChatGPT in magpie and pick a codex/… model on Claude Code’s row, or run magpie claude codex/gpt-5.5. magpie translates Claude Code’s Anthropic requests for the GPT model and the replies back, tool calls included. The whole setup, tiers and effort included, is in ChatGPT in Claude Code.
Can I use my Claude Pro or Max subscription in Codex or OpenCode?
Yes. Sign in to Claude in magpie and pick a claude/… model on the agent’s row. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
An error from magpie’s gateway says what went wrong in its own words. This page lists the common ones, what causes them, and the fix.
+
+
Every request is listed on magpie’s Routing page, with which provider and account it went to and how each try ended. Copy Report on a request copies what you need to ask for help.
From the vendor. The provider turned down the key or sign-in magpie sent. magpie sets that key or account aside and tries the next one, so you see the error only when none is left. A sign-in that has run out says so, for example “the ChatGPT sign-in has expired — sign in again”.
+
Fix: sign in again from + Add provider (or magpie accounts add <provider>), or give the provider a new key.
+
From magpie itself. magpie answers 403 on its own in a few cases, before anything is sent:
+
+
Error
Cause
Fix
+
model disabled
You turned the model off in magpie.
Turn it on again on its provider.
+
model not allowed for the gateway key
The gateway key is held to some models.
magpie gateway-key models <id> lists or changes them.
+
magpie doesn’t answer the web page …
A web page called the gateway from a browser.
List it in Settings › Network and sharing › Web pages, and send a gateway key.
A 429 means the provider is out of quota, out of credit or rate limiting you. magpie rests the key or account that was refused and sends the request to the next account, the next member of a routing group, or the provider’s Fallback. The provider’s row shows Resting · {why} · back at {time}.
+
+
Refused for
Rests
+
Quota, with a reset time
Until the reset
+
Rate limit, with Retry-After
Until then
+
Credit
30 minutes, then 2 hours, 8 hours, a day, 3 days and a week if it is refused again
+
A ChatGPT account out of credits
Until the reset its refusal names, else until its full window renews, else 5 hours
+
Any other failure
A minute, doubling on repeats up to 10 minutes (30 for a rate limit)
+
+
+
Ask it again now.Try now ends the rest: the next request asks it again. Refused again, it rests again.
+
Cap the rest.magpie provider rest-cap <id> 4h sets the longest rest for a provider; off stops it resting for failures that say nothing of why.
+
A relay whose limits pass in a moment. Untick Set it aside when out of quota or rate limited in the provider editor’s Advanced: a 429 then rests nothing, and the next request goes to it as usual.
+
Never all at once. Add a second account or a fallback model, so a spent one never stops the agent. magpie accounts shows how much of each account’s allowance is used.
+
+
Rests are kept across restarts, so quitting magpie doesn’t bring a resting account back early.
A 502 means magpie couldn’t get an API reply from the provider. What follows the provider’s name says which case it is:
+
+
“didn’t answer: …” The connection failed: a name that doesn’t resolve, a refused connection, a proxy that is down. When this computer has no network at all, magpie notices and rests nobody.
+
“… not an API reply” The provider answered, but with a web page (a sign-in page, a Cloudflare challenge), nothing at all, or something that isn’t JSON. The base URL usually points at a web site instead of the API: check it against the vendor’s docs, and whether it should end in /v1.
+
OpenCode: “… which is no error, not an API reply”. OpenCode’s gateway sometimes answers a 400 holding only the model’s name. The same request is answered some seconds later, so magpie reads it as a 502, asks again within the request’s patience or tries a group’s next member, and rests nobody. It is tied to requests carrying very large tool lists.
+
+
A 502, 503, 504, 529 or Cloudflare’s 520 to 524 counts as busy: magpie asks again or moves to a routing group’s next member before the agent sees it.
“<provider>: no first token in Ns”. A routing group gives each member a time to start answering (First token). The member was slower, so the next was asked. Raise it on the group for a slow model.
+
“no member of the group answered within its Ns budget”. Every member of the group was tried within the group’s time and none answered.
+
“magpie held this request for … without routing it to any provider”. The request waited inside magpie and was stopped rather than left waiting. Send it again; if it comes back, Copy Report on that request on the Routing page and share it.
Restart the agent. Most agents read their config only when they start. magpie says so on the agent’s row after a change, for example “Codex builds its model list at start-up”. Codex’s app also keeps an app-server running; restart it as the notice says.
+
Check magpie serves it.magpie models lists every model you can pick. A model you turned off, or one whose provider is switched off, isn’t listed.
+
Claude Code./model lists magpie’s models marked “via magpie”. If CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX is set in your shell, Claude Code goes to that cloud instead of magpie; remove it from your shell profile.
The gateway listens on 127.0.0.1:3425. To move it, open Settings › Network and sharing › Gateway address. Only the port is set there, 1024 to 65535, and the agents magpie connected move with it.
+
+
magpie says
Fix
+
Port … is in use by another program: pick another one
Pick a free port.
+
Another magpie serves the gateway at …: set its port there, or quit it first
Two copies of magpie are running. Quit one.
+
Port … is taken by another program, magpie web perhaps: magpie tries again every few seconds
Find what holds the port, or move the gateway to another.
+
MAGPIE_ADDR=… sets the gateway’s whole address, host:port: unset it to set the port here
On Windows, magpie looks in running WSL distros for agents such as Claude Code, Codex, OpenCode, Kimi Code and Qwen Code. Each one it finds gets a row of its own on the Agents page, and magpie sets it up as it does on Windows. It never starts a stopped distro.
+
+
The agent isn’t listed. Start the distro, and check Settings › General › Detect agents in WSL is on.
+
It can’t reach magpie. Under WSL’s default NAT networking, magpie also serves the gateway at Windows’ address on the WSL network, with a key of its own, and writes that address into the agent’s config. With mirrored networking the agent uses 127.0.0.1 as on Windows. Windows’ firewall still decides: WSL’s network counts as Public, so allow magpie there if the connection is blocked.
+
A change doesn’t show. An agent in WSL reads its config at start-up: restart it there.
By default the gateway answers only this computer. To use it from another: Settings › Network and sharing › Share on local network. The other computer sends a gateway key from the Gateway page’s Gateway keys.
+
+
“magpie isn’t shared on the local network”. Turn sharing on, on the computer that runs magpie.
+
401. The key is missing, off or expired. Send an enabled gateway key as Authorization: Bearer <key> or x-api-key.
+
403 for a model. The key is held to some models: magpie gateway-key models <id>.
+
+
Don’t open the port to the internet; use a VPN between your computers. The full setup, another magpie included, is in Remote magpie.
Command Code, Cursor, Devin, Factory, Grok, Kiro, Xiaomi MiMo, Qoder, WorkBuddy, ZCode and Zed are no longer built into magpie. Each is served by a community plugin that does the same job. Accounts added before still need to move to the plugin, and nothing serves them until they do.
+
Fix: a line over the Providers list says “… built-in subscription is retired, and its accounts haven’t moved to its plugin yet”. Press Move to the plugin: magpie installs the plugin and checks each account. Moving keeps your accounts, models and agents as they are. magpie also moves them by itself, and installing the plugin from the Plugins page does too.
+
An error after the move comes from the plugin, which does the sign-in, models and requests.
Why does magpie answer 502 when the provider is up?
+
The provider answered with something that isn’t an API reply, such as a web page or an empty body. The base URL usually points at the vendor’s web site instead of its API.
+
Why does an account stay unused after a 429?
+
magpie rests it until the reset the vendor named, or for a while if none was named. The provider’s row says when it is back, and Try now ends the rest.
+
What does “magpie knows no model” mean?
+
No provider serves a model by that name. Name it as provider/model, as magpie models lists it, or switch its provider on again.
+
How do I change magpie’s port?
+
Settings › Network and sharing › Gateway address. The agents magpie connected move with it.
+
Can an agent in WSL use magpie on Windows?
+
Yes. magpie finds agents in running WSL distros and sets each up with an address it can reach. Under NAT networking, Windows’ firewall must let WSL’s connection through.
+
Can I use magpie from another computer?
+
Yes. Turn on Settings › Network and sharing › Share on local network, and send a gateway key from the other computer. Don’t open the port to the internet.
+
+
Still stuck? Copy the request’s report from the Routing page and ask on Discord.
“… not an API reply”供应商回应了,但回的是网页(登录页、Cloudflare 验证页)、空内容,或不是 JSON 的内容。通常是 Base URL 指向了网站而不是 API:对照厂商文档检查,看看是否需要以 /v1 结尾。
+
OpenCode:“… which is no error, not an API reply”。OpenCode 的网关有时会回一个只含模型名的 400。同样的请求几秒后就能成功,所以 magpie 把它当作 502:在请求的等待时间内重试,或换路由组的下一个成员,不暂停任何账号。它和携带特别多工具定义的请求有关。
+
+
+
+
+
+
+
+
+
diff --git a/site/public/llms-full.txt b/site/public/llms-full.txt
index 7dce8e581..d603cf838 100644
--- a/site/public/llms-full.txt
+++ b/site/public/llms-full.txt
@@ -312,7 +312,7 @@ Users report that this works. Trae keeps custom models in your Trae account, on
The model id is magpie’s (`magpie models`). Sharing lets other computers on your network in with a gateway key; see [Remote magpie](https://usemagpie.ai/docs/remote#share).
-Stuck, or have a setup worth sharing? Ask on [Discord](https://discord.gg/vGSnD3ZKQF). Vendors who want to hand their users a ready-made provider: see [Add to magpie](https://usemagpie.ai/docs/import).
+An error from the gateway? See [Fixing common errors](https://usemagpie.ai/docs/troubleshooting). Stuck, or have a setup worth sharing? Ask on [Discord](https://discord.gg/vGSnD3ZKQF). Vendors who want to hand their users a ready-made provider: see [Add to magpie](https://usemagpie.ai/docs/import).
---
@@ -405,7 +405,7 @@ magpie accounts add codex # sign in to a ChatGPT account
magpie claude codex/gpt-5.5
```
-Claude Code still speaks Anthropic Messages. magpie translates each request for the GPT model and the reply back, tool calls included. Antigravity accounts work the same way, as `antigravity/…`.
+Claude Code still speaks Anthropic Messages. magpie translates each request for the GPT model and the reply back, tool calls included. Antigravity accounts work the same way, as `antigravity/…`. For a ChatGPT plan in full, tiers, effort and limits included, see [ChatGPT in Claude Code](https://usemagpie.ai/docs/claude-code-chatgpt).
## Routing over several keys
@@ -766,7 +766,7 @@ Any tool with a base-URL setting can use a subscription through the gateway too.
### Can I use my ChatGPT Plus or Pro subscription in Claude Code?
-Yes. Sign in to ChatGPT in magpie and pick a `codex/…` model on Claude Code’s row, or run `magpie claude codex/gpt-5.5`. magpie translates Claude Code’s Anthropic requests for the GPT model and the replies back, tool calls included.
+Yes. Sign in to ChatGPT in magpie and pick a `codex/…` model on Claude Code’s row, or run `magpie claude codex/gpt-5.5`. magpie translates Claude Code’s Anthropic requests for the GPT model and the replies back, tool calls included. The whole setup, tiers and effort included, is in [ChatGPT in Claude Code](https://usemagpie.ai/docs/claude-code-chatgpt).
### Can I use my Claude Pro or Max subscription in Codex or OpenCode?
@@ -796,6 +796,132 @@ Using a key instead? See [Models in Claude Code](https://usemagpie.ai/docs/claud
---
+Source: https://usemagpie.ai/docs/claude-code-chatgpt
+
+# Use your ChatGPT Plus or Pro subscription in Claude Code
+
+Claude Code can run on the GPT models of your ChatGPT Plus or Pro plan. Sign in to ChatGPT in magpie, pick a `codex/…` model for Claude Code, and keep working as before. No OpenAI API key.
+
+Claude Code speaks Anthropic’s Messages API. magpie runs a gateway on your computer, at `127.0.0.1:3425`, that translates each of Claude Code’s requests for the GPT model and each reply back, streaming and tool calls included. magpie writes the gateway’s address and key into Claude Code’s `settings.json`, and your ChatGPT sign-in stays in magpie.
+
+## Sign in to ChatGPT
+
+1. **Open Add provider.** In magpie’s Providers tab, press + Add provider.
+2. **Click the ChatGPT tile.** magpie opens OpenAI’s own sign-in page in your browser. The account shows up as soon as you finish.
+
+Or from a terminal:
+
+```
+magpie accounts add codex # sign in to a ChatGPT account
+```
+
+The account’s models are `codex/…`.
+
+## Pick a GPT model for Claude Code
+
+In the Agents tab, click the model on Claude Code’s row and choose a `codex/…` model. From a terminal:
+
+```
+magpie models # every model, as provider/model
+magpie claude codex/gpt-5.5
+```
+
+Inside Claude Code, `/model` lists magpie’s models too, marked “via magpie”, so you can switch there.
+
+> **Only some sessions on GPT?** Leave Claude Code unconnected in magpie and run `claude-magpie` when you want it on a GPT model. It starts the same `claude` with magpie’s settings for that session only, and `settings.json` is not rewritten.
+
+## How Opus, Sonnet and Haiku map
+
+Claude Code asks for models by tier: `opus`, `sonnet`, `haiku` and `fable`. Its own small jobs, such as a session’s title and Explore subagents, go to the haiku tier. With a GPT model as the main model:
+
+| Tier | Variable in `env` | By default |
+| --- | --- | --- |
+| opus | `ANTHROPIC_DEFAULT_OPUS_MODEL` | The GPT model you picked |
+| sonnet | `ANTHROPIC_DEFAULT_SONNET_MODEL` | The GPT model you picked |
+| haiku | `ANTHROPIC_DEFAULT_HAIKU_MODEL`, `ANTHROPIC_SMALL_FAST_MODEL` | The GPT model you picked |
+| fable | `ANTHROPIC_DEFAULT_FABLE_MODEL` | Left unset |
+
+To give a tier a model of its own, say a smaller one for haiku, set it on Claude Code’s row in magpie, or from a terminal:
+
+```
+magpie claude haiku codex/… # one tier on its own model
+magpie claude haiku "" # back to the main model
+```
+
+## Reasoning effort
+
+The effort Claude Code asks for goes to the GPT model as its reasoning effort, on requests where Claude Code has thinking on. magpie also tells Claude Code which effort levels each model has.
+
+To hold one effort whatever Claude Code asks, set effort on Claude Code’s row. opus effort, sonnet effort, haiku effort, fable effort and subagent effort set it per tier. Each starts at the effort Claude Code asks for. An open Claude Code session keeps the effort it started with, so restart it to use a new one.
+
+## Limits and usage
+
+Requests are served on your ChatGPT account, so they count toward your plan’s usage limits, as Codex’s own requests do.
+
+- **See what’s used..** Turn on status line on Claude Code’s row: it shows the 5h and 7d use of the accounts magpie serves, under Claude Code’s prompt. `magpie accounts` lists each account and how much of its allowance is used. The Usage tab has the history.
+- **When an account runs out..** magpie sets it aside until the reset OpenAI’s refusal names, else until its full window renews, else for 5 hours, and sends requests to your next account or the provider’s Fallback. The account comes back on its own once its window renews.
+
+## Several accounts and failover
+
+- **Add another account..** Click the ChatGPT tile again, or run `magpie accounts add codex` again. Each account is listed under the provider.
+- **Spread requests over them..** Open the provider’s row and tick every account to use. Smart routing, the default, sends requests to the account with quota to spare whose allowance renews soonest.
+- **Fall back to another model..** The provider’s Fallback lists models to use when every account is out, rate limited or down, a model from another subscription or an API key included.
+
+The routing modes are in [Get started](https://usemagpie.ai/docs/start#routing).
+
+## Switch back
+
+Pick one of Claude Code’s own models on its row, or run:
+
+```
+magpie claude default
+```
+
+That takes magpie’s wiring out of Claude Code and puts back what it had. Disconnect on Claude Code’s row does the same.
+
+> **Your claude.ai sign-in.** On a magpie model, Claude Code’s sign-in setting is magpie’s key by default: claude.ai is signed out for it, so `/usage` plan limits, connectors, voice and `/teleport` are off. Set it to claude.ai to keep them.
+
+## The other way round: Claude in Codex
+
+A Claude Pro or Max subscription works in Codex the same way. Sign in to Claude in magpie and pick a `claude/…` model for Codex. Requests on a Claude subscription run through the Claude Code installed on your computer, so keep it installed.
+
+```
+magpie accounts add claude
+magpie codex claude/claude-opus-5-5
+```
+
+See [Models in Codex](https://usemagpie.ai/docs/codex-models) and [Subscriptions in any agent](https://usemagpie.ai/docs/subscriptions).
+
+## FAQ
+
+### Can I use my ChatGPT Plus or Pro subscription in Claude Code?
+
+Yes. Sign in to ChatGPT in magpie and pick a `codex/…` model on Claude Code’s row, or run `magpie claude codex/gpt-5.5`. magpie translates Claude Code’s requests for the GPT model and the replies back, tool calls included.
+
+### Do I need an OpenAI API key?
+
+No. magpie signs in on OpenAI’s own page, and Claude Code gets the gateway’s key. Your sign-in stays in magpie.
+
+### Does it use my ChatGPT plan’s limits?
+
+Yes. Requests are served on your ChatGPT account and count toward its usage limits. magpie’s status line shows each account’s 5h and 7d use under Claude Code’s prompt.
+
+### Which model do Claude Code’s Haiku requests use?
+
+The GPT model you picked, unless you give the haiku tier a model of its own with `magpie claude haiku `.
+
+### How do I go back to Claude’s own models?
+
+Run `magpie claude default`, or pick one of Claude Code’s own models on its row in magpie.
+
+### Do my requests go through a magpie server?
+
+No. The gateway runs on your computer. Requests go from it to OpenAI; magpie has no server of its own in that path.
+
+Using an API key instead? See [Models in Claude Code](https://usemagpie.ai/docs/claude-code-models). Something fails? See [Fixing common errors](https://usemagpie.ai/docs/troubleshooting), or ask on [Discord](https://discord.gg/vGSnD3ZKQF).
+
+---
+
Source: https://usemagpie.ai/docs/local-models
# Use Ollama or LM Studio models in Claude Code and Codex
@@ -3057,6 +3183,144 @@ See also [Privacy](https://usemagpie.ai/docs/privacy) for everything magpie send
---
+Source: https://usemagpie.ai/docs/troubleshooting
+
+# Fixing common errors: 401, 429, 502, 504 and more
+
+An error from magpie’s gateway says what went wrong in its own words. This page lists the common ones, what causes them, and the fix.
+
+Every request is listed on magpie’s Routing page, with which provider and account it went to and how each try ended. Copy Report on a request copies what you need to ask for help.
+
+## 401 and 403: a key or sign-in refused
+
+**From the vendor.** The provider turned down the key or sign-in magpie sent. magpie sets that key or account aside and tries the next one, so you see the error only when none is left. A sign-in that has run out says so, for example “the ChatGPT sign-in has expired — sign in again”.
+
+- **Fix:.** sign in again from + Add provider (or `magpie accounts add `), or give the provider a new key.
+
+**From magpie itself.** magpie answers 403 on its own in a few cases, before anything is sent:
+
+| Error | Cause | Fix |
+| --- | --- | --- |
+| model disabled | You turned the model off in magpie. | Turn it on again on its provider. |
+| model not allowed for the gateway key | The gateway key is held to some models. | `magpie gateway-key models ` lists or changes them. |
+| magpie doesn’t answer the web page … | A web page called the gateway from a browser. | List it in Settings › Network and sharing › Web pages, and send a gateway key. |
+
+## 429 and rest periods
+
+A 429 means the provider is out of quota, out of credit or rate limiting you. magpie rests the key or account that was refused and sends the request to the next account, the next member of a routing group, or the provider’s Fallback. The provider’s row shows Resting · {why} · back at {time}.
+
+| Refused for | Rests |
+| --- | --- |
+| Quota, with a reset time | Until the reset |
+| Rate limit, with Retry-After | Until then |
+| Credit | 30 minutes, then 2 hours, 8 hours, a day, 3 days and a week if it is refused again |
+| A ChatGPT account out of credits | Until the reset its refusal names, else until its full window renews, else 5 hours |
+| Any other failure | A minute, doubling on repeats up to 10 minutes (30 for a rate limit) |
+
+- **Ask it again now..** Try now ends the rest: the next request asks it again. Refused again, it rests again.
+- **Cap the rest..** `magpie provider rest-cap 4h` sets the longest rest for a provider; `off` stops it resting for failures that say nothing of why.
+- **A relay whose limits pass in a moment..** Untick Set it aside when out of quota or rate limited in the provider editor’s Advanced: a 429 then rests nothing, and the next request goes to it as usual.
+- **Never all at once..** Add a second account or a fallback model, so a spent one never stops the agent. `magpie accounts` shows how much of each account’s allowance is used.
+
+Rests are kept across restarts, so quitting magpie doesn’t bring a resting account back early.
+
+## 502: the provider didn’t answer
+
+A 502 means magpie couldn’t get an API reply from the provider. What follows the provider’s name says which case it is:
+
+- **“didn’t answer: …”.** The connection failed: a name that doesn’t resolve, a refused connection, a proxy that is down. When this computer has no network at all, magpie notices and rests nobody.
+- **“… not an API reply”.** The provider answered, but with a web page (a sign-in page, a Cloudflare challenge), nothing at all, or something that isn’t JSON. The base URL usually points at a web site instead of the API: check it against the vendor’s docs, and whether it should end in `/v1`.
+- **OpenCode: “… which is no error, not an API reply”..** OpenCode’s gateway sometimes answers a 400 holding only the model’s name. The same request is answered some seconds later, so magpie reads it as a 502, asks again within the request’s patience or tries a group’s next member, and rests nobody. It is tied to requests carrying very large tool lists.
+
+A 502, 503, 504, 529 or Cloudflare’s 520 to 524 counts as busy: magpie asks again or moves to a routing group’s next member before the agent sees it.
+
+## 504: no answer in time
+
+- **“: no first token in Ns”..** A routing group gives each member a time to start answering (First token). The member was slower, so the next was asked. Raise it on the group for a slow model.
+- **“no member of the group answered within its Ns budget”..** Every member of the group was tried within the group’s time and none answered.
+- **“magpie held this request for … without routing it to any provider”..** The request waited inside magpie and was stopped rather than left waiting. Send it again; if it comes back, Copy Report on that request on the Routing page and share it.
+
+## Model not found (404)
+
+The error reads *magpie knows no model “…”*, often with *did you mean …?* and the list of your provider ids.
+
+- **Name it as magpie does..** Use `provider/model`, as `magpie models` lists it, a routing group’s id or name, or a bare model id.
+- **“… is switched off in Magpie, so … is not served”..** The provider or routing group is off. Switch it on again on the Providers or Routing page.
+- **No providers yet..** The error says “add a provider in magpie first”.
+
+## The agent doesn’t show the model
+
+- **Restart the agent..** Most agents read their config only when they start. magpie says so on the agent’s row after a change, for example “Codex builds its model list at start-up”. Codex’s app also keeps an app-server running; restart it as the notice says.
+- **Check magpie serves it..** `magpie models` lists every model you can pick. A model you turned off, or one whose provider is switched off, isn’t listed.
+- **Claude Code..** `/model` lists magpie’s models marked “via magpie”. If `CLAUDE_CODE_USE_BEDROCK` or `CLAUDE_CODE_USE_VERTEX` is set in your shell, Claude Code goes to that cloud instead of magpie; remove it from your shell profile.
+
+## Port 3425 is in use
+
+The gateway listens on `127.0.0.1:3425`. To move it, open Settings › Network and sharing › Gateway address. Only the port is set there, 1024 to 65535, and the agents magpie connected move with it.
+
+| magpie says | Fix |
+| --- | --- |
+| Port … is in use by another program: pick another one | Pick a free port. |
+| Another magpie serves the gateway at …: set its port there, or quit it first | Two copies of magpie are running. Quit one. |
+| Port … is taken by another program, magpie web perhaps: magpie tries again every few seconds | Find what holds the port, or move the gateway to another. |
+| MAGPIE_ADDR=… sets the gateway’s whole address, host:port: unset it to set the port here | Unset `MAGPIE_ADDR`, or change it. |
+
+## Agents in WSL
+
+On Windows, magpie looks in running WSL distros for agents such as Claude Code, Codex, OpenCode, Kimi Code and Qwen Code. Each one it finds gets a row of its own on the Agents page, and magpie sets it up as it does on Windows. It never starts a stopped distro.
+
+- **The agent isn’t listed..** Start the distro, and check Settings › General › Detect agents in WSL is on.
+- **It can’t reach magpie..** Under WSL’s default NAT networking, magpie also serves the gateway at Windows’ address on the WSL network, with a key of its own, and writes that address into the agent’s config. With mirrored networking the agent uses `127.0.0.1` as on Windows. Windows’ firewall still decides: WSL’s network counts as Public, so allow magpie there if the connection is blocked.
+- **A change doesn’t show..** An agent in WSL reads its config at start-up: restart it there.
+
+## From another computer on the network
+
+By default the gateway answers only this computer. To use it from another: Settings › Network and sharing › Share on local network. The other computer sends a gateway key from the Gateway page’s Gateway keys.
+
+- **“magpie isn’t shared on the local network”..** Turn sharing on, on the computer that runs magpie.
+- **401..** The key is missing, off or expired. Send an enabled gateway key as `Authorization: Bearer ` or `x-api-key`.
+- **403 for a model..** The key is held to some models: `magpie gateway-key models `.
+
+Don’t open the port to the internet; use a VPN between your computers. The full setup, another magpie included, is in [Remote magpie](https://usemagpie.ai/docs/remote).
+
+## A subscription moved to a plugin isn’t served
+
+Command Code, Cursor, Devin, Factory, Grok, Kiro, Xiaomi MiMo, Qoder, WorkBuddy, ZCode and Zed are no longer built into magpie. Each is served by a community plugin that does the same job. Accounts added before still need to move to the plugin, and nothing serves them until they do.
+
+- **Fix:.** a line over the Providers list says “… built-in subscription is retired, and its accounts haven’t moved to its plugin yet”. Press Move to the plugin: magpie installs the plugin and checks each account. Moving keeps your accounts, models and agents as they are. magpie also moves them by itself, and installing the plugin from the Plugins page does too.
+
+An error after the move comes from the plugin, which does the sign-in, models and requests.
+
+## FAQ
+
+### Why does magpie answer 502 when the provider is up?
+
+The provider answered with something that isn’t an API reply, such as a web page or an empty body. The base URL usually points at the vendor’s web site instead of its API.
+
+### Why does an account stay unused after a 429?
+
+magpie rests it until the reset the vendor named, or for a while if none was named. The provider’s row says when it is back, and Try now ends the rest.
+
+### What does “magpie knows no model” mean?
+
+No provider serves a model by that name. Name it as provider/model, as magpie models lists it, or switch its provider on again.
+
+### How do I change magpie’s port?
+
+Settings › Network and sharing › Gateway address. The agents magpie connected move with it.
+
+### Can an agent in WSL use magpie on Windows?
+
+Yes. magpie finds agents in running WSL distros and sets each up with an address it can reach. Under NAT networking, Windows’ firewall must let WSL’s connection through.
+
+### Can I use magpie from another computer?
+
+Yes. Turn on Settings › Network and sharing › Share on local network, and send a gateway key from the other computer. Don’t open the port to the internet.
+
+Still stuck? Copy the request’s report from the Routing page and ask on [Discord](https://discord.gg/vGSnD3ZKQF).
+
+---
+
Source: https://usemagpie.ai/docs/library
# Library
diff --git a/site/public/llms.txt b/site/public/llms.txt
index 0de18ce67..c7d0ca0f3 100644
--- a/site/public/llms.txt
+++ b/site/public/llms.txt
@@ -41,6 +41,7 @@ DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenA
- [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.
@@ -59,6 +60,7 @@ DeepSeek, Kimi (Moonshot), GLM (Zhipu), Qwen, MiniMax, Anthropic (Claude), OpenA
- [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.
+- [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.
- [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.
diff --git a/site/public/sitemap.xml b/site/public/sitemap.xml
index fe48116d9..c29de3b3b 100644
--- a/site/public/sitemap.xml
+++ b/site/public/sitemap.xml
@@ -5,6 +5,7 @@
https://usemagpie.ai/ja/https://usemagpie.ai/de/https://usemagpie.ai/docs/claude-code-models
+https://usemagpie.ai/docs/claude-code-chatgpthttps://usemagpie.ai/docs/codex-modelshttps://usemagpie.ai/docs/contributorshttps://usemagpie.ai/docs/docker
@@ -20,6 +21,7 @@
https://usemagpie.ai/docs/remotehttps://usemagpie.ai/docs/starthttps://usemagpie.ai/docs/subscriptions
+https://usemagpie.ai/docs/troubleshootinghttps://usemagpie.ai/docs/local-modelshttps://usemagpie.ai/docs/opencode-modelshttps://usemagpie.ai/docs/alternatives
@@ -37,6 +39,7 @@
https://usemagpie.ai/docs/anthropichttps://usemagpie.ai/docs/openaihttps://usemagpie.ai/docs/zh/claude-code-models
+https://usemagpie.ai/docs/zh/claude-code-chatgpthttps://usemagpie.ai/docs/zh/codex-modelshttps://usemagpie.ai/docs/zh/contributorshttps://usemagpie.ai/docs/zh/docker
@@ -52,6 +55,7 @@
https://usemagpie.ai/docs/zh/remotehttps://usemagpie.ai/docs/zh/starthttps://usemagpie.ai/docs/zh/subscriptions
+https://usemagpie.ai/docs/zh/troubleshootinghttps://usemagpie.ai/docs/zh/local-modelshttps://usemagpie.ai/docs/zh/opencode-modelshttps://usemagpie.ai/docs/zh/alternatives
@@ -69,6 +73,7 @@
https://usemagpie.ai/docs/zh/anthropichttps://usemagpie.ai/docs/zh/openaihttps://usemagpie.ai/docs/ja/claude-code-models
+https://usemagpie.ai/docs/ja/claude-code-chatgpthttps://usemagpie.ai/docs/ja/codex-modelshttps://usemagpie.ai/docs/ja/contributorshttps://usemagpie.ai/docs/ja/docker
@@ -83,6 +88,7 @@
https://usemagpie.ai/docs/ja/remotehttps://usemagpie.ai/docs/ja/starthttps://usemagpie.ai/docs/ja/subscriptions
+https://usemagpie.ai/docs/ja/troubleshootinghttps://usemagpie.ai/docs/ja/local-modelshttps://usemagpie.ai/docs/ja/opencode-modelshttps://usemagpie.ai/docs/ja/alternatives