hZsFN/dsh-image-bridge
hZsFN★ 0JavaScriptLast synced: 2026-08-14
Image message bridge for text-only models in DeepSeek Harness (dsh): image blocks → text placeholder + local path, vision via qwen script
README excerpt
dsh-image-bridge 让 不支持图片输入 的模型(如 DeepSeek)也能接收图片消息的 DeepSeek Harness (dsh) 插件。 原理:图片消息到达模型前, agent/pre-step 钩子把消息里的 image 块替换为 文本占位 (含附件本地路径 + 识图脚本调用指令)。agent 收到后调用自带识图脚本(默认 qwen 视觉模型)描述图片,再基于描述回答。 模型请求里永远只有文本 ,不会触发适配器的图片拒绝逻辑。 为什么需要它 - dsh 的模型适配器(如 DeepSeek 的 assertTextOnly )对历史消息里的 image 块会直接抛 UNSUPPORTED CONTENT ——一张图进过会话后,之后 每一轮 都失败。 - apiproxy 在 prompt 入口也会按 modelInfo.inputModalities 拒绝无图模型的图片消息。 - 本插件 + 两个小 patch(见下)解决整条链路。 安装 1. 把本仓库的 index.js 和 vision-qwen.mjs 放进 profile 目录(两个文件必须同目录,或自行配置脚本路径): 2. 在 /.dsh/profiles/web/cordis.patch.yml 注册: 3. 配置识图 API Key:环境变量 DASHSCOPE API KEY (阿里云百炼 DashScope,千问视觉模型)。 脚本也会回退读取 $DSH HOME/.credentials.yaml 里的 DASHSCOPE API KEY 。 4. 重启 dsh web。 配套 patch(dsh 升级后需要重打) 发布版的插件本身只做"图片 → 文本占位"的替换;要让图片 能进到这一步 ,还需要两处官方包补丁(升级 dsh 后丢失需重打): 1. apiproxy 放行 : @deepseek-ai/dsh-host-apiproxy 两处图片模态检查改为绕过 - lib/index.js 与 lib/types/api-proxy.js : if (modelInfo.inputModalities ...) → if (false && ...) 2. DeepSeek 适配器图片中和 (关键配套,缺了"消息都发不进来"): - @deepseek-ai/dsh-llm-deepseek/lib/index.js : assertTextOnly 从"抛错"改为"把 image 块中和成文本占位", serializeMessages 使用中和后的 content。 - 该补丁同时自动治愈已中毒的会话(历史里的图片序列化为占位文本)。 ⚠️ 改动 dsh 官方包属于高危修改:改前备份、改后 node --check 验证、重启后测试。 工作原理 - 图片占位包含…
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、版面、语义)。
★ 1,123
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
★ 794
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.
★ 298