鱼皮AI导航
鱼皮AI导航
  • 主页
  • 社区
  • AI工具
  • AI知识库
  • AI提示词
  • MCP
  • Skills
  • AI学习资源
  • AI资讯
  • GitHub开源
登录/注册

dsh-vision-pro-bridge

视觉桥:贴图先经 deepseek-v4-flash-vision-exp 转写为文字,再交给纯文本的 deepseek-v4-pro 回答,零第三方依赖。

视觉多模态
访问 GitHub
文档README

dsh-vision-pro-bridge

Give a text-only DeepSeek-V4-Pro brain real image understanding — without switching models, without Ollama, and without a second API key.

DeepSeek Harness (dsh) plugin. English · 简体中文

The problem

deepseek-v4-pro (and deepseek-v4-flash) are text-only models: their API rejects image bytes. In DeepSeek Harness, pasting a screenshot into a Pro session fails with "does not accept image input". Your only official option is to switch the whole conversation to the weaker, Flash-tier deepseek-v4-flash-vision-exp.

What this plugin does

It registers a twin provider route — deepseek-vision-pro (model deepseek-v4-pro-vision) — that advertises image support. When you attach an image, the plugin first asks deepseek-v4-flash-vision-exp to transcribe it into text (using your existing DEEPSEEK_API_KEY), then hands that text — plus a stable local file path — to deepseek-v4-pro. The DeepSeek wire route never sees an image; V4-Pro keeps its coding brain and still "sees" the picture.

▼
text
复制代码
paste screenshot → [image block admitted] → transcribe via deepseek-v4-flash-vision-exp (text) → text + local path → deepseek-v4-pro answers

Why this one

  • Zero third-party dependencies. It reuses only the harness's own @deepseek-ai/dsh-llm and @deepseek-ai/dsh-llm-deepseek. No openai, no sharp, no schemastery, no Ollama.
  • DeepSeek-only, single provider. Images go only to DeepSeek (deepseek-v4-flash-vision-exp), through the same DEEPSEEK_API_KEY. No second VLM vendor, no local model, no anonymous endpoints.
  • Official image pipeline, byte-for-byte. It subclasses the official DeepSeekAdapter, so image normalization, Files-API upload, and inline-base64 fallback are identical to official behavior — no hand-rolled HTTP.
  • Minimal & auditable. One file, ~250 lines. Easy to read, verify, and fork.
  • Content-addressed persistence. Images are saved under ~/.dsh/vision-pro-bridge/images/ and the stable local path is passed to the model, so V4-Pro can reference it.
  • Pro-focused. One model, deepseek-v4-pro-vision: keep V4-Pro's coding ability, add vision.

Install

▼
bash
复制代码
dsh plugin --profile web add dsh-vision-pro-bridge # restart dsh web

Usage

  1. In the model picker, choose DeepSeek-V4-Pro (视觉桥).
  2. Paste or drag a screenshot and ask normally.

Make it the default for new sessions (~/.dsh/settings.yaml):

▼
yaml
复制代码
agent-default-model: provider: deepseek-vision-pro model: deepseek-v4-pro-vision

Configuration

Environment variables (all optional):

VariableDefaultPurpose
DEEPSEEK_API_KEYcredentials serviceDeepSeek key (same as the official route)
DEEPSEEK_BASE_URLhttps://api.deepseek.comEndpoint (same as the official route)
DSH_VISION_PRO_BRIDGE_PROMPTbuilt-in English transcription promptOverride the transcription prompt (e.g. Chinese UI analysis)

Images are cached content-addressed under ~/.dsh/vision-pro-bridge/images/ (re-attaching the same image reuses the transcription); an activity log is written to ~/.dsh/vision-pro-bridge-activity.jsonl.

How it works

  1. apply(ctx) registers a DeepSeekAdapter subclass for the provider route deepseek-vision-pro.
  2. listModels / resolveModel / prepareCall all declare inputModalities: ['text', 'image'], so the harness's image gates (paste admission, thumbnails, read_image) open. Overriding prepareCall is required — otherwise the LLM runtime projects images to placeholders before they ever reach the adapter.
  3. stream() walks every message (including nested tool-result content), and for each image block reads its bytes, saves them content-addressed, and calls super.stream() against deepseek-v4-flash-vision-exp to produce a text transcription.
  4. The image block is replaced with [图片(视觉桥分析 by …)]\n<transcription>\n\n本地路径:<path> and the now text-only conversation is streamed to deepseek-v4-pro.

With no image, stream() forwards directly to Pro — zero overhead.

Limitations

  • Transcription is lossy: great for layout / OCR / UI review, not for exact pixel coordinates.
  • The transcription model is fixed to deepseek-v4-flash-vision-exp.
  • The endpoint is resolved from DEEPSEEK_BASE_URL (not the settings-page llm-deepseek overrides).
  • No fallback chain: if the transcription call fails, the image becomes a placeholder and the turn continues.

Alternatives

For a feature-rich take (fallback VLM chain, local Ollama, settings-page UI, image downscaling, classified errors), see dsh-vision-proxy. This plugin is the minimal, DeepSeek-only, zero-dependency version of the same idea.

License

MIT

视觉多模态

快捷安装

复制到终端去安装插件

dshplugin--profilewebaddgithub:ShaineDemo/dsh-vision-pro-bridge

温馨提示

装插件等于在本机跑第三方代码,权限与你相同,能读文件、用凭据、访问网络,工具审批管不到。请只装可信来源,并尽量锁定 commit。

站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
站长:程序员鱼皮 老鱼简历 商务合作 增值电信业务经营许可证
2026 鱼皮AI导航 | 沪ICP备19026706号-6
🔥热门工具
朱雀AI检测朱雀AI检测
朱雀AI检测助手朱雀AI检测助手
LovartLovart
老鱼简历老鱼简历
WritePass官网WritePass官网
面多多面多多
CursorCursor
星月写作星月写作
零感AI零感AI
墨得问题墨得问题
dsh 插件推荐
dsh-web-ui#packages/dsh-tool-describe-image
给纯文本模型补视觉:describe_image 把本地路径/URL/附件图片交给可配置的 OpenAI 兼容视觉端点,进会话的只有返回文本。
dsh-image-viewer
增强 DSH 原生图片查看体验,支持指针中心缩放、拖动、画廊、下载、键盘操作和图片区域备注(Beta)。
dsh-appshots
给 DSH Desktop 用的窗口截图,支持 macOS 和 Windows:macOS 按两边 Command、Windows 按两边 Ctrl(或点输入框旁相机)捕获当前前台窗口并附加到会话,同时把可读的窗口文字注入为隐藏上下文。
dsh-tool-vision
通过 inspect_image 工具将本地图片或 HTTP(S) 图片链接发送至配置的 OpenAI 兼容视觉端点,并将文字结果带回对话。
dsh-draw
多引擎文生图(OpenAI Images 与智谱 CogView 预设):按会话配额、引擎故障切换、凭证安全配置,结果卡片支持重新生成。