dsh-vlm-bridge
DeepSeek Harness (dsh) bundle plugin: vision_analyze tool lets text-only LLM agents read images via SenseNova VLM, with Schemastery config and single-source credentials
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:me9rez/dsh-vlm-bridge说明文档
阅读完整 README ↗dsh-vlm-bridge
DeepSeek Harness 组合包(bundle)插件:为纯文本模型提供视觉能力。
功能
vision_analyze 工具:读取图片文件 → 调用 VLM(默认 ModelScope Qwen/Qwen3-VL-8B-Instruct)→ 返回文字描述。
适合当前模型(如 deepseek-v4-flash)不支持图片输入时:
- 识别图片内容(默认详细描述)
- 追问图片细节(传
question参数)
文件结构
dsh-vlm-bridge/
├── package.json # dsh.bundle manifest + dependencies
├── cordis.patch.yml # 插入 dsh-vlm-bridge 插件行的 patch 层
├── index.js # 插件实现(name / inject / Config / apply)
├── scripts/
│ ├── verify.mjs # 自检脚本(模块解析 + schema + 工具注册 + 真实 VLM E2E)
│ └── demo.png # E2E 测试用图(真实 UI 截图,非 1×1/64×64 占位)
└── README.md
安装(profile web)
dsh plugin --profile web add github:me9rez/dsh-vlm-bridge
# bundle 层在启动时读取,安装后需重启 dsh 进程
dsh --profile web --dump-config # 应看到 "# == dsh-vlm-bridge" 层
其他分发方式:
# 从 npm 安装(已发布后)
dsh plugin --profile web add dsh-vlm-bridge
# 从 tarball 安装(无需构建权限)
pnpm pack && dsh plugin --profile web add ./dsh-vlm-bridge-0.1.4.tgz
# 从本地目录安装(开发时)
dsh plugin --profile web add C:/workspace/dsh-vlm-bridge
# 维护
dsh plugin --profile web update dsh-vlm-bridge # 更新
dsh plugin --profile web remove dsh-vlm-bridge # 卸载(同时移除 bundle 层)
参考 dsh 生态做法(如
dsh-agent-teams的安装方式:dsh plugin --profile web add github:NanmiCoder/dsh-agent-teams)——dsh 支持直接从 GitHub 安装 bundle 包。
配置层由 cordis.patch.yml 提供:插入 dsh-vlm-bridge 插件行(id 可被用户层覆盖)。
配置
单一来源:baseUrl/model 等只从 config 来(schema 默认值兜底);密钥只从 credentials 来。
| Config 字段(patch 层 config:) | 类型 | 默认值 | 说明 |
|---|---|---|---|
baseUrl | string | https://api-inference.modelscope.cn/v1 | VLM API 地址 |
model | string | Qwen/Qwen3-VL-8B-Instruct | VLM 模型名 |
cacheTtlMs | number | 600000 | 识别结果缓存时长 ms |
cacheMax | number | 64 | 缓存条目上限 |
fetchTimeoutMs | number | 120000 | VLM 请求超时 ms |