dsh-plugin-vision-bridge
by c-ling
DeepSeek Harness 视觉桥接器:上传或粘贴图片,通过兼容 OpenAI 的视觉 API 描述图片,再将英文文本提供给纯文本模型。
DeepSeek Harness vision bridge: upload/paste images, describe them via OpenAI-compatible vision API, feed English text to text-only models.
安装
dsh plugin --profile web add github:c-ling/dsh-plugin-vision-bridgeGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
⚠️ 本插件已停止维护(Deprecated) 新版本的 DeepSeek Harness 已原生支持图片识别能力(可直接粘贴 / 上传图片给多模态模型), 本插件的视觉桥接方案不再需要,后续不再更新、不再接受功能请求。 请直接使用 Harness 原生图片识别;本仓库与文档仅作历史参考保留。
DeepSeek Harness 视觉识别插件:保留原生粘贴 / 拖拽图片体验,发送时先由 OpenAI 兼容视觉 API 生成英文描述,再把纯文本交给 DeepSeek。
简介
- 输入框上传按钮:与原生粘贴 / 拖拽共用同一套草稿缩略图、删除和限额校验。
- 自动看图:发送图片时,宿主先把图片保存为 durable attachment,再调用
OpenAI 兼容视觉 API(
POST {baseUrl}/chat/completions)生成英文描述。 - 可回溯历史:每次发送追加一个
vision/image图片展示事件 + 一条插件上下文 描述消息;最终用户消息保持纯文本,DeepSeek 只看到文字描述。 describe_image工具:模型可以主动重新观察已上传图片,不传imageId/imageIds时查看最近一张;多图时插件上下文会给出 attachmentId, 同时也接受文件名、draftId 或 1-based 图片序号。可通过imageIds数组在一次 调用中同时传入多张图片,让视觉模型一起理解、对比或推理。可传可选prompt参数临时覆盖默认描述提示词,让视觉模型按需提取指定信息(例如“读取图中的报错 信息”“图中按钮是什么颜色”);不传则使用设置页配置的默认提示词。- 设置页:Base URL、模型、只写 API Key、描述提示词模板、超时与图片限制;
支持在设置中直接“查看日志”以排查视觉 API 调用报错;
中英文界面随
Settings → General → Language实时切换,明暗主题使用--dsw-alias-*token。
视觉 API 失败时发送失败并恢复输入框草稿,不静默降级。
安装
从 GitHub 安装到 web profile(需要 pnpm 在 PATH 上;没有则用下面的 corepack 方式):
npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
或使用已有的 dsh 命令:
dsh plugin --profile web add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
pnpm 不在 PATH 上时:
cd ~/.dsh/profiles/web
corepack pnpm add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
dsh plugin把参数原样转发给 pnpm,直接从本仓库拉取包(pnpm 9+,本机需装有git)。 安装时若看到declares no dsh.bundle — installed as a plain dependency的提示属正常现象: 本插件不是 profile bundle 层,而是通过下面的 loader 行激活。
然后在 ~/.dsh/profiles/web/cordis.patch.yml 增加一行插入:
- insert:
- id: dsh-plugin-vision-bridge
name: 'dsh-plugin-vision-bridge'
重启 dsh web(client-modules 按进程缓存包裁决,新包必须重启宿主),然后硬刷新页面。
在会话输入框左侧会出现图片上传按钮;设置页中出现「视觉识别」。
本地开发可直接安装 link 包:
cd ~/.dsh/profiles/web
corepack pnpm add "link:/abs/path/to/dsh-plugin-vision-bridge"
验证
curl -s http://127.0.0.1:3080/plugins/dsh-plugin-vision-bridge/client.js | head -c 60
应输出 window.__ModuleLoader__.load({ 开头的 factory bundle。进入
设置 → 视觉识别 配置 Base URL 和模型后,粘贴 / 上传一张图片并发送;历史中应依次出现
图片缩略图、英文描述上下文气泡和纯文本用户消息。
更新
dsh plugin --profile web add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
# 或:npx @deepseek-ai/dsh plugin --profile web add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
# 或:cd ~/.dsh/profiles/web && corepack pnpm add "github:c-ling/dsh-plugin-vision-bridge#v1.1.2"
用新的版本号重新执行安装命令即可升级依赖;cordis.patch.yml 中的 loader 行保持不变。
重启 dsh web,然后硬刷新页面。
卸载
cd ~/.dsh/profiles/web
corepack pnpm remove dsh-plugin-vision-bridge # 或 dsh plugin --profile web remove dsh-plugin-vision-bridge
同时删除 cordis.patch.yml 中对应的 insert 行,然后重启 dsh web。
插件配置与视觉 API 调用日志保存在 $DSH_HOME/storages/dsh-plugin-vision-bridge/;图片由 harness
的 attachments 存储统一管理。卸载后这些数据都不会自动删除,如需彻底清除请手动清理。
开发
node --check lib/index.js lib/client.js
node --test
python3 -m json.tool package.json
- 宿主半部为纯 Node builtins 的 Cordis 插件:
webServer路由 +tools.register+ctx.attachments/ctx.sessions。 - 客户端为手写 factory-CJS bundle,无构建步骤;通过
conversation.input.left、conversationEvents/conversation.chat.node和settings.section注册 UI。 - 发送包装在
ctx.effect内完成,fiber 销毁时恢复原始conversation.sendSession。
已知限制
- v1 只支持 PNG / JPEG / WebP / GIF;描述语言固定为英文。
- 视觉 API 密钥明文保存在
$DSH_HOME/storages/dsh-plugin-vision-bridge/config.json(与本地 settings 的写入方式一致),接口只回传脱敏值。 - 真正的多模态 adapter / 模型切换不在 v1 范围。
License
原始 README: https://github.com/c-ling/dsh-plugin-vision-bridge/blob/main/README.md ↗
同类插件
查看全部 →
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

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod