DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

yukimiracle /

yukimiracle/dsh-vision-capability

Verified

DSH plugin · prove which models really read images, then declare vision support per model (图片能力检测)

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: main@45313a1f

dsh-vision-capability · 图片能力检测

先实测模型能不能读图,再为它打开图片输入。

DSH 只把图片发给「模型目录里声明了 image 输入」的模型;没声明就提示 Model "xxx" does not support image input.。问题在于:多数网关会把同一个 model id 提供两套(一套真能读图、一套收到图片后悄悄丢掉),而设置页没有 编辑输入模态的入口。猜是没用的——猜错就会往一个看不见图的眼睛里塞图片。

这个插件把「猜」换成「测」:给你配的每个网关发一张双色条测试图,只有模型 按顺序把两条颜色答对,才会把 image 写进模型配置。没通过检测的模型保持原样, 插入图片时仍然是官方那句提示。

设置 → 图片能力          每个模型一行:声明状态 + 上次实测结论 + 按钮
模型页 → 每个网关卡片     一行汇总 + 「检测该网关的纯文本模型」

安装

# 插件市场(dshmarket)里搜索「图片能力」/ vision,或:
dsh plugin add dsh-vision-capability

也可以在 DSH 桌面版「插件市场」页面点安装,或从本仓库的 Release 下载 .tgz 后 dsh plugin add ./dsh-vision-capability-0.1.0.tgz。

装完打开 设置 → 图片能力,点某个模型的「检测并启用」即可。

怎么判定

测试图是插件现场生成的 160×160 PNG:上下两条纯色,颜色从 红/绿/蓝/黄里随机取两个不同色。请求走各网关自己的 OpenAI 兼容端点 (POST {baseURL}/chat/completions,temperature: 0),要求模型按顺序说出上下 两色。

结局 判定 会不会写设置
答对上下两色 supported 会写 text + image
收到的回答里没有任何颜色,或顺序反了 inconclusive 不写
端点 4xx/5xx,错误里提到 modality / image 不支持 unsupported 不写
没 API key、没 baseURL、网络不通 unavailable 不写
协议不是 openai-completions unsupported-protocol 不写

只有 supported 会写设置——这是这个插件唯一敢自动改配置的地方。写入只是给该 模型条目加 input: ['text', 'image'](llm-pi-ai 命名空间)或 inputModalities(llm-deepseek 命名空间),其它字段原样保留。

为什么不能靠声明/文档判断:同一个 deepseek-v4-flash-0731 在 A 网关能识图, 在 B 网关会静默把图抹成文字,在 C 网关直接 400。DSH 从声明上无法区分,只能问 端点的真实行为。

会改什么、不会改什么

  • 只改你点过检测/启用的那个模型条目的输入模态字段。
  • 不改 baseURL、密钥、上下文长度、温度等任何其它配置。
  • 检测结果记在 ~/.dsh/data/dsh-vision-capability/verdicts.json(纯本地,供 UI 显示「上次实测」)。
  • 撤销(「撤销图片能力」)把该模型写回 ['text'],提示语立刻回到官方那句。

Agent 工具

装好后模型自己也能用:

工具 作用
vision_capability_status 列出所有网关/模型的声明模态 + 上次实测结论
vision_capability_probe 实测一个模型;通过才写声明(apply: false 只测不写)
vision_capability_set 不实测直接启用/撤销

所以你可以直接说:「帮我看看哪个模型真能读图」「把 qwen3.8-max 的图片能力打开」。

局限(请先读这段再用)

  • 只覆盖 openai-completions 协议:anthropic-messages、google-generate 等其它协议的网关,插件会明确回 unsupported-protocol,不会乱写。
  • 一次通过 ≠ 一直通过:网关可能在你不注意时换后端。检测是快照,不是契约; 觉得不对就再点一次。
  • 不判模型好坏:只判断「这张图它看见了吗」。答对了颜色不代表 OCR、图表理解 就一定靠谱。
  • 会消耗一次极小的请求(约 200 输入 token)。

开发

无构建步骤,纯 ESM:lib/probe.js(探针引擎)、lib/data.js(设置读写)、 lib/index.js(工具 + HTTP 路由)、lib/client.js(设置页 UI,浏览器端 bundle)。

npm test                              # 12 项离线自检:探针判定、设置写入形状、client bundle 引导
node test/selftest.mjs --live         # 额外实测真实端点
# VC_BASE_URL=... VC_MODEL=... VC_API_KEY=... node test/selftest.mjs --live

English

DSH only sends images to models whose catalog entry declares image input; otherwise it says Model "…" does not support image input. Most gateways serve the same model id in both a vision-capable and a text-only flavour, and the settings UI has no field for input modalities — so guessing is not an option.

This plugin replaces the guess with a test: it generates a two-band test image, sends it through the gateway's own OpenAI-compatible endpoint, and declares image input only when the model names both bands in the right order. Models that fail stay untouched, so inserting an image keeps showing the harness's own error.

  • UI: Settings → Vision (one row per model, last verdict, one click) and a one-line summary on every provider card on the Models page.
  • Tools: vision_capability_status, vision_capability_probe, vision_capability_set.
  • Scope: openai-completions endpoints only. Other protocols report unsupported-protocol instead of writing anything.
  • Writes are limited to the input-modality field of the model you asked about.

MIT licensed. Issues and gateway reports welcome.

—/ 5

No ratings yet

Verified DSH bundle

Commit 45313a1f8d80

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout