yepyeel/dsh-vision
Vision bridge for text-only models: describe attached images via another vision model or system OCR
This is a DeepSeek Harness (DSH) plugin. Review its GitHub README, installation information, maintenance status, and public security signals here.
dsh-vision
English | 中文
DeepSeek Harness 的 profile 组合包:为 不支持识图 的模型(DeepSeek V4 Flash、DeepSeek V4 Pro,以及任何 inputModalities 未声明 image 的路由)补上视觉能力。
当请求里带有图片附件、而当前目标模型不能看图时,插件会先描述每张图,再把图片块替换成这段文字发给该模型。会话日志和界面仍保留原始图片。
环境要求
- 已安装 DeepSeek Harness,且
dshCLI 在 PATH 中可用。 - 走识图模型描述时:需要至少一个已添加、且
inputModalities声明了image的模型。 - 走 OCR 兜底时:macOS(Vision 框架)与 Windows(Windows.Media.Ocr)无需额外配置;其他平台需要安装 Tesseract 并加入 PATH。
行为
- Auto(默认)——按已添加模型的注册顺序,选用第一个声明支持图片输入的模型。若没有任何识图模型可用,降级为 系统 OCR。
- 指定模型——只使用设置里选定的识图模型。失败时不做任何降级(不换模型,也不走 OCR)。
- Auto 且无识图模型——系统 OCR:
- macOS:Vision 框架
- Windows:Windows.Media.Ocr
- 其他平台:已安装的 Tesseract
描述按「附件 + 模型(或 OCR)」缓存在当前进程里,后续轮次不会重复付费调用。
设置
打开 设置 → 视觉识别:
- Auto:第一个可用识图模型,否则系统 OCR。
- 指定识图模型:从已添加且支持识图的模型里选一个。无降级。
同一份配置写在 $DSH_HOME/settings.yaml 的 dsh-vision: 段。
安装
在本目录执行:
dsh plugin --profile web add .
然后重启 dsh web,让新的组合包层和设置页加载。
卸载:
dsh plugin --profile web remove dsh-vision
原理
修复分两层:
- 声明能力:宿主行在启动时把当前文本模型的
inputModalities补上image(通过包装ctx.llm.resolveModelInfo)。这样session.prompt/session.selectModel的图片准入检查不再用「当前模型不支持图片,请切换支持图片的模型」拒绝带图消息,read_image工具也随之对文本模型可用。 - 改写:Host 行监听
llm/stream瀑布事件。需要转写时,插件构造一份新的请求(图片换成描述)再调用ctx.llm.stream。这次嵌套调用打向识图模型,拦截器会直接放行。Agent loop 冻结的请求不会被改写。
判断「是否原生支持识图」用的是包装前的原始解析器,因此原生识图模型不会被二次改写;仅对 inputModalities 显式声明为文本(或未声明)的模型补 image 能力。
限制
- 只有 声明了
image输入模态的模型会出现在候选里。网关实际能看图但未声明时,不会被选中。 - 指定模式失败即失败:模型不存在、不支持识图、或调用报错,都不会改用其他路径。
- 系统 OCR 只抽取文字,不是场景描述。
- 设置 RPC 与其他配置面一样,仅 loopback 可用。
- 声明
image能力后,含图会话也可以切回文本模型;历史图片会在下一轮llm/stream时被转写。
许可证
Security & install evidence
This score is based solely on public repository metadata and the install evidence registered here — it is not a code security audit.
From a public plugin catalog, linked to a public GitHub repository.
The repository declares the MIT license.
Code updates within the last 180 days.
No verifiable install metadata registered yet — please review the repository instructions manually.
The inspected package metadata declares no install lifecycle scripts.