rison114514/dsh-image-understanding
rison114514★ 0JavaScriptLast synced: 2026-08-16
deepseek-harness 原生插件:让纯文本模型(如 DeepSeek)经 agent/pre-step 劫持 + resolveModelInfo 包装自动识别上传图片(qwen-vl)
README excerpt
dsh-image-understanding 让 deepseek-harness (dsh) 里的纯文本模型(如 DeepSeek)也能"看见"你上传的 图片 —— 自动调用阿里云百炼 qwen-vl 把图片转成文字描述再喂给模型,全程对模型透明,无需切换多模态模型。 配套说明:本插件是 deepseek-vision(WorkBuddy 钩子版)在 deepseek-harness 上的 原生插件重写版 。两者核心差别见文末「与 deepseek-vision 的差别」。 原理(两道闸都堵上) deepseek-harness 对纯文本模型有 两道 图片拦截: 1. Gate 1 — 提交校验 : apiproxy 在消息含图时查模型 inputModalities ,DeepSeek 是 ['text'] ,直接报错"当前模型不支持图片"。 2. Gate 2 — 序列化校验 : serialize.ts 的 assertTextOnly 对 image block 无条件拒绝。 本插件在 插件层 同时解决,不碰 harness 源码: - 包装 ctx.llm.resolveModelInfo ,让 deepseek 系纯文本模型"声称"支持 image,骗过 Gate 1; - 在 agent/pre-step seam(serialize 之前)把 ImageBlock 经 attachments.readImage() 取字节 → 百炼 qwen-vl 识别 → 替换为 【图片识别】… 文本块,DeepSeek 全程只见纯文本(Gate 2); - 仅模拟 deepseek 系纯文本模型;真·视觉模型原样透传,不被二次转换。 另外注册了一个显式 tool image understanding ,可手动按图片路径或 data URL 调用。 前置条件 - 已本地安装并构建 deepseek-harness(能跑 pnpm dsh web ) - 一个阿里云百炼 API Key(OpenAI 兼容模式,申请:https://bailian.console.aliyun.com/ ) 安装 装好后启动 web: dsh web (或 pnpm dsh web )。 使用 开 新会话 → 选择 DeepSeek 主模型 → 直接拖入 / 上传图片并输入"描述这张图" → 预期: - 不再弹出"当前模型不支持图片" - 图片被 qwen-vl 自动识别为文字描述并回填,DeepSeek 据此作答 也可在对话中显式调用 image understanding 工具,传入图片 本地绝对路径 (或 data URL)做按需识别。 配置项(Web UI:设置 → 插件 → 插件配置 → image-understanding) 启动后在网页端「设置」→「插件…
View full README on GitHub →Category
The first vision plugin for DeepSeek Harness, and the vision bridge for every text-only coding agent. Paste an image, get structured JSON evidence (OCR, layout, semantics). | 全网最强 DeepSeek Harness 外挂视觉插件,为 DeepSeek、GLM 等纯文本模型外挂视觉能力,粘贴图片即得结构化 JSON 证据(OCR、版面、语义)。
★ 2,346
Anionex/agent-vision-toolkit为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode
★ 946
Anionex/dsh-vision-toolkit让纯文本模型更好地做视觉任务的DeepSeek Harness插件:带意图的图片问答、长截图 OCR、UI 还原等|DeepSeek Harness-native integration for agent-vision-toolkit: image Q&A, long-screenshot OCR, UI restoration, grounding, pixel diff, Artifacts, and Web UI.
★ 517