Removes the model-capability gate that blocks image prompts: patches llm.resolveModelInfo results and adapter model tables to declare image input, so routes with no declared input modality can send and read images. No app.asar or config-tree edits.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:wmk66ds/dsh-vision-unlock
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
去掉 DeepSeek Harness(DSH)「当前模型不支持图片」的拒绝限制,让未声明多模态能力的模型也能发送和读取图片。
不修改 app.asar 里任何一行代码,也不改配置树——纯运行时接缝,随 DSH 升级继续可用。
为什么会被拒绝
DSH 判定一条路由能否吃图片,依据两处能力声明:
LlmModelInfo.inputModalities(可选字段)。缺这个字段,或数组里没有"image", 就被当成纯文本模型。这是所有门禁的唯一判定来源:位置 表现 会话控制器 prompt()发送时弹「当前模型不支持图片,请切换支持图片的模型」 子代理 assertImageCapable向子代理发图被拒 read_file读图does not declare image inputMCP / ACP 图片注入 同上 适配器自己持有的模型表(不经过上面那处)。pi-ai 在发请求前查
model.input.includes("image");deepseek 适配器序列化前查connection.models[].inputModalities。
典型触发场景:自定义/本地网关路由(如 Agent2API、自建 OpenAI 兼容网关)在配置里只写了
id / name / contextWindow / maxTokens,没写 input,于是落到默认值 ["text"],
被判定为不支持图片——哪怕上游模型其实支持。
本插件怎么做
只用两个运行时接缝:
- 包装
llm.resolveModelInfo,给结果补上"image"→ 拆掉上表中所有门禁。 - 遍历
llm.adapters,把适配器模型表里的input/inputModalities补上"image"→ 拆掉 pi-ai 的自检。适配器换快照(配置热更新)时自动重做。
安装
方式 A:用 plugin_manager 安装(推荐)
在 DSH 里让 agent 执行:
plugin_manager action: install_bundle target: github:wmk66ds/dsh-vision-unlock
或在 Web UI 的 设置 → 插件 面板里,把上面这串填进安装框。
target 也可以写完整 URL,两种等价:
| 写法 | 说明 |
|---|---|
github:wmk66ds/dsh-vision-unlock |
GitHub 简写,推荐 |
https://github.com/wmk66ds/dsh-vision-unlock |
完整 git URL |
锁定版本用 # 加 ref:
github:wmk66ds/dsh-vision-unlock#v1.0.0
若本机访问 GitHub 不畅,DSH 走的是它自己的网络栈;必要时先确认你的代理环境 能被 DSH 进程继承(例如 Clash Verge 的 TUN / 系统代理)。
方式 B:手动安装(CLI 或插件管理不可用时的降级方案)
把本仓库放到一个稳定的路径,例如
D:\workbench\dsh-vision-unlock。在你的 profile 目录(默认
~/.dsh/profiles/desktop/)的node_modules下建立指向它的链接:cmd /c "mklink /J `"%USERPROFILE%\.dsh\profiles\desktop\node_modules\dsh-vision-unlock`" `"D:\workbench\dsh-vision-unlock`""编辑该 profile 的
package.json,在dsh.profile.bundles数组加入"dsh-vision-unlock", 并在dependencies加入"dsh-vision-unlock": "link:D:/workbench/dsh-vision-unlock"。重启 DSH。
Windows 上用 junction(
mklink /J)而不是符号链接——后者需要管理员权限。 注意 desktop profile 由 Electron 应用独占管理,dsh plugin --profile desktop会拒绝执行,所以才有这里的手动步骤。
配置
cordis.patch.yml 里的 config:
- insert:
- id: vision-unlock
name: 'dsh-vision-unlock'
config:
providers: [] # 留空 = 所有 provider;否则只放行列出的
models: [] # 留空 = 所有模型;否则只放行列出的
两个白名单都为空时全部放行;非空时需同时命中才放行。
已知边界
- deepseek 适配器的模型表来自它自己的 plugin config,不经由
llm.adapters暴露, 本插件改不到。该路由如需图片,请在设置页给模型勾选 Image(等价于写inputModalities: [text, image])。 - 放行后图片真的会发出去。若上游实际不支持多模态,报错会从模型侧返回, 不再是 DSH 本地拒绝——这是预期行为,不是 bug。
卸载
从 profile 的 package.json 中删掉 dsh-vision-unlock(bundles 与 dependencies 两处),
删除 node_modules/dsh-vision-unlock,重启 DSH。
适用版本
针对 DSH 桌面版(含 dsh-llm / dsh-llm-pi-ai / dsh-api-session-controller)验证。
依赖的是 llm.resolveModelInfo 与 llm.adapters 这两个接口,若上游改动需要同步调整。
许可证
MIT
Links
More in this category
liustack/modlens★ 5123
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
ysr666/dsh-vision-router★ 1310
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.
Anionex/dsh-vision-toolkit★ 955
Vision for text-only models: paste an image and the model switches to a Vision Toolkit variant for image Q&A, multi-image comparison, long-screenshot OCR, screenshot-to-UI reproduction, element grounding, and pixel diff. No API key by default — images are processed by the author-hosted free service, 100 per machine per day; configurable to your own provider.
SAOS-3624/dsh-see-now★ 805
Lets a text-only agent watch a live screen or camera feed: every frame is scored by how much the picture changed, only the ones that matter are packed into one numbered sheet with an audio envelope, so the model looks at what actually changed instead of a screenshot every few seconds.
kingcharleslzy-ai/dsh-qwen-studio★ 730
Qwen Image 2.1 workspace for DSH: Apple Silicon MLX or your own NVIDIA server, native reference editing, LoRA, ControlNet, inpainting, shared presets, gallery and live agent progress. Includes verified updates and an agent setup guide.
SAOS-3624/dsh-video-storyboard★ 619
Turns a video (a local file, or a Bilibili/yt-dlp link) into one addressable storyboard grid — numbered cells with exact timestamps, per-cell transcript and an audio envelope on the same timeline — and video_zoom re-reads any window at higher resolution, so a text-only model can look at the video instead of reading a summary.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.