文档 · 指南
让 Mistral Vibe 用任意模型
Mistral Vibe 是 Mistral 的开源编程 Agent,命令是 vibe。它的设置在 $VIBE_HOME(没设置时是 ~/.vibe)里的 config.toml。magpie 在里面加一个 magpie 供应商和 magpie 目录里的每个模型,Vibe 的 /model 选择器里就有了 DeepSeek、GLM、Kimi、Qwen、Claude 或 ChatGPT 订阅等 magpie 里的模型。想在别的 Agent 里用 Mistral 自己的模型,见 Mistral 接入 Claude Code、Codex、Gemini CLI 和 OpenCode。
接入 Mistral Vibe
- 在 magpie 里添加供应商在 供应商 页添加 API Key,或登录一个订阅。
- 在 Agent 页给 Mistral Vibe 选模型选一个 via magpie 的模型,magpie 把 Vibe 的 active_model 指向它。
- 重启打开着的 vibe 会话Vibe 只在启动时读取设置。之后也可以在 Vibe 的 /model 里换成别的 magpie 模型。
config.toml
magpie 写入一个 [[providers]] 条目,把网关的 /v1 当作 OpenAI chat completions 用,再为目录里的每个模型写一个 [[models]] 条目。模型的别名是 magpie/<供应商>/<模型>,这就是 /model 里显示的名字,也是 active_model 里存的值:
# ~/.vibe/config.toml
active_model = "magpie/deepseek/deepseek-v4-pro"
[[providers]]
name = "magpie"
api_base = "http://127.0.0.1:3425/v1"
api_style = "openai"
backend = "generic"
extra_headers = { Authorization = "Bearer " }
[[models]]
name = "deepseek/deepseek-v4-pro"
provider = "magpie"
alias = "magpie/deepseek/deepseek-v4-pro"
thinking_levels = ["off", …]
supports_images = …
max_context_length = … Key 放在哪里
Vibe 只从 api_key_env_var 指定的环境变量(或系统钥匙串)读供应商的 Key,从不从 config.toml 读。没有 Key 的供应商会原样发送 extra_headers,所以 magpie 把 Vibe 的 Key 作为 Authorization 头放在那里。magpie 不往你的环境变量或 ~/.vibe/.env 里写任何东西。Vibe 的请求带着 Mistral-Vibe/<版本> 的 User-Agent,网关能认出它。
模型和思考强度
有思考强度的模型,thinking_levels 列出 off 和它支持的各档;没有的只列 off。你在 Vibe 里给 magpie 某个模型选的思考强度,只要模型还支持就保持不变。magpie 不知道上下文大小的模型写 128K,否则 Vibe 会用默认窗口并给出警告。
你的设置保持不变
文件里其他的键和条目都是你的,保持原样。magpie 只在模型有变化时才重写自己的条目。命令名同样是 vibe 的 Avibe 不会被当成 Mistral Vibe。Vibe 的技能和 AGENTS.md 在 ~/.vibe/skills 和 ~/.vibe/AGENTS.md,由 magpie 的资源库管理。
切回
magpie 第一次接管时会记下 active_model 原来的值。在 magpie 里给 Vibe 选它自己的模型,或者关掉 Vibe 时,magpie 把 active_model 恢复成原来的值(或你选的模型),并删掉 magpie 的供应商和模型条目。
常见问题
Mistral Vibe 能用 DeepSeek 或 Claude 吗?
能。magpie 在 config.toml 里加一个 magpie 供应商和模型,在 Vibe 的 /model 里选 magpie/ 开头的模型即可。
magpie 的 Key 写在哪里?
Vibe 不从 config.toml 读 Key,所以 magpie 把 Key 作为 Authorization 头放在 extra_headers 里,不写环境变量。
为什么 Vibe 还在用原来的模型?
Vibe 只在启动时读取设置。重启打开着的 vibe 会话。
切回后原来的模型还在吗?
在。magpie 记下了 active_model 原来的值,切回时恢复它。
更多 Agent 用同样的模型:让 Avibe 用任意模型、让 Pencil 用任意模型、让 WorkBuddy 用任意模型、让 OpenMausBot 用任意模型。遇到报错?见 常见错误排查,或到 Discord 提问。