dsh-vision-router 1.4.1 → 1.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -15,8 +15,8 @@
15
15
  </p>
16
16
 
17
17
  <p align="center">
18
- <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.4.1"><img src="https://img.shields.io/badge/release-v1.4.1-5B4CF0?style=flat-square" alt="Release v1.4.1" /></a>
19
- <a href="tests"><img src="https://img.shields.io/badge/verified-149%20tests-2EA44F?style=flat-square" alt="Verified: 149 tests" /></a>
18
+ <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.4.3"><img src="https://img.shields.io/badge/release-v1.4.3-5B4CF0?style=flat-square" alt="Release v1.4.3" /></a>
19
+ <a href="tests"><img src="https://img.shields.io/badge/verified-257%20tests-2EA44F?style=flat-square" alt="Verified: 257 tests" /></a>
20
20
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="License: MIT" /></a>
21
21
  <a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white" alt="Node.js >=22" /></a>
22
22
  <img src="https://img.shields.io/badge/runtime-no%20Python-8A2BE2?style=flat-square" alt="No Python" />
@@ -28,9 +28,9 @@
28
28
  <p align="center">💬 <strong>QQ community group: 1105463028</strong></p>
29
29
 
30
30
  > [!WARNING]
31
- > 📌 **Announcement (v1.4.1)**
31
+ > 📌 **Announcement (v1.4.3)**
32
32
  >
33
- > **v1.4.1 now supports** hardened vision failure handling — a single broken vision backend (401 / 429 / outage) can no longer stall a text turn: circuit breaking, shared task budgets and structured failure results keep DeepSeek conversations moving.
33
+ > **v1.4.3:** Custom vision backends are runtime-verified instead of blocked by DSH capability metadata, including WebSocket/private transports.
34
34
 
35
35
  <p align="center">
36
36
  <img src="assets/vision-demo.gif" width="640" alt="Demo: paste an image, the agent locates the send button with vision_ground / vision_crop / vision_pixel_diff and answers with coordinates" />
@@ -40,7 +40,9 @@
40
40
 
