# AI use cases for Magpie (yetone/magpie)

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Use cases: 4 | Page: https://dedupedai.com/use-cases/yetone-magpie/

magpie is a local gateway and menu bar app that lets agents like Claude Code, Codex and Gemini CLI use models from many providers and subscriptions, with routing and failover.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Run Claude Code on DeepSeek instead of Claude: https://dedupedai.com/use-cases/yetone-magpie/run-claude-code-on-deepseek/
- Keep an agent working when one quota runs out: https://dedupedai.com/use-cases/yetone-magpie/fail-over-between-subscriptions/
- See what is left on every AI plan in one command: https://dedupedai.com/use-cases/yetone-magpie/check-quota-across-every-plan/
- Send any OpenAI or Anthropic tool through the Magpie gateway: https://dedupedai.com/use-cases/yetone-magpie/send-any-tool-through-local-gateway/

## How to run Claude Code on DeepSeek instead of Claude with Magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Point Claude Code at a DeepSeek model through Magpie with one provider key and one command.

**Who it is for:** A developer who uses Claude Code daily and wants to try or pay for a different model without changing the agent.

**The problem:** Each agent keeps its model setting in its own file with its own keys, so switching providers means editing config by hand.

**The outcome:** Claude Code answers from DeepSeek through the Magpie gateway, and the agent's own config only changes its model key.

### Steps

1. Install Magpie with `curl -fsSL https://usemagpie.ai/install.sh | sh`, or download the app from usemagpie.ai.
2. Add your DeepSeek key with `magpie provider add deepseek sk-…`, replacing the placeholder with your own key.
3. Set Claude Code to DeepSeek with `magpie claude deepseek/deepseek-v4-pro`.
4. Start a new Claude Code session, which runs on the new model.

### Prompt to paste into your agent

```text
Using the yetone/magpie repository, install magpie, add the provider <provider-name> with the API key <api-key>, and run `magpie claude <provider-name>/<model-name>`. Report the output of the command and confirm that a new Claude Code session answers from that model.
```

### Caveat

Magpie edits only the model key in the agent's config, so the agent must already read its model from that file for the change to take effect.

Risk, credentials: The provider API key you paste into Magpie grants access to that provider's account, so use a key you are allowed to use and rotate it if it leaks.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/run-claude-code-on-deepseek/

## How to keep an agent working when one quota runs out with Magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Advanced | Time: 45 minutes | Basis: From the README

Group two models from different subscriptions so the agent moves to the other one when a quota runs out.

**Who it is for:** A developer with two or more subscriptions, such as Claude and GitHub Copilot, who hits quota limits in the middle of work.

**The problem:** When one account's quota runs out, the agent stops, and the user has to change models by hand and restart.

**The outcome:** Claude Code uses one routing group name, and the gateway moves between accounts without the agent seeing an error.

### Steps

1. Install Magpie and sign in to each subscription you want in the group from the Providers page.
2. Create the group with `magpie group add "Opus anywhere" models=claude/claude-opus-5-5,copilot/claude-opus-5.5 routing=smart`.
3. Point Claude Code at the group with `magpie claude group/opus-anywhere`.
4. Open the Routing view to see which member each request went to.

### Prompt to paste into your agent

```text
Using the yetone/magpie repository, create a routing group named <group-name> with models=<provider/model>,<provider/model> and routing=smart, then run `magpie claude group/<group-slug>`. Report the group definition and confirm the Routing view shows a decision for one test request.
```

### Caveat

The README describes failover between subscriptions you sign in to, and the exact member names depend on which providers you have added.

Risk, account pooling: Spreading requests across several accounts may conflict with the terms of the subscriptions involved, so check each vendor's rules before pooling accounts.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/fail-over-between-subscriptions/

## How to see what is left on every AI plan in one command with Magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Beginner | Time: 15 minutes | Basis: From the README

Use Magpie quota to list remaining balances and quota windows for all keys and accounts.

**Who it is for:** A person paying for several AI plans and API keys who wants to know which one still has room before starting a big task.

**The problem:** Each provider has its own dashboard, so checking remaining quota means opening many websites.

**The outcome:** One terminal output shows the balances and quota windows for every key, plan and account Magpie knows about.

### Steps

1. Install Magpie with `curl -fsSL https://usemagpie.ai/install.sh | sh`.
2. Add your providers from the Providers page or with `magpie provider add deepseek sk-…`.
3. Run `magpie quota` to list what is left on every plan.
4. Run `magpie tui` if you prefer to browse the same information in a terminal interface.

### Prompt to paste into your agent

```text
Using the yetone/magpie repository, install magpie and run `magpie quota`. Report the remaining balance or quota window for each configured key and account, and flag any entry with no data.
```

### Caveat

The quota view only covers providers and accounts that Magpie has been given, so unlisted plans will not appear.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/check-quota-across-every-plan/

## How to send any OpenAI or Anthropic tool through the Magpie gateway with Magpie

Repo: [yetone/magpie](https://github.com/yetone/magpie) | Difficulty: Intermediate | Time: 30 minutes | Basis: From the README

Set three base URL variables so any tool that accepts a base URL uses the Magpie gateway.

**Who it is for:** A developer using a tool that is not in the supported agent list but accepts an OpenAI, Anthropic or Gemini base URL.

**The problem:** Tools without a Magpie setup page cannot pick models from Magpie, so each one needs its own provider configuration.

**The outcome:** The tool sends its requests to the local gateway at 127.0.0.1:3425 and Magpie handles the provider and routing.

### Steps

1. Start Magpie and confirm the gateway is running at 127.0.0.1:3425.
2. Set `export OPENAI_BASE_URL=http://127.0.0.1:3425/v1 OPENAI_API_KEY=magpie` in the shell where the tool runs. (inferred, check the README)
3. Set `export ANTHROPIC_BASE_URL=http://127.0.0.1:3425 ANTHROPIC_API_KEY=magpie` for Anthropic-style tools. (inferred, check the README)
4. Start the tool and send one request to confirm it appears in Magpie's usage view.

### Prompt to paste into your agent

```text
Using the yetone/magpie repository, confirm the gateway is listening on 127.0.0.1:3425, export OPENAI_BASE_URL=http://127.0.0.1:3425/v1 and OPENAI_API_KEY=magpie, and run <tool-command>. Report whether the tool returns an answer and whether the request appears in magpie's usage data.
```

### Caveat

The README says the gateway speaks these API formats, so tools that need a different protocol will not work through it.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/yetone-magpie/send-any-tool-through-local-gateway/
