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.
Who it is forA developer who uses Claude Code daily and wants to try or pay for a different model without changing the agent.
The problemEach agent keeps its model setting in its own file with its own keys, so switching providers means editing config by hand.
The outcomeClaude Code answers from DeepSeek through the Magpie gateway, and the agent's own config only changes its model key.
What you need first
- A computer running macOS, Windows or Linux (or Docker or Termux)
- An API key for a provider such as DeepSeek, or a signed-in subscription such as Claude or ChatGPT
- The agent you want to route, such as Claude Code or Codex, already installed
Steps
- Install Magpie with
curl -fsSL https://usemagpie.ai/install.sh | sh, or download the app from usemagpie.ai. - Add your DeepSeek key with
magpie provider add deepseek sk-…, replacing the placeholder with your own key. - Set Claude Code to DeepSeek with
magpie claude deepseek/deepseek-v4-pro. - Start a new Claude Code session, which runs on the new model.
Prompt for your agent
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.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for yetone/magpie and "Run Claude Code on DeepSeek instead of Claude"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer