You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
constmodelInfo=awaitctx.llm.resolveModelInfo(current.provider,current.model);if(modelInfo.inputModalities!==void0&&!modelInfo.inputModalities.includes("image"))returnerr(request,{code: "attachment-error",message: `Model "${current.model}" does not support image input.`, ... });
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
摘要
@deepseek-ai/dsh-llm-deepseek(所有 OpenAI 兼容网关的默认适配器路径)的modelInfo()对目录中的每一个模型(无论是否视觉模型)都返回硬编码的inputModalities: ["text"](lib/index.jsL442)。图片受理门控(dsh-host-apiproxysession.promptL2842-2848)据此判定"模型不支持图片"并拒绝:Model "X" does not support image input.。因此通过该适配器接入的第三方视觉模型(claude/gpt/qwen 系列经兼容网关)永远无法粘贴图片,即使模型本身支持多模态——这是 #245 的完整根因(用户已选多模态模型仍被拒)。模型目录 schema(id/name/description/contextWindow/maxTokens)与 Web 设置 UI 都不存在input/模态字段,用户没有任何 UI 途径声明视觉能力;评论区给出的input: ['text','image']YAML workaround 只对读取该字段的适配器(如 pi-ai)生效,对 deepseek 适配器无效(源码确认其 modelInfo 忽略目录 input 字段)。复现步骤
llm-deepseek.baseURL指向第三方网关)配置一个支持视觉的模型(如 qwen-vl/claude 经网关)。Model "<model>" does not support image input.(图片粘贴之后,选择了支持多模态的llm,但是还是提示 模型不支持图片 #245 原文),图片被受理门控拒绝——尽管模型实际支持图片。input字段的适配器(pi-ai 族),目录里声明input: ['text','image']后可通过——证明断点在 deepseek 适配器的硬编码。根因(源码定位,rc.6)
dsh-llm-deepseek/lib/index.jsmodelInfo()(L436-444):resolveModel()(L505-526)对已配置模型返回modelInfo(provider, configured)——目录里即使写了
input: [...]也被忽略(schemacatalogModelL642-648 只有id/name/description/contextWindow/maxTokens,无 input 字段)。
dsh-host-apiproxy/lib/index.js图片受理门控(L2838-2848):deepseek 目录 schema 均无模态字段,用户无法通过 UI 声明视觉能力;错误文案
也没有任何"如何声明图片支持"的指引。
建议修复
方案 A(推荐)· 目录支持
input字段并贯通:catalogModelschema 增加input: z.array(z.string())(可选);modelInfo()改为resolveModel的未配置分支保持["text"]。Web 设置 UI 的模型编辑表单增加"输入模态"多选(text/image)。一处 schema + 一处 adapter + 一处表单,第三方
视觉模型即可在 UI 内声明并通过受理门控。
方案 B · 门控对"未声明模态"放行:
inputModalities === undefined时不再拒绝(当前逻辑 undefined 已放行;但 deepseek 返回的是
["text"]而非 undefined)。若适配器统一"未声明即 undefined",门控自动只拒绝显式声明无图片的模型。
与 A 二选一或叠加。
方案 C(文案):拒绝消息附修复指引:"若该模型支持图片,请在模型配置中声明
input 模态(当前适配器不支持此字段的需升级/换适配器)"。
影响
(图片粘贴之后,选择了支持多模态的llm,但是还是提示 模型不支持图片 #245;claude/gpt/qwen 视觉模型经自建网关均中招)
本例是适配器把支持视觉的模型谎报为纯文本——修复后多模态模型可用
环境
dsh-llm-deepseek/lib/index.jsL436-444/L642-648、dsh-host-apiproxy/lib/index.jsL2838-2848;Node v24.16.0,Windows 11)验证材料
L642-648 的 schema 缺 input、L2842-2848 的门控判定
First source-located analysis of discussion #245. Happy to open a PR with fix option A.
All reactions