文档 · 指南
让 Mister Morph 用任意模型
Mister Morph(morph 命令)把设置放在 ~/.morph/config.yaml,或 MISTER_MORPH_CONFIG 指定的文件:主模型在 llm.model,向 llm.inference_provider 指定的厂商、用 llm.api_key 在 llm.endpoint 请求。它没有可以添加供应商的列表,所以 magpie 直接接管 llm 这几项,Mister Morph 就能用 DeepSeek、GLM、Kimi、Qwen、Claude 或 ChatGPT 订阅等 magpie 里的任意模型。
接入 Mister Morph
- 在 magpie 里添加供应商在 供应商 页添加 API Key,或登录一个订阅。
- 在 Agent 页给 Mister Morph 选模型选一个 via magpie 的模型,需要的话再选思考强度。magpie 通过
~/.morph文件夹认出它,不看morph命令,因为别的工具也叫这个名字;这个文件夹在第一次运行、morph install或桌面应用的设置时创建。 - 开始新任务Mister Morph 的 Console 新任务直接用新模型;打开着的 morph 对话要重启。
magpie morph deepseek/deepseek-v4-pro
config.yaml
magpie 写入 llm 下面这几项:inference_provider 设成 openai_response_compatible,也就是 Mister Morph 默认用的 OpenAI Responses 接口,网关对每个厂商都支持;endpoint 是网关的 /v1(地址已经以 /v1 结尾时,Mister Morph 不会再加一个);api_key 是 magpie 的 Key;model 是目录里的模型 ID。在 Mister Morph 里,这个模型显示为 magpie/deepseek/deepseek-v4-pro。magpie 还在 llm.headers 里把 User-Agent 设成 mistermorph,否则请求带的是 OpenAI SDK 的 User-Agent,分不出来自哪里。
# ~/.morph/config.yaml (or $MISTER_MORPH_CONFIG) llm: inference_provider: openai_response_compatible endpoint: http://127.0.0.1:3425/v1 api_key:model: deepseek/deepseek-v4-pro context_window_tokens: … headers: User-Agent: mistermorph reasoning_effort: high
llm.provider 不动,Mister Morph 会从 inference_provider 推出它。在 WSL 里装的 Mister Morph 也一样接入,只是那里不读 MISTER_MORPH_CONFIG,用的是 ~/.morph/config.yaml。
上下文长度
Mister Morph 只从自带的列表里知道模型的上下文长度,按 ID 最后一个斜杠后面的部分查。所以 magpie 把它知道的上下文长度写进 llm.context_window_tokens;magpie 也不知道时就删掉这一项。
思考强度
思考强度写在 llm.reasoning_effort,可选 none、minimal、low、medium、high、xhigh 和 max;不设时 Mister Morph 不发送思考强度。
magpie morph effort high
profiles 和 routes
llm.profiles 和 llm.routes 是你的,magpie 不碰。如果某条 route 把主循环发到另一个 profile,它照样生效。
切回
magpie 第一次接管前会记下你在 llm 下这几项原来的值。切回时把它们放回去,原来没有的就删掉;User-Agent 是 llm.headers 里唯一一项时,整个 headers 也删掉。选 Mister Morph 自己的模型时也是先恢复,再把 llm.model 设成你选的模型。
magpie morph default
常见问题
Mister Morph 能用 DeepSeek、GLM 或 ChatGPT 订阅吗?
能。在 magpie 的 Agent 页给 Mister Morph 选一个 via magpie 的模型,magpie 会改好 config.yaml 里 llm 的几项。
Mister Morph 走的是哪个接口?
OpenAI Responses 接口(openai_response_compatible),这是 Mister Morph 的默认,magpie 网关对每个厂商都支持。
为什么 magpie 要写 context_window_tokens?
Mister Morph 只从自带的列表里查上下文长度,查不到 magpie 的模型 ID,所以 magpie 把已知的长度直接写给它。
我的 llm.profiles 和 llm.routes 会被改吗?
不会。它们是你的,magpie 只改 llm 下的那几项,切回时还原。
更多 Agent 用同样的模型:让 Grok App 用任意模型、让 fx 用任意模型、让 Aside 用任意模型、让 mu 用任意模型。遇到报错?见 常见错误排查,或到 Discord 提问。