dsh-vision-bridge
Manifest validDSH profile 插件包:当会话使用不支持图片的模型(如 DeepSeek)时,不再弹出 "当前模型不支持图片"之类的拦截,而是调用工具进行视觉识别
dsh-vision-bridge
A DSH profile bundle for sessions running models that cannot accept image input (DeepSeek and similar). Instead of the native "the current model does not support images" rejection, the plugin runs the following pipeline:
- materializes the image into the session workspace (
.dsh-vision-bridge/); - rewrites the user message (via the sanctioned
agent/pre-stepchannel) into a[图片桥接]instruction carrying the image paths; - registers a system-prompt rule (order 150) requiring the model to call
the configured vision tool (default
vision_glance, fuzzy-selectable such asglance/ground/detect, matched against the agent's actual toolset) and answer from its analysis — the tool-call card and its result appear in the conversation; - patches
llm.streamWithRegistration— the dispatch funnel behind bothllm.streamand the agent loop's prepared-call path — to strip image blocks (including images nested inside tool results), replacing them with a placeholder before a text-only adapter serializes the conversation.
Sessions whose agent preset matches excluded presets (default minimal,
the two-tool preset) are NOT bridged: their images are replaced with the
original "model does not support images" notice text. The preset a session
runs is resolved the same way DSH itself resolves it: the newest
agent-preset/selected event wins, with the creation-time header as fallback.
Why the native rejection happens (DSH itself)
dsh-host-apiproxy'spromptRPC rejects image messages before they enter the session whenllm.resolveModelInfo().inputModalitieslacksimage(that is the banner shown in the UI).- The DeepSeek adapter throws
UNSUPPORTED_CONTENTon any message containing image blocks at serialization time.
This plugin intervenes at three layers:
| Layer | Mechanism |
|---|---|
| Admission | Patches llm.resolveModelInfo so bridged models report an image input modality |
| Current message | agent/pre-step materializes the image and injects the vision-tool instruction |
| History | Patches llm.streamWithRegistration (the shared dispatch funnel) to strip image blocks before adapter serialization |
Settings (Settings → 视觉桥接)
| Setting | Default | Meaning |
|---|---|---|
| Enable vision bridge | on | Off = restore native DSH blocking entirely |
| Vision tool (fuzzy input) | vision_glance | The tool the model must call; fuzzy-matched against the agent's real toolset |
| Custom prompt (optional) | empty | Extra instruction passed to the vision tool |
| Bridge models | deepseek-official*,deepseek* | provider[:model] patterns, * wildcards |
| Excluded session presets | minimal | Multi-select + extra wildcard patterns; matched sessions are NOT bridged (original blocking text) |
Configuration is persisted through the DSH settings service (namespace
vision-bridge); it survives restarts.
Platforms: WSL/Ubuntu and Windows
- Image bytes are written via
ctx.shellwith base64 on stdin (no huge command lines):bash(base64 -d) on Linux/WSL, PowerShell ([IO.File]::WriteAllBytes) on native Windows — the shell flavor is auto-detected once (Write-Outputprobe +resolveExecutable('pwsh')fallback). - Shell commands carry the session-resolved sandbox policy (like the bash
tool):
danger-full-accesssessions run without a sandbox backend; confined sessions run inside the workspace fence when a backend exists. - The vision tools themselves are native DSH tools (vision-tools skill); their runtime already handles cross-platform execution.
Requirements
- The session must have the vision-tools skill loaded (or another vision plugin) so a vision tool exists in the agent's toolset; otherwise the bridge degrades to a self-heal instruction (load the skill first) or a clear notice.
- Standard/cordis presets have the
skilltool; theminimalpreset does not (it is excluded by default).
Installation
Unzip the bundle, then add it to a profile:
unzip dsh-vision-bridge.zip -d dsh-vision-bridge
dsh plugin --profile web add ./dsh-vision-bridge
(dsh plugin forwards to pnpm in the profile directory. Alternatively, copy
the extracted folder into the profile's node_modules/@dsh-external/ and
reconcile plugins.)
Known limitations
- The admission patch is process-wide, so excluded sessions cannot get the native error banner — the same reason is rendered as text instead.
- Multiple sessions share the plugin's global effects (llm patches, pre-step listener, system rule) while the plugin is mounted.
- Bridged models never receive image blocks (the adapter forbids them); the attachment stays available in the session.
Comments
Loading…
Similar plugins
by motongv
给 DeepSeek Harness(DSH)加视觉能力的插件:装完就能拖图识别——图片交给视觉模型识别、文字交给 DeepSeek 推理,聊天入口完全不变。DSH 专属插件。
★ 0
↓ 60/wk
MIT
JavaScript
Aug 18, 2026
dsh plugin --profile web add dsh-vision-adapterby kbpoyo
DSH 插件:让纯文本模型也能看图。Web 端直接粘贴图片即可发送,无需指定图片路径;模型自主调用视觉技能查看,多模态模型原生直通,零skill绑定。
★ 5
↓ 28/wk
MIT
JavaScript
Aug 14, 2026
dsh plugin --profile web add @kbpoyo/dsh-image-bridgeby h-k-c
DeepSeek Harness 图片插件:贴图不会让对话报错,模型自动判断是否需要看图(支持智谱/魔搭免费视觉模型,图片在聊天窗口正常显示)
★ 0
MIT
JavaScript
Aug 15, 2026
dsh plugin --profile web add auto-visionby dami9527
DeepSeek Harness 插件:让 deepseek-v4-flash 等不能看图的模型也能处理聊天图片,内置识图工具。安装:dsh plugin --profile web add dsh-image-pathify
★ 4
↓ 768/wk
MIT
TypeScript
Oct 20, 2026
dsh plugin --profile web add dsh-image-pathifyby c-ling
【已停止维护】DeepSeek Harness 视觉桥接插件:新版 Harness 已原生支持图片识别,请使用原生能力,本仓库仅作历史参考。
★ 3
MIT
JavaScript
Aug 21, 2026
dsh plugin --profile web add dsh-plugin-vision-bridgeby xiyue718
DSH 外接识图插件:当当前模型不支持识图时,调用外部视觉模型识别图片。 / External vision model plugin for DSH: recognize images when the active model lacks vision.
★ 0
TypeScript
Sep 20, 2026
dsh plugin --profile web add @dsh-external/ui-external-vision