文档 · 指南

让 AionUi 用任意模型

AionUi 是一个 Electron 桌面应用,能运行 Claude Code、Codex、Gemini CLI,也有自己的对话。它的模型供应商存在自己的数据库里,Key 是加密的,所以 magpie 不往里写任何东西,而是用 AionUi 自己的“添加供应商”链接打开它的添加模型表单,填好 magpie,由你在 AionUi 里确认。之后 AionUi 就能用 magpie 里的每个模型:DeepSeek、GLM、Kimi、Qwen、OpenAI 或 Anthropic Key,以及你登录的 Claude、ChatGPT、Copilot 订阅。

把 magpie 加进 AionUi

  1. 先打开一次 AionUiAionUi 运行过之后,它的数据目录里有了 aionui 文件夹,magpie 的 Agent 页才会列出它。
  2. 在 magpie 里添加供应商在 供应商 页添加 API Key,或登录一个订阅。
  3. 点「添加 magpie」在 AionUi 那一行点 添加 magpie。AionUi 会打开 设置 → 模型 的添加表单,已填好 magpie:名称 magpie、平台 custom(OpenAI 兼容)、网关地址和 Key。
  4. 在 AionUi 里确认确认之前什么都不会添加。

magpie 打开的链接是这样的:

终端

如果什么都没打开,说明这台电脑上还没有程序能处理 AionUi 的链接:先打开一次 AionUi 或重新安装,再点 添加 magpie。

选择模型

magpie 供应商的地址以 /v1 结尾,和 AionUi 自带的 OpenAI 预设一样,它从网关获取 magpie 里的全部模型,名称是 供应商/模型(例如 deepseek/deepseek-v4-pro)。之后在 magpie 里新增的供应商,AionUi 重新获取模型列表就能看到,AionUi 这边无需改动。一个模型背后的多个账号、429 后的休息时间和故障转移,都和其他 Agent 一样生效。

命令行

终端
magpie aionui add      # 打开 AionUi 添加 magpie,在其中确认

magpie 怎么知道已添加

magpie 以只读方式读取 AionUi 的数据库(aionui/aionui-backend.db,在 AionUi 的数据目录下:macOS 的 ~/Library/Application Support/AionUi、Windows 的 %APPDATA%\AionUi、Linux 的 ~/.config/AionUi),看里面有没有指向网关地址的供应商。AionUi 开着也能读,magpie 从不写它。有了之后这一行显示已添加,需要时也可以再点一次重新添加。读不了数据库时,magpie 不会说没添加,而是说不知道。

用量与 Key

链接里的 Key 是 AionUi 专用的,所以它的请求在 magpie 的用量里单独记为 AionUi,和其他 Agent 分开。

常见问题

在 AionUi 里用 Claude 或 ChatGPT 需要 API Key 吗?

不需要。在 magpie 里登录 Claude、ChatGPT 或 Copilot 订阅,它的模型就会出现在 AionUi 的 magpie 供应商里。

magpie 会改 AionUi 的设置吗?

不会。magpie 打开的是 AionUi 自己的添加模型表单,由你确认。它只读取 AionUi 的数据库,用来显示是否已添加。

magpie 供应商用什么地址和平台?

平台 custom(OpenAI 兼容),地址 http://127.0.0.1:3425/v1,或你在 magpie 里设置的网关地址。

magpie 的 Agent 页里没有 AionUi。

AionUi 在这台电脑上运行过之后 magpie 才会列出它。先打开一次 AionUi,再回来看。

更多桌面应用用同样的模型:通过 magpie 在 Cherry Studio 里用所有模型、让 AstrBot 用任意模型。也在用编程 Agent?见 在任意 Agent 中使用订阅。遇到报错?见 常见错误排查,或到 Discord 提问。