Einskyle/dsh-llm-vision-bridge

为 dsh 提供 DeepSeek 视觉桥接:将图像附件路由至视觉模型(通过 pi-ai/llama.cpp 的 Qwen3-VL),并继续使用纯文本 LLM(DeepSeek)处理。

Project Overview项目介绍

This is a native plugin built exclusively for DeepSeek Harness (DSH) that enables text-only DeepSeek LLMs to handle image inputs in the DSH web GUI. When a user pastes or uploads an image into the chat composer, the plugin automatically routes the image to a configured vision model, retrieves a text description of the image, and forwards that description to DeepSeek so it can respond to image-related queries just like a native multimodal model. It registers a new deepseek-vision LLM adapter that natively integrates with DSH's existing mechanisms for image handling, request routing, and session management, requiring no changes to the DSH front-end UI.

To use the plugin, first install it via the DSH CLI command: run dsh plugin --profile web add github:Einskyle/dsh-llm-vision-bridge or install from the npm registry, then restart the DSH web service to apply the changes. After installation, open DSH's Settings > Models page, set your default agent model to deepseek-vision, which is required to pass DSH's built-in image admission check that blocks image inputs for non-multimodal models. Once set up, you can paste or upload PNG, JPEG, WebP, or GIF images to the chat, add optional text prompts, and send the request for DeepSeek to respond based on the vision model's description.

The plugin supports any OpenAI-compatible vision endpoint, including local llama.cpp gateways running on your desktop GPU and cloud-based APIs like DashScope's Qwen-VL-Max, OpenAI's GPT-4o, and many other compatible providers. It includes an LRU cache for image descriptions to avoid redundant calls to the vision model, saving time and API costs, and automatically retries failed requests that return 503 or 429 errors, which is helpful for single-GPU desktop setups where VRAM is often shared across multiple tools. The plugin is released under the permissive MIT open source license, so it is free to use, modify, and distribute without restriction.

这是一个专为 DeepSeek Harness (DSH) 开发的原生插件,作用是让 DSH 网页界面中仅支持文本的 DeepSeek 大模型也能“看见”图片。用户粘贴或上传图片到对话输入框后,插件会自动将图片转发给配置好的视觉大模型,获取图片的文本描述后再发给 DeepSeek,让纯文本大模型也能基于图片内容完成对话交互。

插件会对已描述的图片做 LRU 缓存,相同图片不会重复调用视觉模型,节省资源和时间。它还会在视觉网关返回 503/429 错误时自动重试,能适配桌面端单 GPU 被其他工具占用显存的场景。用户仅需在 DSH 设置中将默认模型切换为插件提供的 deepseek-vision,即可正常使用,无需修改前端界面。

你可以通过 DSH 内置的插件命令直接从 GitHub 或 npm 注册表安装,也可以手动复制文件到对应目录完成配置。使用前需要先在 pi-ai 适配器下配置好支持图片输入的 OpenAI 兼容视觉模型端点,可以是本地 llama.cpp 网关,也可以是第三方云服务商的 API。本插件采用 MIT 许可证开源,可免费使用。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 1 warning1 项注意
  • Only 3 stars - very few users, little community feedback星标只有 3,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add dsh-llm-vision-bridge

把 Einskyle/dsh-llm-vision-bridge 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

dsh-llm-vision-bridge

English | 中文

Awesome DSH Plugin

Let text-only LLMs (DeepSeek) "see" images in the dsh web GUI: paste an image into the chat and the plugin automatically routes it to a vision model (Qwen3-VL via your existing pi-ai / llama.cpp route), then feeds the resulting text description to DeepSeek, which continues the conversation as if it were a native multimodal model.

Features

  • Native LLM provider — registers deepseek-vision on the DSH LlmAdapter seam. Image admission, request routing, and session compaction all run through harness-native mechanisms; no UI changes, no front-end interception.
  • Zero overhead without images — image-free requests pass straight through to the fallback provider (default deepseek-official).
  • Vision-assisted replies — each image block is described by the vision model (attached user text is included in the prompt), then replaced with a [图片 N 描述] text block before the request reaches DeepSeek.
  • LRU description cache — the same image + prompt is never re-described; history replay and compaction do not re-run the vision model.
  • 503/429 auto-retry — tolerates the desktop GPU's single-card exclusive scheduling (vision gateway returns 503 while other tools occupy VRAM).
  • Configurable failure policy — placeholder (insert a failure note and continue) or error (fail the turn).

How it works

The chat composer natively supports image attachments: images enter the model request as {type:"image", attachment} content blocks. The DeepSeek chat-completions adapter rejects image blocks with UNSUPPORTED_CONTENT, so a text-only model cannot process them directly.

This plugin's bridge provider (deepseek-vision) declares inputModalities: ["text", "image"], which satisfies the host's image-admission check (MODEL_DOES_NOT_SUPPORT_IMAGES is otherwise thrown before the message ever reaches the agent). Inside its stream():

  1. No image → yield* ctx.llm.stream({ ...options, provider: fallbackProvider }) — passthrough, zero cost.
  2. Has image → for each image block, call the vision model via a nested ctx.llm.stream() against the configured vision provider (e.g. pi-ai's llama route; image bytes are read automatically by the attachment service), then replace the image block with a [图片 N 描述]\n<description> text block and forward the rewritten messages to the fallback provider.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev deepseek-harness-plugins 下一个 Next sandbox-micro →