Terry12138qy/dsh-vision
DeepSeek Harness识图插件:为不具备原生识图能力的模型提供识图能力(阿里云百炼qwen3.5-omni-plus,失败自动切换智谱glm-4.6v-flash)。由claude-vision-skill移植适配。
Project Overview项目介绍
dsh-vision is an image-description plugin for DeepSeek Harness. It converts an image path or URL into base64, sends it to a multimodal model, and returns a Chinese description. The primary model is DashScope qwen3.5-omni-plus, with Zhipu glm-4.6v-flash as an automatic fallback. Invoke via await tools.vision() in Code Mode. Use it when your model needs to interpret images. Caveat: API keys for both models must be configured, and dsh web must be restarted after installation.
dsh-vision 是 DeepSeek Harness 的图描述插件,把图片路径或 URL 转为 base64,调用多模态大模型返回中文描述。主模型使用阿里云百炼 qwen3.5-omni-plus,失败时自动切换至智谱 glm-4.6v-flash。在 Code Mode 中通过 await tools.vision() 调用,适合需要让模型识图的场景。注意:需配置主、备模型的 API Key 等环境变量,安装后须重启 dsh web 才生效。
请帮我了解并安装插件:【dsh-vision】【https://github.com/Terry12138qy/dsh-vision】
Send this message to DSH in your current session. CLI install commands may not be accurate across systems — DSH will figure it out for you.把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Terry12138qy/dsh-vision
把 Terry12138qy/dsh-vision 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-vision
给不具备原生识图能力的 DeepSeek Harness 模型装上「眼睛」。
把图片(本地路径或网络 URL)发送给多模态大模型,返回中文文字描述。主模型为阿里云百炼(DashScope)qwen3.5-omni-plus,调用失败(额度用尽 / 欠费 / 限流)时自动切换智谱 glm-4.6v-flash 备用模型。
原始来源与适配说明
- 原始项目:asuojun/claude-vision-skill —— 面向 Claude Code 的识图 skill,核心是
vision.js(读图 → base64 → 调 OpenAI 兼容接口 → 返回文字描述,主模型失败自动切备用模型)。 - 本项目:专门为 DeepSeek Harness 做了适配,把原来的 Claude skill 重写为 DSH 的 bundle 插件,注册一个
vision工具。识图主流程(读图 → base64 → 调 API → 返回文字、主/备模型自动切换)原样保留。
相较原版的主要改动:
- 打包成 DSH bundle(
dsh.bundle.patch),可通过dsh plugin安装; - 注册为 DSH 的
vision工具(Code Mode 里await tools.vision(...)可直接调用); - CJS → ESM;配置改为「环境变量 > cordis.patch.yml config > 默认值」(原
.env语义不变); - 增加
exec.signal取消支持(DSH 工具契约要求)。
安装
dsh plugin --profile web add github:Terry12138qy/dsh-vision
或本地路径:
dsh plugin --profile web add file:/绝对/路径/dsh-vision
安装后重启 dsh web 生效。发布到 GitHub 后,记得给仓库添加 dsh-plugin 主题,方便被 DeepSeek Harness 生态发现。
配置
密钥通过环境变量(推荐,避免密钥进仓库)或编辑 cordis.patch.yml 的 config:
| 用途 | 环境变量 | config 字段 |
|---|---|---|
| 主模型 API Key | DASHSCOPE_API_KEY |
apiKey |
| 主模型 Base URL | DASHSCOPE_BASE_URL |
baseUrl |
| 主模型名 | VISION_MODEL |
model |
| 备用模型 API Key | FALLBACK_API_KEY |
fallbackApiKey |
| 备用模型 Base URL | FALLBACK_BASE_URL |
fallbackBaseUrl |
| 备用模型名 | FALLBACK_MODEL |
fallbackModel |
环境变量优先于 config。示例见 .env.example。
使用
配置好后,直接发图片路径或 URL,agent 会调用 vision 工具:
帮我看下这张图 C:\path\to\image.png
工作原理
图片(路径/URL) → 读文件 → base64 data URL → POST /chat/completions → 文字描述
└─ 主模型失败 → 自动切备用模型 → 重试
致谢
衷心感谢 asuojun 开源 claude-vision-skill —— 本项目的识图主流程正是基于它的 vision.js 移植而来,才有了这个让 DeepSeek Harness 也能「看图」的插件。
许可
- 本适配代码:MIT License(见 LICENSE)。
lib/vision.js的识图主流程移植自 asuojun/claude-vision-skill,请保留其署名并遵守原始项目的要求。
Anionex/dsh-vision-toolkit
shanliuling/dsh-image-gen
zhaoolee/notes
Fishsb/dsh-prompt-enhancer
jing-hy/picturereader
KaichenCurry/dsh-design-mode
LaplaceYoung/dsh-directorx