41
41
  - [Why this exists](#why-this-exists)
42
42
  - [How it compares](#how-it-compares)
43
+ - [Acknowledgements](#acknowledgements)
43
44
  - [Quick start](#quick-start)
45
+ - [Free vision key channels](#free-vision-key-channels)
44
46
  - [Highlights](#highlights)
45
47
  - [How it works](#how-it-works)
46
48
  - [Tools](#tools)
@@ -61,20 +63,41 @@ Most DSH vision plugins bridge images to DeepSeek as *text descriptions* — los
61
63
 
62
64
  ## How it compares
63
65
 
64
- The closest alternative is [@anionex/dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit) (Anionex), a native DSH bundle of the well-known `agent-vision-toolkit` lineage. Both packages ship a `vision-tools` skill and a family of pixel-level tools; they differ in philosophy — **zero-config paste-and-go** versus **agent-driven visual engineering**:
66
+ **One-line take**: most dsh vision plugins turn images into *text descriptions* for DeepSeek
67
+ (description bridge — lossy); this plugin hands the image turn *straight to a vision model*
68
+ (routing bridge — pixel-faithful), with a built-in keyless free fallback.
65
69
 
66
- | | dsh-vision-router | @anionex/dsh-vision-toolkit |
67
- |---|---|---|
68
- | Image Q&A out of the box | ✅ Built-in free chain (anonymous OVHcloud endpoint) — no account, no key | Requires your own vision API key (local pixel tools work without one) |
69
- | Runtime | ✅ Node only — no Python | Python 3.11+ managed runtime |
70
- | Getting an image in | ✅ Pick a “+ Auto Vision” group once, then paste directly | Workspace path + `/vision-tools` command, then explicit tool calls |
71
- | Turn routing | ✅ Image turns switch to vision, text turns switch back to DeepSeek — optional stealth takeover keeps the model picker looking stock | Tool-driven; no whole-turn auto-routing |
72
- | Profiles | Web | Web + Headless |
73
- | Playbooks | The pixel loop: ground → crop → diff → fix → screenshot again | Richer case library (long-screenshot OCR, UI restoration, GUI automation) |
74
- | Tests | 144 | 162 |
75
- | Install | One command | One command (npm) |
70
+ | | Manual model switching | MCP vision bridge | dsh-vision-router |
71
+ |---|---|---|---|
72
+ | Pixel fidelity | ✅ full (when switched) | ❌ text description only | ✅ full, on the image turn |
73
+ | Automatic | ❌ | ✅ | ✅ |
74
+ | Daily model untouched | ❌ (whole session swapped) | ✅ | ✅ |
75
+ | Provider failure recovery | ❌ | ❌ | ✅ fallback chains |
76
+ | Reusable structured queries | — | partial | ✅ JSON mode + caching |
77
+ | Free out-of-the-box | ❌ | ❌ | ✅ built-in keyless endpoint |
78
+ | Fits dsh composition | — | external server | ✅ one plugin row |
79
+
80
+ **Difference from existing dsh community projects** (all excellent, each with its own focus; descriptions reflect their READMEs as of 2026-08):
76
81
 
77
- Both are MIT-licensed and one command away. Pick this plugin when you want images to *just work* with zero setup; pick theirs when you need headless profiles or the extended playbook library. (Feature comparison reflects their README as of 2026-08.)
82
+ | Project | Approach | What this plugin adds |
83
+ |---|---|---|
84
+ | [dsh-vision-sidecar](https://github.com/121103qwq/dsh-vision-sidecar) | Pre-describes images with an external VLM; the description joins the session as a message to DeepSeek; LLM7.io anonymous endpoint by default (OVHcloud listed as a no-key alternative) | Description bridge; this plugin adds raw-image routing, with `vision_describe` covering descriptions on demand |
85
+ | [dsh-vision-proxy](https://github.com/Flyvhidbwo/dsh-vision-proxy) | Wraps a provider route and transcribes images into text in the request stream | Transcription bridge; this plugin wraps no provider — it rewrites routing through `agent/request` waterfalls |
86
+ | [dsh-vision-provider](https://github.com/libinyam/dsh-vision-provider) | Registers `DeepSeek + Vision` combined routes: images are described by the chosen vision model before reaching DeepSeek | Two-model bridge idea; this plugin adds automatic routing, fallback chains and tools on top |
87
+ | [modlens](https://github.com/liustack/modlens) | The first dsh vision plugin; reuses local Claude Code/Codex/OpenCode/Pi logins as vision engines | Engine-reuse idea; this plugin ships its own provider chain and depends on no other local CLI |
88
+ | [dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit) | Ten intent-aware visual tools (Q&A/OCR/pixel verification/UI restoration), called explicitly on demand | Broader tool set; this plugin adds whole-turn auto-routing and a keyless free fallback |
89
+ | [dsh-tool-vision](https://github.com/Scorp1o117/dsh-tool-vision) | An `inspect_image` tool plus an `agent/pre-step` waterfall bridge (pasted images become tool hints before entering the log) | Similar waterfall bridge; this plugin adds turn routing, fallback chains, caching and the free endpoint |
90
+
91
+ ## Acknowledgements
92
+
93
+ This project borrows ideas from all of the above — especially the keyless free-endpoint
94
+ exploration (LLM7.io and OVHcloud anonymous tiers) by
95
+ [dsh-vision-sidecar](https://github.com/121103qwq/dsh-vision-sidecar). Thanks to the authors of
96
+ [dsh-vision-proxy](https://github.com/Flyvhidbwo/dsh-vision-proxy),
97
+ [dsh-vision-provider](https://github.com/libinyam/dsh-vision-provider),
98
+ [modlens](https://github.com/liustack/modlens),
99
+ [dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit), and
100
+ [dsh-tool-vision](https://github.com/Scorp1o117/dsh-tool-vision).
78
101
 
79
102
  ## Quick start
80
103
 
@@ -121,7 +144,7 @@ The auto-vision group follows the live DSH model catalog. Adding models or chang
121
144
 
122
145
  After choosing the “+ Auto Vision” group, paste or upload an image normally. By default the complete vision tool schema is stable from session start, so the agent can immediately use `vision_describe`, `vision_ground`, `vision_crop`, and the rest across multiple steps when needed.
123
146
 
124
- The built-in anonymous OVH vision fallback is already configured, so normal image use needs no signup or API key. **The lower-right chat picker selects only the brain/conversation model**; vision backends do not belong there. Advanced options live under **Settings → Plugins → Plugin config → 视觉路由(自动识图)**: each vision-backend row selects one image-capable user model already configured under **Settings → Models**. Leaving every user row empty is valid; the OVH chain remains the final fallback. `Vision HTTP` is an internal transport route, not a model group users should select.
147
+ The built-in anonymous OVH vision fallback is already configured, so normal image use needs no signup or API key. **The lower-right chat picker selects only the brain/conversation model**; vision backends do not belong there. Advanced options live under **Settings → Plugins → Plugin config → 视觉路由(自动识图)**: each vision-backend row may select any callable generative user model already configured under **Settings → Models**. DSH image-capability metadata is advisory only: undeclared or text-only-labelled models remain selectable and show a warning. At runtime Vision Router always tries the provider's registered DSH adapter first — including WebSocket, RPC and private transports — and falls through on a real failure. The direct compatibility bridge is used only when an http(s) OpenAI Chat Completions endpoint is positively identified. Leaving every user row empty is valid; the OVH chain remains the final fallback. `Vision HTTP` is an internal transport route, not a model group users should select.
125
148
 
126
149
  ### See it in action
127
150
 
@@ -132,6 +155,27 @@ The built-in anonymous OVH vision fallback is already configured, so normal imag
132
155
  <img src="assets/dsh-conversation-image-qa-result.png" width="49%" alt="The agent's structured answer describing the image content." />
133
156
  </p>
134
157
 
158
+ ## Free vision key channels
159
+
160
+ The built-in OVH fallback is anonymous by design, and OVH caps anonymous use at **2 requests/minute per IP per model**. If that feels tight, every channel below offers **free vision models with much higher quotas** — all of them are free to register, and none charges for the free tier. Free policies rotate often; treat this table as an August 2026 snapshot and double-check each provider's console before relying on it.
161
+
162
+ | Channel | Free vision model(s) | Free quota | CN direct? | Where to get the key |
163
+ |---|---|---|---|---|
164
+ | OVHcloud AI Endpoints (access key) | `Qwen2.5-VL-72B-Instruct` — the same endpoint the built-in fallback uses | **400 req/min** per project per model (vs 2 anonymous) | ✅ | OVH account → Public Cloud project (attach a payment method; free models are not charged) → AI Endpoints access key |
165
+ | Zhipu (bigmodel.cn) | `glm-4.6v-flash` · `glm-4.1v-thinking-flash` · `glm-4v-flash` — three permanently free models; chaining them triples capacity | uncapped tokens | ✅ | open.bigmodel.cn → API keys |
166
+ | DashScope (Aliyun) | `qwen3-vl-flash` (limited-time free) and the Qwen-VL series | new users: 1M tokens per model series / 90 days | ✅ | bailian.console.aliyun.com |
167
+ | Intern AI (Shanghai AI Lab) | `internvl-latest` · `internvl3.5-latest` | 30 RPM, **90M tokens/month** | ✅ | chat.intern-ai.org.cn |
168
+ | Groq | `meta-llama/llama-4-scout-17b-16e-instruct` (native multimodal, up to 5 images) | 30 RPM / 14,400 req/day, no card | ❌ proxy | console.groq.com |
169
+ | Google AI Studio | `gemini-2.5-flash` · `gemini-2.5-flash-lite` | 10–30 RPM / 500–1,500 req/day | ❌ proxy | aistudio.google.com |
170
+ | NVIDIA NIM | `meta/llama-3.2-11b-vision-instruct` · `nvidia/nemotron-nano-12b-v2-vl` | 40 RPM, no card | ⚠️ | build.nvidia.com |
171
+ | OpenCode Zen | `mimo-v2.5-free` (vision + code) | 30 RPM / 500 req/day | ⚠️ | opencode.ai/zen |
172
+ | OpenRouter | `google/gemma-4-26b-a4b-it:free` · `google/gemma-4-31b-it:free` | 50 req/day on unpaid accounts | ❌ proxy | openrouter.ai |
173
+
174
+ Any of these channels can join the vision chain as an `httpProviders` entry (key in the matching environment variable or `~/.dsh/.credentials.yaml`), and the chain tries your entries before the anonymous fallback.
175
+
176
+ > [!NOTE]
177
+ > Free-tier policies change without notice — Cerebras retired its free tier in July 2026 (now a one-time $5 credit), SambaNova's free tier is down to 20 requests/day, and Hugging Face's is $0.10/month. Third-party “`:free` relay” aggregators are deliberately not listed: they rotate quickly, lack SLAs, and some resell quota in ways that violate upstream terms.
178
+
135
179
  ## Highlights
136
180
 
137
181
  - **Original pixels, real answers.** The vision chain reads the image at original resolution (auto-downscaled only to protect latency/quota); the agent's question travels with the image, so answers are about *your* question, not a generic description.
@@ -204,7 +248,7 @@ The vision tools try backends in order and surface an error only after all of th
204
248
 
205
249
  1. **User vision models**: one per settings row, top to bottom; only models under **Settings → Models** that explicitly declare image input are shown;
206
250
  2. **Advanced custom HTTP vision endpoints**: legacy/advanced `httpProviders`, when present, run after the user models;
207
- 3. **Built-in anonymous OVH fallback**: always last and never exposed in a model picker. The current quality-first chain is `Qwen3.5-397B-A17B` → `Qwen2.5-VL-72B-Instruct` → `Qwen3.6-27B` → `Mistral-Small-3.2-24B-Instruct-2506` → `Qwen3.5-9B`. OVH anonymous limits are **2 requests/minute per IP per model**. The five models have independent buckets, so spreading requests across them is about **10 RPM in theory**, subject to OVH's actual rate limiting. No signup or API key is required.
251
+ 3. **Built-in anonymous OVH fallback**: always last and never exposed in a model picker. The current quality-first chain is `Qwen3.5-397B-A17B` → `Qwen2.5-VL-72B-Instruct` → `Qwen3.6-27B` → `Mistral-Small-3.2-24B-Instruct-2506` → `Qwen3.5-9B`. OVH anonymous limits are **2 requests/minute per IP per model**. The five models have independent buckets, so spreading requests across them is about **10 RPM in theory**, subject to OVH's actual rate limiting. No signup or API key is required. Want more headroom? See [Free vision key channels](#free-vision-key-channels) — a free OVH access key lifts this same endpoint to 400 requests/minute.
208
252
 
209
253
  > [!IMPORTANT]
210
254
  > This “vision chain” is the **eyes** used by Vision Router: each settings row selects one user vision model, while the lower-right chat picker selects the **brain/conversation model**. The two are deliberately separate. Text-only DeepSeek/opencode models are filtered out of the vision-backend dropdown, and the internal `Vision HTTP` transport route is no longer exposed to users.
@@ -283,6 +327,7 @@ Everything is optional; defaults work out of the box. Edit via the Web card or a
283
327
  | `timeoutMs` | `120000` | per vision call deadline |
284
328
  | `artifactsDir` | `.dsh-vision-router/artifacts` | artifact directory (relative to the session workspace) |
285
329
  | `proxy` / `proxyHosts` | `''` / openrouter hosts | optional proxy for vision provider hosts only |
330
+ | `catalogCorrections` | `true` | built-in catalog-routing corrections: when the installed pi-ai catalog routes a known model to the wrong wire protocol (e.g. `opencode-go/qwen3.6-plus` to OpenAI chat completions while OpenCode Go only serves it on `/v1/messages`), the plugin answers that backend directly over the corrected protocol. Each correction disarms itself once the catalog is fixed upstream |
286
331
 
287
332
  ## Requirements
288
333
 
@@ -317,6 +362,25 @@ npx @deepseek-ai/dsh --profile web --dump-config | grep vision-router
317
362
 
318
363
  When first adding the plugin to an already long-lived Web profile, let that Web process reload the plugin bundle; the host discovers the browser bundle through `dsh.client` at startup. **After the plugin is loaded, model-catalog and wrapper-scope changes hot-update and do not require a restart.**
319
364
 
365
+ ### Oh-DSH Desktop
366
+
367
+ [Oh-DSH Desktop](https://github.com/hust-open-atom-club/oh-dsh) ships its own packaged DSH runtime and its own home layout: the desktop surface runs the `desktop` profile under `~/.ohdsh` and does **not** load ordinary `~/.dsh` profiles. The `--profile web` commands above therefore install into the wrong environment on that product.
368
+
369
+ Install into the desktop profile by pointing `DSH_HOME` at the Oh-DSH home:
370
+
371
+ ```sh
372
+ DSH_HOME=~/.ohdsh npx @deepseek-ai/dsh plugin --profile desktop add dsh-vision-router
373
+ ```
374
+
375
+ (Windows PowerShell: run `$env:DSH_HOME = "$env:USERPROFILE\.ohdsh"` first, then the same command.)
376
+
377
+ > [!WARNING]
378
+ > Oh-DSH Desktop ≤ 0.1.5 bundles DSH `0.1.0-rc.5`. `dsh-vision-router` v1.4.1 and earlier crash that runtime at startup (`configurable provider "deepseek-official" is already declared`, surfacing as `DSH runtime exited before readiness`). Install v1.4.2+.
379
+
380
+ If a broken install already keeps the Desktop from starting, open `~/.ohdsh/profiles/desktop/package.json`, remove the `dsh-vision-router` entry from both `dependencies` and `dsh.profile.bundles`, save, and restart the Desktop.
381
+
382
+ Oh-DSH Desktop's built-in plugin marketplace (search → prepare → isolated preview → apply, with a `previous` snapshot for recovery) also works once the community catalog lists this plugin; do not mix marketplace installs with the direct command above. The bundled `@oh-dsh/vision` (`view_image`) coexists with this plugin — the tool names do not collide.
383
+
320
384
  ### Disable / re-enable
321
385
 
322
386
  ```yaml
package/README.zh.md CHANGED
@@ -15,8 +15,8 @@
15
15
  </p>
16
16
 
17
17
  <p align="center">
18
- <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.4.1"><img src="https://img.shields.io/badge/release-v1.4.1-5B4CF0?style=flat-square" alt="Release v1.4.1" /></a>
19
- <a href="tests"><img src="https://img.shields.io/badge/verified-149%20tests-2EA44F?style=flat-square" alt="Verified: 149 tests" /></a>
18
+ <a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.4.3"><img src="https://img.shields.io/badge/release-v1.4.3-5B4CF0?style=flat-square" alt="Release v1.4.3" /></a>
19
+ <a href="tests"><img src="https://img.shields.io/badge/verified-257%20tests-2EA44F?style=flat-square" alt="Verified: 257 tests" /></a>
20
20
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="License: MIT" /></a>
21
21
  <a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&amp;logo=nodedotjs&amp;logoColor=white" alt="Node.js >=22" /></a>
22
22
  <img src="https://img.shields.io/badge/runtime-no%20Python-8A2BE2?style=flat-square" alt="No Python" />
@@ -28,9 +28,9 @@
28
28
  <p align="center">💬 <strong>QQ 用户交流群:1105463028</strong></p>
29
29
 
30
30
  > [!WARNING]
31
- > 📌 **公告(v1.4.1)**
31
+ > 📌 **公告(v1.4.3)**
32
32
  >
33
- > **v1.4.1 现已支持**:视觉失败链加固——单个视觉后端(401 / 429 / 故障)不再拖垮文本对话;熔断、共享任务预算与结构化失败结果让对话始终顺畅继续。
33
+ > **v1.4.3:自定义视觉后端改为运行时验证,支持 WebSocket/私有协议。**
34
34
 
35
35
  <p align="center">
36
36
  <img src="assets/vision-demo.gif" width="640" alt="演示:粘贴图片,Agent 用 vision_ground / vision_crop / vision_pixel_diff 定位发送按钮并给出坐标" />
@@ -40,7 +40,9 @@
40
40
 
41
41
  - [为什么做这个](#为什么做这个)
42
42
  - [对比同类插件](#对比同类插件)
43
+ - [致谢](#致谢)
43
44
  - [快速开始](#快速开始)
45
+ - [免费视觉 Key 渠道](#免费视觉-key-渠道)
44
46
  - [亮点](#亮点)
45
47
  - [工作原理](#工作原理)
46
48
  - [工具](#工具)
@@ -61,20 +63,39 @@
61
63
 
62
64
  ## 对比同类插件
63
65
 
64
- 最接近的同类是 [@anionex/dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit)(Anionex),它是知名 `agent-vision-toolkit` 系列的 DSH 原生版。两者都提供 `vision-tools` 技能和一组像素级工具,区别在理念:**零配置粘贴即用** vs **Agent 主导的视觉工程**:
66
+ **一句话讲清区别**:其他 dsh 视觉插件大多"把图片转成文字描述再喂给 DeepSeek"(描述桥,有信息损耗);
67
+ 本插件主打"**图片轮直接交给视觉模型看原图**"(路由桥,像素保真),同时内置免 Key 免费模型兜底。
65
68
 
66
- | | dsh-vision-router | @anionex/dsh-vision-toolkit |
67
- |---|---|---|
68
- | 开箱图片问答 | ✅ 内置免费视觉链(OVHcloud 匿名端点),免注册免 Key | 远程工具需自备视觉 API Key(本地像素工具免 Key) |
69
- | 运行时 | ✅ 纯 Node,无需 Python | 需要 Python 3.11+ 受管运行时 |
70
- | 图片怎么进来 | ✅ 选一次「+ 自动识图」模型组后直接粘贴 | 工作区路径 + `/vision-tools` 命令,再显式调用工具 |
71
- | 轮次路由 | ✅ 图片轮切视觉、文本轮切回 DeepSeek——可选隐身接管,模型选择器与官方一致 | 工具驱动,无整轮自动路由 |
72
- | 支持 profile | Web | Web + Headless |
73
- | 玩法库 | 像素循环:定位 → 裁剪 → 对比 → 修复 → 再截图 | 更丰富的案例库(长截图 OCR、UI 还原、GUI 自动化) |
74
- | 测试 | 144 | 162 |
75
- | 安装 | 一条命令 | 一条命令(npm) |
69
+ | | 手动切换模型 | MCP 视觉桥 | 本插件 |
70
+ |---|---|---|---|
71
+ | 像素保真 | ✅ 完整(切换后) | ❌ 只有文字描述 | ✅ 完整,图片轮内 |
72
+ | 自动化 | ❌ | ✅ | ✅ |
73
+ | 日常模型不受影响 | ❌(整会话被换) | ✅ | ✅ |
74
+ | 供应商失败恢复 | ❌ | ❌ | ✅ 降级链 |
75
+ | 可复用的结构化查询 | — | 部分 | ✅ JSON 模式 + 缓存 |
76
+ | 免费开箱即用 | ❌ | ❌ | ✅ 内置免 Key 免费端点 |
77
+ | 贴合 dsh 组合体系 | — | 外部服务器 | ✅ 一行插件行 |
78
+
79
+ **与现有 dsh 社区方案的差异**(均为优秀项目,各有侧重;描述以各家 README 2026-08 状态为准):
76
80
 
77
- 两者都是 MIT 许可、一条命令安装。想要图片**粘贴即用**、零配置就选本插件;需要 Headless 部署或更丰富的案例库,可以看 @anionex/dsh-vision-toolkit。(功能对比以其 README 2026-08 状态为准。)
81
+ | 项目 | 思路 | 本插件的差异 |
82
+ |---|---|---|
83
+ | [dsh-vision-sidecar](https://github.com/121103qwq/dsh-vision-sidecar) | 图片先经外部 VLM 做 OCR/描述,描述作为会话消息交给 DeepSeek;默认 LLM7.io 匿名端点(OVHcloud 为无 Key 备选) | 描述桥方案;本插件提供"原图直看"路由,描述能力由 `vision_describe` 按需替代 |
84
+ | [dsh-vision-proxy](https://github.com/Flyvhidbwo/dsh-vision-proxy) | 包装 provider 路由,请求流里把图片转译成文本再交给 DeepSeek | 转译桥方案;本插件不包装 provider,通过 `agent/request` 瀑布改写路由 |
85
+ | [dsh-vision-provider](https://github.com/libinyam/dsh-vision-provider) | 注册 `DeepSeek + Vision` 组合路由:图片先经所选视觉模型转成描述,再交给 DeepSeek | 双模型桥思路;本插件在此基础上增加自动路由、降级链与工具 |
86
+ | [modlens](https://github.com/liustack/modlens) | 最早的 dsh 视觉插件;复用本机 Claude Code/Codex/OpenCode/Pi 等登录态作为视觉引擎 | 引擎复用思路;本插件自带供应商链,不依赖本机其他 CLI |
87
+ | [dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit) | 10 个意图化视觉工具(Q&A/OCR/像素校验/UI 还原),按需显式调用 | 工具集更全;本插件多出整轮自动路由与免 Key 免费兜底 |
88
+ | [dsh-tool-vision](https://github.com/Scorp1o117/dsh-tool-vision) | `inspect_image` 工具 + `agent/pre-step` 瀑布图片桥(粘贴图入日志前转成工具提示) | 瀑布桥思路相近;本插件多出轮次路由、降级链、缓存与免费端点 |
89
+
90
+ ## 致谢
91
+
92
+ 本插件借鉴了以上全部社区项目的思路,特别是 [dsh-vision-sidecar](https://github.com/121103qwq/dsh-vision-sidecar)
93
+ 对免注册免 Key 视觉端点的探索(LLM7.io 与 OVHcloud 匿名层)。感谢
94
+ [dsh-vision-proxy](https://github.com/Flyvhidbwo/dsh-vision-proxy)、
95
+ [dsh-vision-provider](https://github.com/libinyam/dsh-vision-provider)、
96
+ [modlens](https://github.com/liustack/modlens)、
97
+ [dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit)、
98
+ [dsh-tool-vision](https://github.com/Scorp1o117/dsh-tool-vision) 作者们的探索。
78
99
 
79
100
  ## 快速开始
80
101
 
@@ -121,7 +142,7 @@ opencode-go + 自动识图 ← 发图片时选这个
121
142
 
122
143
  选好「+ 自动识图」模型组后,直接往对话里贴图即可。默认情况下完整视觉工具表从会话开始就保持稳定,Agent 可直接调用 `vision_describe`、`vision_ground`、`vision_crop` 等工具看图,需要时连续多步操作。
123
144
 
124
- 默认已经有内置 OVH 匿名视觉兜底,无需注册、无需 Key。**聊天页右下角只选择“脑子/会话模型”**;视觉模型不要在那里选。高级配置在 **设置 → 插件 → 插件配置 → 视觉路由(自动识图)**:视觉后端链每一行只选择一个你在 **设置 → 模型** 中已经配置且支持图片输入的用户模型;一行都不填也可以,OVH 免费链会固定在最后兜底。插件内部的 `Vision HTTP` 只是传输实现,不是用户需要选择的模型组。
145
+ 默认已经有内置 OVH 匿名视觉兜底,无需注册、无需 Key。**聊天页右下角只选择“脑子/会话模型”**;视觉模型不要在那里选。高级配置在 **设置 → 插件 → 插件配置 → 视觉路由(自动识图)**:视觉后端链每一行都可以选择 **设置 → 模型** 中任意可调用的生成式用户模型。DSH 的图片能力声明现在只作提示:未声明图片能力、甚至被标成仅文本的模型也会列出并给出警告。运行时永远先通过该供应商已注册的 DSH adapter 实际调用,因此 WebSocket、RPC 和私有协议都保留原生传输;只有明确识别为 http(s) OpenAI Chat Completions 的渠道才可能进入 HTTP 直连兼容兜底。实际调用失败后自动尝试下一后端;一行都不填也可以,OVH 免费链会固定在最后兜底。插件内部的 `Vision HTTP` 只是传输实现,不是用户需要选择的模型组。
125
146
 
126
147
  ### 实际效果
127
148
 
@@ -132,6 +153,27 @@ opencode-go + 自动识图 ← 发图片时选这个
132
153
  <img src="assets/dsh-conversation-image-qa-result.png" width="49%" alt="Agent 对图片内容的结构化解读。" />
133
154
  </p>
134
155
 
156
+ ## 免费视觉 Key 渠道
157
+
158
+ 内置 OVH 兜底是匿名设计,OVH 对匿名访问的限制是**每 IP、每模型 2 次/分钟**。觉得不够用时,下面这些渠道都有**免费且额度大得多的视觉模型**——全部免费注册,无需为免费档付费。免费政策轮换频繁,下表是 2026 年 8 月快照,依赖前请以各家控制台为准。
159
+
160
+ | 渠道 | 免费视觉模型 | 免费额度 | 大陆直连 | Key 领取 |
161
+ |---|---|---|---|---|
162
+ | OVHcloud AI Endpoints(access key) | `Qwen2.5-VL-72B-Instruct`——与内置兜底同一个端点 | **400 次/分钟**/项目/模型(对比匿名 2 次/分钟) | ✅ | 注册 OVH 账号 → Public Cloud 项目(需挂支付方式;免费模型不扣费)→ AI Endpoints access key |
163
+ | 智谱(bigmodel.cn) | `glm-4.6v-flash` · `glm-4.1v-thinking-flash` · `glm-4v-flash`——三个永久免费模型,串起来容量 ×3 | token 不限量 | ✅ | open.bigmodel.cn → API keys |
164
+ | 阿里云百炼 | `qwen3-vl-flash`(限免)与 Qwen-VL 系列 | 新用户每模型系列 100 万 token / 90 天 | ✅ | bailian.console.aliyun.com |
165
+ | Intern AI(上海AI实验室) | `internvl-latest` · `internvl3.5-latest` | 30 RPM,**9000 万 token/月** | ✅ | chat.intern-ai.org.cn |
166
+ | Groq | `meta-llama/llama-4-scout-17b-16e-instruct`(原生多模态,最多 5 张图) | 30 RPM / 14,400 次/天,免卡 | ❌ 需代理 | console.groq.com |
167
+ | Google AI Studio | `gemini-2.5-flash` · `gemini-2.5-flash-lite` | 10–30 RPM / 500–1,500 次/天 | ❌ 需代理 | aistudio.google.com |
168
+ | NVIDIA NIM | `meta/llama-3.2-11b-vision-instruct` · `nvidia/nemotron-nano-12b-v2-vl` | 40 RPM,免卡 | ⚠️ | build.nvidia.com |
169
+ | OpenCode Zen | `mimo-v2.5-free`(视觉 + 代码) | 30 RPM / 500 次/天 | ⚠️ | opencode.ai/zen |
170
+ | OpenRouter | `google/gemma-4-26b-a4b-it:free` · `google/gemma-4-31b-it:free` | 未充值账户 50 次/天 | ❌ 需代理 | openrouter.ai |
171
+
172
+ 以上渠道都能以 `httpProviders` 条目加入视觉链(Key 放对应环境变量或 `~/.dsh/.credentials.yaml`),链路会先尝试你的条目、再落到匿名兜底。
173
+
174
+ > [!NOTE]
175
+ > 免费政策随时可能调整——Cerebras 已在 2026 年 7 月取消免费档(改为一次性 $5 赠金),SambaNova 免费档收紧到 20 次/天,Hugging Face 只剩 $0.10/月。第三方“`:free` 中转”聚合站刻意不列入:轮换频繁、无 SLA,部分还存在违反上游条款的转售行为。
176
+
135
177
  ## 亮点
136
178
 
137
179
  - **原图像素,真实答案。** 视觉链按原始分辨率读图(仅为保护延迟/额度自动缩放);你的问题随图一起发送,答案围绕*你的问题*,而不是一段泛泛的描述。
@@ -204,7 +246,7 @@ vision_long_screenshot_ocr image="chat-log.png" chunkHeight=1200 overlap=120
204
246
 
205
247
  1. **用户视觉模型**:设置卡里一行一个,从上到下;只显示 **设置 → 模型** 中明确声明支持 image 输入的模型;
206
248
  2. **高级自定义 HTTP 视觉端点**:如果旧配置/高级配置中存在 `httpProviders`,在用户模型之后尝试;
207
- 3. **内置 OVH 匿名免费兜底**:固定最后尝试,不需要出现在任何模型选择器里。当前内置链按质量优先为 `Qwen3.5-397B-A17B` → `Qwen2.5-VL-72B-Instruct` → `Qwen3.6-27B` → `Mistral-Small-3.2-24B-Instruct-2506` → `Qwen3.5-9B`。OVH 匿名限额为 **每 IP、每模型 2 次/分钟**;5 个模型是独立限额,因此理论上分散请求可到约 **10 次/分钟**,实际仍以 OVH 当时的限流为准。免注册、免 Key。
249
+ 3. **内置 OVH 匿名免费兜底**:固定最后尝试,不需要出现在任何模型选择器里。当前内置链按质量优先为 `Qwen3.5-397B-A17B` → `Qwen2.5-VL-72B-Instruct` → `Qwen3.6-27B` → `Mistral-Small-3.2-24B-Instruct-2506` → `Qwen3.5-9B`。OVH 匿名限额为 **每 IP、每模型 2 次/分钟**;5 个模型是独立限额,因此理论上分散请求可到约 **10 次/分钟**,实际仍以 OVH 当时的限流为准。免注册、免 Key。想提额度?详见[免费视觉 Key 渠道](#免费视觉-key-渠道)——同一个端点挂免费 access key 后是 400 次/分钟。
208
250
 
209
251
  > [!IMPORTANT]
210
252
  > 这里的“视觉链”是 Vision Router 调用的**眼睛**:设置页里每一行只选一个用户视觉模型;聊天页右下角选择的是**脑子/会话模型**,两者完全分开。纯文本 DeepSeek / opencode 不会出现在视觉后端下拉里;内部 `Vision HTTP` 也不会再暴露给用户。
@@ -283,6 +325,7 @@ Web 配置页在 **设置 → 插件 → 插件配置** 下注册「视觉路由
283
325
  | `timeoutMs` | `120000` | 单次视觉调用超时 |
284
326
  | `artifactsDir` | `.dsh-vision-router/artifacts` | 产物目录(相对会话工作区) |
285
327
  | `proxy` / `proxyHosts` | `''` / openrouter 域名 | 仅视觉供应商域名可选的本地代理 |
328
+ | `catalogCorrections` | `true` | 内置目录纠错:当已安装的 pi-ai 目录把已知模型路由到错误协议时(例如 `opencode-go/qwen3.6-plus` 被指向 OpenAI chat completions,而 OpenCode Go 只在 `/v1/messages` 上提供该模型),插件直接按正确协议应答该后端;上游目录修复后每条纠错自动失效 |
286
329
 
287
330
  ## 环境要求
288
331
 
@@ -317,6 +360,25 @@ npx @deepseek-ai/dsh --profile web --dump-config | grep vision-router
317
360
 
318
361
  首次把插件装进已经长期运行的 Web profile 时,需要让 Web 进程重新加载插件本体;宿主在启动时通过 `dsh.client` 声明发现浏览器端包。**插件加载完成后,模型目录与包装范围的变化会热更新,不需要为这些变化重启。**
319
362
 
363
+ ### Oh-DSH Desktop
364
+
365
+ [Oh-DSH Desktop](https://github.com/hust-open-atom-club/oh-dsh) 自带一套独立打包的 DSH 运行时和独立的数据目录:桌面端实际运行的是 `~/.ohdsh` 下的 `desktop` profile,**不会**加载普通 `~/.dsh` 的 profile。因此上面 `--profile web` 的命令在 Oh-DSH Desktop 上会装错环境。
366
+
367
+ 把 `DSH_HOME` 指向 Oh-DSH 的数据目录再安装即可:
368
+
369
+ ```sh
370
+ DSH_HOME=~/.ohdsh npx @deepseek-ai/dsh plugin --profile desktop add dsh-vision-router
371
+ ```
372
+
373
+ (Windows PowerShell 先执行 `$env:DSH_HOME = "$env:USERPROFILE\.ohdsh"`,再运行同一命令。)
374
+
375
+ > [!WARNING]
376
+ > Oh-DSH Desktop ≤ 0.1.5 内置的是 DSH `0.1.0-rc.5`。`dsh-vision-router` v1.4.1 及更早版本会让该运行时在启动时崩溃(报 `configurable provider "deepseek-official" is already declared`,在 Oh-DSH Desktop 里表现为 `DSH runtime exited before readiness`)。请安装 v1.4.2+。
377
+
378
+ 如果错误安装已经导致 Desktop 无法启动:打开 `~/.ohdsh/profiles/desktop/package.json`,从 `dependencies` 和 `dsh.profile.bundles` 中删掉 `dsh-vision-router` 条目,保存后重启 Desktop。
379
+
380
+ Oh-DSH Desktop 内置的插件市场(搜索 → 准备 → 隔离预览 → 应用,并保留 `previous` 快照用于恢复)在社区目录收录本插件后同样可用;不要与上面的直接安装命令混用。其内置的 `@oh-dsh/vision`(`view_image`)与本插件可共存,工具名不冲突。
381
+
320
382
  ### 禁用 / 恢复
321
383
 
322
384
  ```yaml