Magpie 一键导入 TeamoRouter:Base URL、API Key 和模型怎么配
Magpie 是一款开源桌面应用,支持 macOS、Windows、Linux:在一个列表里给每个编程 Agent(Claude Code、Codex、OpenCode、Gemini CLI 等)选模型,统一走一个本地网关。把 TeamoRouter 加进 Magpie 一次,它管理的所有 Agent 都能用你 TeamoRouter Key 下的模型。
1. 一键导入
- 点上面的按钮,会打开 Magpie(需要 0.1.8 或更新版本);没装 Magpie 的话,页面会给出下载入口。
- Magpie 会先列出要添加的内容:提供商 TeamoRouter、请求发往
api.teamorouter.com。你点「Add」之前什么都不会保存。 - 链接里不带 API Key。Magpie 要 Key 时,粘贴你在 TeamoRouter 控制台 创建的 Key。
- Magpie 会向 TeamoRouter 拉取可用模型列表。在 Magpie 的 Agents 页给每个 Agent 选模型即可。
链接会自动填好:
| 项目 | 值 |
|---|---|
| OpenAI 兼容 Base URL | https://api.teamorouter.com/v1 |
| Anthropic Base URL | https://api.teamorouter.com |
| Gemini Base URL | https://api.teamorouter.com/v1beta |
2. 用命令行添加
习惯用 Magpie 命令行的话,带上你的 Key 添加同一个提供商:
magpie provider add TeamoRouter url=https://api.teamorouter.com/v1 anthropic=https://api.teamorouter.com key=sk-teamo-your-key
magpie provider test teamorouter
magpie provider test 会对每种 API 发一个很小的请求并显示延迟。然后给 Agent 指定 TeamoRouter 的模型,比如 Claude Code 用 magpie claude teamorouter/claude-sonnet-5-5。模型 ID 见模型列表。
3. 安装 Magpie
从 usemagpie.ai 下载 macOS、Windows 或 Linux 版,打开后再点上面的按钮。导入链接需要 Magpie 0.1.8 或更新版本。