同步 OpenBot 配置时漏写 inputs 和 reasoningEfforts,导致无法传图和选择思考等级
magpie version
0.1.4654
Where
GUI
OS
macOS 26
Agent, provider and model
No response
Steps to reproduce
- 在 macOS 上使用 magpie
v0.1.4654连接并同步模型到 OpenBot(写入~/Library/Application Support/OpenBot/openbot-custom-providers-v1.json)。 - 打开 OpenBot,在
magpie供应商下选择任意支持多模态和思考等级的模型(如 Claude / GPT / Gemini / DeepSeek 等)。 - 尝试在对话里上传图片/PDF,或切换思考等级(reasoning effort)。
- 对照查看本地接口
http://127.0.0.1:3425/agent/openbot/v1/models与openbot-custom-providers-v1.json中magpie段的模型定义。
What happened, and what you expected
实际结果:
OpenBot 中所有经 magpie 同步的模型都无法上传图片/PDF,也不显示思考等级选项。检查 openbot-custom-providers-v1.json 发现,magpie 写入每个模型时只包含了 id、name、contextWindow,漏掉了 inputs 和 reasoningEfforts(以及可选的 maxOutput),而 magpie 自己的 /agent/openbot/v1/models 接口实际上已经返回了完整的 modalities.input 和 reasoning_levels。
期望结果: magpie 同步 OpenBot 配置时,应把网关里的能力字段一并写入每个模型条目:
inputs:["image", "pdf"]的有序子集(纯文本模型可省略或写[])reasoningEfforts:["none", "minimal", "low", "medium", "high", "xhigh", "max"]的有序子集(无思考等级可省略或写[];需过滤掉 OpenBot 不认的值如"ultra",并严格保持该顺序,否则 OpenBot 校验会失败)maxOutput(可选):范围256~1000000的整数
手动按 /agent/openbot/v1/models 补齐上述字段并重启 OpenBot 后,传图和思考等级均已恢复正常;希望 magpie 原生写入,避免下次同步被覆盖。
Error text or logs
Prepared a fix on fork branch fix/7439-openbot-model-capabilities (1d1330ce, based on f0b58041):
inputs: writes an ordered subset of["image", "pdf"](imagefollowsm.Imagesincluding Vision's stand-in;pdffollowsInputModalities), writes explicit[]for known text-only models so OpenCode writesmodalities: {input: ["text"], output: ["text"]}instead of defaulting image input on, and omitsinputsonly when input modalities are unknown.reasoningEfforts: normalizes, deduplicates, filters unsupported words (ultra,light,persistent, etc.), and orders into["none", "minimal", "low", "medium", "high", "xhigh", "max"]; writes explicit[](variants: {}) for non-reasoning/reasonless/unsupported-level models, and omits it only for toggle-only reasoning models (Reasoning && len(Efforts) == 0).maxOutput: emitsmaxOutputwhencontextWindowis written and256 <= output <= 1_000_000withoutput < contextWindow.- Updated
docs/subsystems/agent-wiring.mdand added unit/integration coverage ininternal/agent/openbot_test.go(go test -race -count=1 ./internal/agent -run 'TestOpenBot',TestEvery|TestFolder|TestDocs, and darwin/linux-nogui/windowsgo vetall pass).
Fixed in v0.1.5212 (97cc6b916).
magpie now writes each model's inputs, reasoningEfforts and maxOutput into openbot-custom-providers-v1.json, in the form OpenBot (v0.74.0+) accepts:
inputs:imagewhen the model takes images (or magpie's Vision describes them for it),pdfwhen its source lists pdf. A known text-only model gets[].reasoningEfforts: the model's levels that OpenBot names (lightis written aslow,extra_highasxhigh). A model that doesn't think gets[]. A model that thinks without named levels leaves the field out, so OpenBot offers low/medium/high.maxOutput: written only when it is below the context window.
A value you wrote by hand on one of magpie's models stays through every sync, including one written before this version. It is replaced only when you set the same thing for that model in magpie (Max output, Images, or its reasoning levels).
OpenBot reads the file only when it starts, so restart OpenBot after updating magpie.
Ported from @eisen0419's branch, credited in the commit. Leaving this open until someone confirms it works in OpenBot.