Gingerate/dsh-vision-skill ↗★ 0
dsh-vision-skill
让 DSH 里任何模型(包括 DeepSeek 这类纯文本模型)都能识别图片:识图技能 + 图片发送补丁,装上即用。
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗dsh-vision-skill
让 DSH 里任何模型(包括 DeepSeek 这类纯文本模型)都能识别图片。装上即用:纯文本模型发图不再被拒,图片自动转成"本地路径"交给视觉 API 识别。
Give every model in DeepSeek Harness (DSH) — including text-only ones like DeepSeek — the ability to see images. Install and use: image messages to text-only models are no longer rejected; images are delivered as local paths and recognized through an OpenAI-compatible vision API.
⚠️ 诚实声明 / Honest disclaimer:本项目的"宿主补丁"是对 DSH 核心包(rc.6)的 mod 式修改,不是官方扩展点。DSH 升级后锚点可能失效(表现为脚本输出
MISS),届时插件只告警、绝不硬改文件,请按故障排查处理。 The host patch here is a mod of DSH core packages (rc.6), not an official extension point. After DSH upgrades the anchors may stop matching (the script then reportsMISS); the plugin only warns and never force-edits files. See Troubleshooting.
特性 / Features
- ✅ 纯文本模型(DeepSeek 等)发送图片不再被"当前模型不支持图片"拦截
- ✅ 识图自动降级:模型先试原生
read_image,失败自动走vision.js(OpenAI 兼容视觉 API) - ✅ 多模态模型(GLM、MiMo 等)行为完全不变,图片照常直传
- ✅ 无密钥入库、无个人路径:所有路径运行时推导,API Key 走环境变量
- ✅ 幂等补丁引擎:可安全重复执行,每次自动
node --check自校验
工作原理 / How it works
两层设计 / Two layers:
- 技能层 / Skills:注册两个技能——
claude-vision-skill:识图指令(条件判断:先read_image,失败走vision.js);vision-patch:补丁检修技能(模型可手动运行幂等补丁脚本)。
- 宿主补丁层 / Host patch:插件启动时自动对
$DSH_HOME/profiles/*/node_modules/@deepseek-ai下的 5 个核心包做精确锚点修改:dsh-host-apiproxy:移除"纯文本模型 + 图片"的两处拒绝(发送时 / 切换模型时);dsh-llm-pi-ai/dsh-llm-deepseek:把 image 块降级渲染为带本地路径的文本,而不是抛UNSUPPORTED_CONTENT;dsh-attachment/dsh-attachment-local:新增pathOf()暴露附件真实存储路径。
补丁以幂等 + 安全失败为原则:锚点不匹配(版本变化)时只记录 MISS 告警,绝不改动文件。
安装 / Install
方式一:npm 插件(推荐 / Recommended)
# 1. 安装到 web profile
dsh plugin --profile web add dsh-vision-skill
# 2. 在 /profiles/web/cordis.patch.yml 追加:
# - insert:
# - id: vision
# name: dsh-vision-skill
# 3. 重启两次(第一次启动写入补丁,第二次生效)
dsh web --port 3080