yepyeel/dsh-vision
提供dsh中deepseek v4等无法识图的模型一双眼睛
项目介绍Project Overview
dsh-vision 是面向 DeepSeek Harness 的插件包,为不支持图像输入的纯文本模型(如 DeepSeek V4 Flash/Pro)补齐视觉能力。它拦截含图片的请求,改用已注册的视觉模型生成图像描述后再调用目标模型,原始图片在会话与界面中保留。支持自动调度、指定模型与系统 OCR(macOS Vision / Windows OCR / Tesseract)三级回退;每张图按模型缓存描述,后续轮次不重复调用。注意:仅当模型在 inputModalities 中显式声明 image 时才会被选用,且系统 OCR 仅做文字提取而非场景描述。
dsh-vision is a DeepSeek Harness profile plugin that gives text-only models vision by describing attached images via a registered image-capable model before the provider call. The session log and UI keep the original images. It offers three modes: automatic (first available vision model, then system OCR), specified model (no fallback), and OCR-only (macOS Vision, Windows.Media.Ocr, or Tesseract). Descriptions are cached per attachment and model for the process lifetime, so later turns skip the vision call. Caveat: only models that explicitly declare image in inputModalities are eligible, and system OCR returns extracted text rather than scene descriptions.
请帮我了解并安装插件:【dsh-vision】【https://github.com/yepyeel/dsh-vision】
把上面这条消息直接发给当前会话里的 DSH,让它帮你了解并安装。安装命令不一定准确,发给 DSH 更稳。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.
或使用命令行安装(适合开发者)Or use CLI install (for developers)
命令行安装CLI Install
dsh plugin --profile web add github:yepyeel/dsh-vision
把 yepyeel/dsh-vision 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-vision
English | 中文
A DeepSeek Harness profile bundle that gives text-only models (DeepSeek V4 Flash, DeepSeek V4 Pro, and any other route whose inputModalities omit image) working vision.
When a request contains image attachments and the target model cannot see them, the plugin describes each image and replaces the image blocks with that text for the provider call only. The session log and the UI keep the original images.
Requirements
- A DeepSeek Harness installation with the
dshCLI available on your PATH. - For vision-model description: at least one already-added model that declares
imagein itsinputModalities. - For the OCR fallback: macOS (Vision framework) and Windows (Windows.Media.Ocr) need nothing extra; other platforms need Tesseract installed and on the PATH.
Behaviour
- Auto (default) — walk already-added models that declare image input, in provider registration order, and use the first one that succeeds. If none are available, fall back to system OCR.
- Specified model — use only the vision model chosen in Settings. Failures are not retried and never fall back to another model or OCR.
- Auto + no vision model — system OCR:
- macOS: Vision framework
- Windows: Windows.Media.Ocr
- any platform: Tesseract if installed
Descriptions are cached per attachment + model (or OCR) for the life of the process so later turns do not re-pay the vision call.
Settings
Open Settings → 视觉识别:
- Auto — first available vision model, then system OCR.
- 指定识图模型 — pick one already-added image-capable model. No fallback.
The same values live in $DSH_HOME/settings.yaml under dsh-vision:.
Install
From this directory:
dsh plugin --profile web add .
Restart dsh web so the new bundle layer and the client settings page load.
To remove:
dsh plugin --profile web remove dsh-vision
How it works
The fix has two layers:
- Declare capability — on startup the host row augments the current text-only model's
inputModalitieswithimage(by wrappingctx.llm.resolveModelInfo). Thesession.prompt/session.selectModelimage-admission gates therefore stop rejecting image messages with "model does not support images", and theread_imagetool becomes available to text-only models too. - Rewrite — the host row listens on the
llm/streamwaterfall. When a rewrite is needed the plugin builds a new request (images replaced by descriptions) and callsctx.llm.streamagain. The nested call targets a vision-capable model, so the interceptor lets it through. Frozen agent-loop requests are never mutated.
Native image support is decided with the pre-wrap resolver, so natively image-capable models are never double-described; only models that declare inputModalities as text-only (or omit it) gain the bridged image capability.
Limitations
- Only models that declare
imageininputModalitiesare offered. A gateway that can see images but does not say so will not be selected. - Specified-model mode fails closed: a missing, text-only, or errored model is not replaced.
- System OCR is text extraction, not a scene description.
- Settings RPCs are loopback-only, same as the rest of the configuration surface.
- Because
imageis declared, a session that already contains images can switch back to a text-only model; the historical images are described on the nextllm/streampass.
nexu-io/open-design
ruvnet/ruflo
amruthpillai/reactive-resume
volcengine/OpenViking
Molunerfinn/PicGo
titanwings/colleague-skill
nocobase/nocobase
Tencent/WeKnora