Composer-attached images are transcribed to text by an OpenAI-compatible vision model before reaching text-only DeepSeek models.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:ximengxiaolan/dsh-vision-bridge
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
This plugin publishes its README in Chinese only.
让纯文本模型(DeepSeek V4 / V4-Flash)在对话里"看见"图片:在输入框直接粘贴图片并发送,插件自动调用一个 OpenAI 兼容的视觉模型(VLM)把图片识别成文字描述,再把描述喂给 DeepSeek 继续处理。
会话中图片照常显示;只有发给模型的内容变成文字。
原理
DSH 对纯文本模型会在提交时拒绝图片(MODEL_DOES_NOT_SUPPORT_IMAGES)。本插件打通两个官方扩展点:
- 准入放行:给
ctx.llm.resolveModelInfo打补丁,声明当前模型支持image输入,让图片附件能进入会话。 - 发模型前转换:包装
llm.streamWithRegistration,每次请求发往模型前扫描所有消息中的图片块,调用配置的 VLM 生成文字描述,替换成:
[用户附上的图片已由视觉模型自动识别(qwen-vl-max)]
<描述内容>
如果路由到的模型原生支持图片,则放行原图、不做转换。
安装
# 前置:dsh CLI 与 pnpm
dsh plugin --profile web add dsh-vision-bridge
# 或从 git 安装:
dsh plugin --profile web add https://github.com/<your-name>/dsh-vision-bridge
安装后重启 profile(dsh web)。
配置
唯一需要的是一个 OpenAI 兼容多模态模型(/chat/completions + image_url),例如阿里云百炼 qwen-vl-max、智谱 GLM-4V 等。
环境变量:
$env:VISION_API_KEY = "sk-..."
$env:VISION_BASE_URL = "https://dashscope.aliyuncs.com/compatible-mode/v1"
$env:VISION_MODEL = "qwen-vl-max"
$env:VISION_LANG = "zh" # zh | en
或在 profile 的 cordis.patch.yml 中配置(优先于环境变量):
- id: dsh-vision-bridge
config:
apiKey: 'sk-...'
baseURL: 'https://dashscope.aliyuncs.com/compatible-mode/v1'
model: 'qwen-vl-max'
lang: zh
timeoutMs: 180000
enabled: true
使用
重启后直接在输入框粘贴图片并发送即可。DeepSeek 会基于视觉模型的描述继续处理。
说明
- 同一张图片(按 attachmentId)在同一进程内缓存描述,重复发送不重复计费。
- VLM 调用失败时降级为
[图片识别失败: 原因],对话不会中断。 - 子智能体会话(subagent)仍受 DSH 内核限制,不支持贴图。
License
MIT
Links
More in this category
zhu1090093659/dsh-web-ui#packages/dsh-tool-describe-image★ 8076
A `describe_image` vision tool for text-only models: images (local path, URL, attachment) go to a configurable OpenAI-compatible vision endpoint and only the returned text enters the session.
liustack/modlens★ 4055
Vision bridge for text-only models: paste an image, get structured JSON evidence (OCR, layout, semantics).
ysr666/dsh-vision-router★ 1121
Free vision for text-only agents: built-in keyless vision chain plus pixel tools (Q&A, grounding, crop, pixel diff, colors, OCR, SVG trace, cutout, screenshots); paste an image to use it.
Anionex/dsh-vision-toolkit★ 885
Vision for text-only models: paste an image and the model switches to a Vision Toolkit variant for image Q&A, multi-image comparison, long-screenshot OCR, screenshot-to-UI reproduction, element grounding, and pixel diff. No API key by default — images are processed by the author-hosted free service, 100 per machine per day; configurable to your own provider.
dickpy/dsh-imagegen★ 91
AI image generation for the DSH Web GUI: text-to-image and image-to-image through a configurable OpenAI-compatible endpoint (gpt-image-2 / gpt-image-1 / dall-e-3), with an api_url/api_key settings card and a sidebar split-pane generation studio.
fandc520/dsh-comfyui★ 87
Drive a local or remote ComfyUI server from DeepSeek Harness: comfyui_run / comfyui_object_info / comfyui_workflow tools generate and edit images and videos, with a workflow library (graph extraction: per component / main flow / all), a load area with resolution auto-match, a live queue, SDXL and Wan 2.1 templates, a companion skill, and a same-origin media proxy.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.