跪拜 Guibai
← All articles
Artificial Intelligence

Pool Your AI Subscriptions: Routing WorkBuddy and Qoder Quotas Through a Single Local Gateway

By 对你无可奈何 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A local gateway that pools multiple AI subscription quotas into one endpoint is a concrete answer to tool sprawl, though it relies on community plugins and browser/OAuth sessions rather than official multi-platform support. Anyone running several AI coding tools on limited disk space gets a working reference for consolidating both storage and model access.

Summary

A developer with a 256 GB Mac running eleven AI coding tools realized the tools were consuming gigabytes of disk space and fragmenting their workflow across chat histories, indexes, and workspace states. The solution they settled on was Magpie, a free, open-source desktop-and-CLI AI gateway that sits between coding agents and model sources, aggregating models from accounts with paid subscriptions, check-in points, and gift quotas into a single local pool.

Magpie supports community plugins for WorkBuddy, WorkBuddy AI, Qoder, Qoder CN, and ZCode, letting the developer log in via browser or device authorization and expose only a curated subset of models to each tool. The article documents the full configuration flow: adding sources, restricting per-tool source visibility, filtering models at the source level, and syncing the catalog so that MiniMax Code, WorkBuddy, and other tools can select from the aggregate list.

The setup works for MiniMax Code and WorkBuddy, with real UI chat verification through ZCode's GLM-5.3-Flash. The Qoder CN IDE native chat does not expose a way to add a custom baseUrl, so that route remains unconfirmed. The article also covers check-in automation for supported sources, time-limited gift quotas that require client-side CAPTCHA, the extra hidden token overhead of app-side requests, and which desktop apps can be uninstalled without breaking gateway login states.

Takeaways
— Magpie is a free, open-source AI gateway with a desktop app and CLI, offered through an official install script at https://usemagpie.ai/install.sh.
— The developer's Mac had 11 AI tools installed; the combined application binaries alone took ~6.8 GB, while `~/.codex` alone was ~22 GB.
— Magpie detected 17 agents on the machine via `magpie ls`, including MiniMax Code, ZCode, two WorkBuddy instances, and two Qoder instances.
— WorkBuddy versions 5.6+ encrypt credentials, so Magpie cannot reuse the desktop login state; browser login is required instead.
— After installing source plugins and logging in, the model pool exposed 15 models from WorkBuddy, 16 from WorkBuddy AI, 17 from Qoder, 4 from Qoder CN, and 4 from ZCode.
— Model exposure is controlled in two layers: per-tool source whitelisting and per-source model selection, applied via commands like `magpie visible minimax-code --only-picked` and `magpie sync`.
— Misconfigurations can balloon the aggregate list: omitting the ZCode source and clearing model restrictions produced 58 models in MiniMax Code and 41 in WorkBuddy.
— A gateway request is sent with curl to `127.0.0.1:3425/v1/chat/completions`; the model must be identified as `source/model-id`, e.g., `workbuddy-ai/deepseek-v4.1-flash-sg`.
— The developer verified eight live calls (Qwen4-Max-Preview, Qwen3.8-Flash, DeepSeek-Flash, GLM-5.3-Flash for both Qoder and Qoder CN), all returning HTTP 200.
— Qoder's official docs confirm that DeepSeek-Flash in the selector corresponds to DeepSeek-V4.1-Flash-1017, based on vendor naming rather than model self-reporting.
— Config file locations differ per tool: `~/.workbuddy/models.json` and `~/.workbuddy-ai/models.json` are separate files and should not be conflated.
— WorkBuddy and WorkBuddy AI use Magpie-maintained OAuth login states, not desktop login files, so their desktop apps are generally safe to uninstall; Qoder's check-in still needs the vendor's runtime-info helper.
— Magpie's auto-check-in returns `+100 · already` when a day has already been claimed; `already` does not mean the command adds another 100 points.
— ZCode weekend gift quotas require client-side CAPTCHA validation, so Magpie auto-claim returns `outcome: "captcha"` and the claim must happen in the ZCode client.
— App-level requests carry hidden overhead: a single UI verification message in WorkBuddy produced 31,281 input tokens across 2 requests, and MiniMax Code produced 40,729 across 3 requests.
— Escape hatch: `magpie qoder-cn default` restores a tool's native model configuration and removes Magpie's management without uninstalling the IDE or deleting chat history.
Conclusions

Treating multiple AI coding tools as interchangeable apps misses the point: the thing worth consolidating is model access, not the tool UI. The author's persistence in keeping the gateway despite setup friction shows that quota access matters more than the app itself.

A local gateway's model catalog can go stale between CLI and desktop processes because each keeps its own in-memory snapshot. The observed mismatch between the UI and the running API is a realistic reminder that gateway updates require process awareness, not just file writes.

The heaviest cost of AI coding may not be the inference itself but the per-app context: a two-request verification message consumed 31K input tokens, while a terminal request with a similar purpose used a dozen. The user, not the model, is responsible for understanding this app overhead.

Free event quotas have a materially higher operational cost than paid subscriptions: they require learning vendor rules, catching validity windows, and handling client-side CAPTCHAs. The difference between 'program supports claiming' and 'the account has claimed it' is a distinction most developers can afford to ignore only when paying for usage.

Auto-check-in and gifting systems that work sum to a non-zero amount of maintenance. The author repeatedly notes whether things are verified, which is the practical stance: the plane is repaired, but the flight log is not yet approved.

Concepts & terms
AI gateway
A local or remote service that sits between AI clients (e.g., coding agents) and model providers. Requests from a tool go to the gateway, which routes them to the selected provider and returns the response. Magpie is an example of a local AI gateway that also manages per-tool model configuration.
Model pool (模型池)
An aggregated list of models that a gateway exposes from multiple providers with possibly different subscription accounts. It consolidates the models the user can call, but does not merge quota balances, chat histories, index stores, or project copies.
Model source (Provider)
In Magpie terms, a model source is an account or API endpoint that provides model calls, such as WorkBuddy, WorkBuddy AI, Qoder CN, or ZCode. A source may also act as an agent (tool) that consumes models from other sources, so the same name can appear on both sides of the configuration.
Agent
In Magpie's configuration, an agent is a coding tool or script that the user works with, like MiniMax Code or WorkBuddy. The agent receives Magpie's list of available models and can select from them, with the gateway writing the corresponding model config into the tool's settings file.
--only-picked
A Magpie CLI flag that restricts the model list shown to a tool to only the models explicitly selected (picked) by the user, preventing other models or new entries from automatically appearing in the tool's model selector.
Check-in (签到)
A daily or periodic action in some AI service accounts that grants free points, usually via a button in the app or an API via a gateway. A status of `already` in Magpie means the account has already been checked in for that day, not that an additional check-in was awarded.
Gift plan (赠送套餐 / 活动赠送)
A promotional quota that some providers grant to accounts, often tied to specific models and a limited validity window (e.g., 'effective 23:00, expires 09:00'). In ZCode's case, valid gift plans appear as `<model>-Trial` entries in the catalog, and selecting them restricts usage to the gift quota, falling back to a paid plan only when the model is not explicitly chosen.
Reuse desktop login state
An option in Magpie's login flow that attempts to use the same credentials as the original desktop app. For WorkBuddy 5.6+, this fails because the app encrypts credentials, so browser-based login is required instead.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