dsh-vision-router 1.0.1 → 1.1.0
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 +42 -21
- package/README.zh.md +42 -21
- package/cordis.patch.yml +13 -7
- package/index.js +450 -18
- package/lib/client.js +334 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="awesome · DSH plugin" /></a>
|
|
13
|
-
<a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.
|
|
14
|
-
<a href="tests"><img src="https://img.shields.io/badge/verified-
|
|
13
|
+
<a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.1.0"><img src="https://img.shields.io/badge/release-v1.1.0-5B4CF0?style=flat-square" alt="Release v1.1.0" /></a>
|
|
14
|
+
<a href="tests"><img src="https://img.shields.io/badge/verified-94%20tests-2EA44F?style=flat-square" alt="Verified: 94 tests" /></a>
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="License: MIT" /></a>
|
|
16
16
|
<a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js >=22" /></a>
|
|
17
17
|
<img src="https://img.shields.io/badge/runtime-no%20Python-8A2BE2?style=flat-square" alt="No Python" />
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
<p align="center">English · <a href="README.zh.md">中文</a></p>
|
|
22
22
|
|
|
23
|
+
> [!WARNING]
|
|
24
|
+
> 📌 **Announcement (v1.1.0)**
|
|
25
|
+
>
|
|
26
|
+
> Now supports **Extra vision wrappers**: any custom text route (e.g. opencode) sends images out of the box — plus long-screenshot OCR, a "Test connection" button and artifact preview cards in the settings panel. Stealth mode is off by default and the official DeepSeek row is no longer taken over implicitly.
|
|
27
|
+
|
|
23
28
|
<p align="center">
|
|
24
29
|
<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" />
|
|
25
30
|
</p>
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
|
|
29
34
|
Most DSH vision plugins bridge images to DeepSeek as *text descriptions* — lossy, one-shot, and blind to pixels. This plugin keeps the **original pixels on the vision model's side** and DeepSeek on the reasoning side, and makes looking at an image an **ordinary tool call**:
|
|
30
35
|
|
|
31
|
-
- **One command install
|
|
36
|
+
- **One command install.** The package ships its own composition patch (`dsh.bundle.patch`): `dsh plugin add` wires the row, the admission wrapper and the attachment limits automatically — zero manual file edits. Taking over the official DeepSeek route is an optional setting (stealth mode, off by default).
|
|
32
37
|
- **Free by default.** The vision chain starts with a built-in OVHcloud anonymous endpoint (`Qwen2.5-VL-72B-Instruct`, no account, no key, 2 req/min per IP). Paid chains (OpenRouter, Pi-AI providers, direct OpenAI-compatible endpoints) are optional upgrades.
|
|
33
38
|
- **No Python.** The whole pipeline — downscale, grounding, crop, pixel diff, palette, OCR, SVG trace, cutout, HTML screenshot — runs on sharp / potrace / tesseract / system Chrome.
|
|
34
39
|
- **Continuous multi-step image work.** An image turn is a text turn that calls tools: `vision_ground` → `vision_crop` → `vision_describe` → `vision_pixel_diff` → fix → screenshot again. The agent keeps iterating until the work is done.
|
|
@@ -37,19 +42,20 @@ Most DSH vision plugins bridge images to DeepSeek as *text descriptions* — los
|
|
|
37
42
|
|
|
38
43
|
## How it compares
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
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**:
|
|
41
46
|
|
|
42
|
-
| |
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
47
|
+
| | dsh-vision-router | @anionex/dsh-vision-toolkit |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| 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) |
|
|
50
|
+
| Runtime | ✅ Node only — no Python | Python 3.11+ managed runtime |
|
|
51
|
+
| Getting an image in | ✅ Paste it — the turn auto-routes to the vision chain and auto-mounts the tools | Workspace path + `/vision-tools` command, then explicit tool calls |
|
|
52
|
+
| 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 |
|
|
53
|
+
| Profiles | Web | Web + Headless |
|
|
54
|
+
| Playbooks | The pixel loop: ground → crop → diff → fix → screenshot again | Richer case library (long-screenshot OCR, UI restoration, GUI automation) |
|
|
55
|
+
| Tests | 86 | 162 |
|
|
56
|
+
| Install | One command | One command (npm) |
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
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.)
|
|
53
59
|
|
|
54
60
|
## Quick start
|
|
55
61
|
|
|
@@ -59,8 +65,9 @@ dsh plugin --profile web add dsh-vision-router
|
|
|
59
65
|
|
|
60
66
|
Restart `dsh web` — done. Zero configuration:
|
|
61
67
|
|
|
62
|
-
- the plugin's bundle patch mounts the row
|
|
68
|
+
- the plugin's bundle patch mounts the row, adds the admission wrapper and relaxes attachment limits to 20 MB / 100 MP — pure-additive, it never touches the core rows; whether the official DeepSeek route is taken over is decided by the optional stealth setting (off by default);
|
|
63
69
|
- the default vision chain is the built-in free endpoint;
|
|
70
|
+
- custom/third-party routes (e.g. opencode) gain image input through **Extra vision wrappers**;
|
|
64
71
|
- every setting is editable live in **Settings → Plugins → Plugin config → 视觉路由(自动识图)**.
|
|
65
72
|
|
|
66
73
|
Then just paste an image into a conversation. The agent mounts the vision tools automatically and looks at it through `vision_describe` (and friends) — multi-step if needed.
|
|
@@ -119,6 +126,7 @@ All ten deep tools mount automatically on image turns (`autoActivateOnImage`); t
|
|
|
119
126
|
| `vision_trace` | SVG vectorization (potrace posterization; icons/logos) | SVG |
|
|
120
127
|
| `vision_extract_foreground` | Cutout via border flood fill (uniform backgrounds) | transparent PNG |
|
|
121
128
|
| `vision_html_screenshot` | Screenshot a local HTML file (headless system Chrome) | PNG |
|
|
129
|
+
| `vision_long_screenshot_ocr` | Long-screenshot transcription: overlapping chunks, tesseract first / vision model fallback, stitched Markdown | chunk PNGs + Markdown + manifest |
|
|
122
130
|
|
|
123
131
|
Formats are sniffed from magic bytes, so extensionless content-addressed attachment files work everywhere (no `.png` renaming needed).
|
|
124
132
|
|
|
@@ -135,6 +143,7 @@ vision_colors image="ref.png" top=8
|
|
|
135
143
|
vision_trace image="icon.png" steps=4
|
|
136
144
|
vision_extract_foreground image="logo.png"
|
|
137
145
|
vision_html_screenshot source="page.html" width=1200 height=720
|
|
146
|
+
vision_long_screenshot_ocr image="chat-log.png" chunkHeight=1200 overlap=120
|
|
138
147
|
```
|
|
139
148
|
|
|
140
149
|
## Provider fallback chain
|
|
@@ -151,7 +160,9 @@ Failures are classified (region / tos / quota / rate-limit / context / network)
|
|
|
151
160
|
|
|
152
161
|
## Stealth mode
|
|
153
162
|
|
|
154
|
-
|
|
163
|
+
Stealth mode is **off by default** (explicit opt-in since issue #34): with it off, the official `deepseek-official` route stays untouched and image turns go through the visible "DeepSeek + 自动识图" wrapper entry in the picker.
|
|
164
|
+
|
|
165
|
+
With stealth on, the plugin takes over the official `deepseek-official` route: the model picker looks exactly like stock (same DeepSeek group, same model names), but each entry is the auto-vision wrapper that declares image input and delegates text turns to a rebuilt native DeepSeek adapter (same `llm-deepseek` settings section and credentials). Old sessions keep working through the hidden `deepseek-vision` alias. The takeover requires the stock row to be absent — disable it in your profile patch layer (`~/.dsh/profiles/<profile>/cordis.patch.yml`):
|
|
155
166
|
|
|
156
167
|
```yaml
|
|
157
168
|
- id: llm-deepseek
|
|
@@ -159,16 +170,25 @@ Failures are classified (region / tos / quota / rate-limit / context / network)
|
|
|
159
170
|
disabled: true
|
|
160
171
|
```
|
|
161
172
|
|
|
162
|
-
|
|
173
|
+
With the stock row present, the plugin falls back to the visible wrapper entry. Conversely, with stealth off but the stock row still disabled, the plugin performs a keep-alive takeover so the DeepSeek models don't vanish (the settings card explains this); to restore the fully official route, flip the `disabled` above back to `false` and restart.
|
|
174
|
+
|
|
175
|
+
> Stealth mode **only affects the official DeepSeek route**. Custom/third-party routes like opencode are unrelated — use **Extra vision wrappers** below to give them image input.
|
|
176
|
+
|
|
177
|
+
## Extra vision wrappers
|
|
178
|
+
|
|
179
|
+
`wrappedProviders` registers an auto-vision twin for any third-party/custom text route: pick the twin in the model selector and send images; text turns delegate to the original route unchanged. The typical use case is a custom interface such as opencode — it only declares text input, and one wrapper row makes it image-ready. In the settings card, configure it with two dropdowns (provider + model); leaving the model empty wraps every model of that route.
|
|
163
180
|
|
|
164
181
|
## Web settings
|
|
165
182
|
|
|
166
183
|
The Web profile registers a **视觉路由(自动识图)** card under **Settings → Plugins → Plugin config**, styled like the built-in cards. It live-edits:
|
|
167
184
|
|
|
168
|
-
- switches: whole-turn legacy routing, vision tools, image-block rewriting, stealth;
|
|
185
|
+
- switches: whole-turn legacy routing, vision tools, image-block rewriting, stealth (official DeepSeek route only);
|
|
186
|
+
- **extra vision wrappers**: provider + model dropdowns that register image-capable twin entries for custom routes such as opencode;
|
|
169
187
|
- vision request timeout, wrapper/chain route names;
|
|
170
188
|
- the **vision chain** (one `provider/model` per line, top-down fallback) and the text model;
|
|
171
|
-
- every field shows an "overridden" badge with a one-click reset to the composition default, plus discard/save
|
|
189
|
+
- every field shows an "overridden" badge with a one-click reset to the composition default, plus discard/save;
|
|
190
|
+
- a **Test connection** button probes the first vision provider and reports latency inline;
|
|
191
|
+
- artifact-producing tools render dedicated call cards with result facts and open-file buttons.
|
|
172
192
|
|
|
173
193
|
<p align="center">
|
|
174
194
|
<img src="assets/vision-settings.png" width="72%" alt="The vision-router card in Settings > Plugins > Plugin config." />
|
|
@@ -184,12 +204,13 @@ Everything is optional; defaults work out of the box. Edit via the Web card or a
|
|
|
184
204
|
|---|---|---|
|
|
185
205
|
| `provider` / `model` | `vision-http` / `ovh/Qwen2.5-VL-72B-Instruct` | shorthand chain (adapter-backed provider + model) |
|
|
186
206
|
| `fallbacks` | `[]` | backup models for the shorthand provider |
|
|
187
|
-
| `providers` | `
|
|
207
|
+
| `providers` | built-in free `vision-http` pair | multi-provider chain `{ provider, model, fallbacks[] }`, tried in order; wins over the shorthand. The first row ships as the built-in free model |
|
|
188
208
|
| `httpProviders` | built-in OVH entry | direct OpenAI-compatible endpoints `{ name, baseURL, model, apiKeyEnv, maxTokens }` |
|
|
209
|
+
| `wrappedProviders` | `[{ provider: 'deepseek-official', models: [] }]` | extra text routes to wrap as image-capable twins: `{ provider, models[] }` — registers an auto-vision twin for any custom/third-party route (e.g. opencode); in the card, provider + model dropdowns, empty model = wrap all. The pre-filled deepseek-official row marks the built-in wrapper and is a no-op; changes apply live |
|
|
189
210
|
| `routing` | `false` | legacy whole-turn chain routing (one-shot answer). `false` = tools-first flow (recommended) |
|
|
190
211
|
| `reverseRouting` | `true` | with `routing: true`, route text turns back to `textProvider` |
|
|
191
212
|
| `wrapperRoute` / `chainRoute` | `deepseek-vision` / `vision-chain` | admission wrapper route name / fallback chain route name (empty disables) |
|
|
192
|
-
| `stealth` | `
|
|
213
|
+
| `stealth` | `false` | take over the official `deepseek-official` route (official row only; custom routes use `wrappedProviders`) |
|
|
193
214
|
| `textProvider` | `deepseek-official` / `deepseek-v4-pro` | the model that reasons (your daily model) |
|
|
194
215
|
| `tool` / `progressiveTools` / `autoActivateOnImage` | `true` ×3 | vision tools on / progressive mounting / auto-mount on image turns |
|
|
195
216
|
| `rewriteImages` | `true` | rewrite image blocks in the model input (cached description or tool-hint marker); the UI log keeps images |
|
package/README.zh.md
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<a href="https://awesome-dsh-plugin.com"><img src="https://awesome-dsh-plugin.com/badge.svg" alt="awesome · DSH plugin" /></a>
|
|
13
|
-
<a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.
|
|
14
|
-
<a href="tests"><img src="https://img.shields.io/badge/verified-
|
|
13
|
+
<a href="https://github.com/ysr666/dsh-vision-router/releases/tag/v1.1.0"><img src="https://img.shields.io/badge/release-v1.1.0-5B4CF0?style=flat-square" alt="Release v1.1.0" /></a>
|
|
14
|
+
<a href="tests"><img src="https://img.shields.io/badge/verified-94%20tests-2EA44F?style=flat-square" alt="Verified: 94 tests" /></a>
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-2EA44F?style=flat-square" alt="License: MIT" /></a>
|
|
16
16
|
<a href="package.json"><img src="https://img.shields.io/badge/Node.js-%3E%3D22-339933?style=flat-square&logo=nodedotjs&logoColor=white" alt="Node.js >=22" /></a>
|
|
17
17
|
<img src="https://img.shields.io/badge/runtime-no%20Python-8A2BE2?style=flat-square" alt="No Python" />
|
|
@@ -20,6 +20,11 @@
|
|
|
20
20
|
|
|
21
21
|
<p align="center"><a href="README.md">English</a> · 中文</p>
|
|
22
22
|
|
|
23
|
+
> [!WARNING]
|
|
24
|
+
> 📌 **公告(v1.1.0)**
|
|
25
|
+
>
|
|
26
|
+
> 现已支持「**额外识图包装**」:opencode 等任意自定义文本路由开箱即可发图;另含长截图 OCR、设置卡片「测试连接」与视觉产物预览卡。隐身模式默认关闭,官方 DeepSeek 行不再被默认接管。
|
|
27
|
+
|
|
23
28
|
<p align="center">
|
|
24
29
|
<img src="assets/vision-demo.gif" width="640" alt="演示:粘贴图片,Agent 用 vision_ground / vision_crop / vision_pixel_diff 定位发送按钮并给出坐标" />
|
|
25
30
|
</p>
|
|
@@ -28,7 +33,7 @@
|
|
|
28
33
|
|
|
29
34
|
大多数 DSH 视觉插件把图片“翻译”成一段文字描述再喂给 DeepSeek——有损、一次性、看不见像素。本插件把**原图像素留在视觉模型侧**、把推理留在 DeepSeek 侧,并把“看图”变成一次**普通的工具调用**:
|
|
30
35
|
|
|
31
|
-
-
|
|
36
|
+
- **一条命令安装。** 包自带组合补丁(`dsh.bundle.patch`):`dsh plugin add` 自动完成插件行挂载、准入包装与附件限制放宽——不用手改任何文件。是否接管官方 DeepSeek 路由由「隐身模式」开关决定(默认关)。
|
|
32
37
|
- **默认免费。** 视觉链内置 OVHcloud 匿名端点(`Qwen2.5-VL-72B-Instruct`,免注册、免 Key,每 IP 2 次/分钟)。付费链路(OpenRouter、Pi-AI 供应商、任意 OpenAI 兼容直连端点)是可选升级。
|
|
33
38
|
- **无 Python。** 整条管线——缩放、定位、裁剪、像素对比、取色、OCR、SVG 矢量化、抠图、HTML 截图——全部基于 sharp / potrace / tesseract / 系统 Chrome。
|
|
34
39
|
- **可连续多步看图。** 图片轮 = 调用工具的文本轮:`vision_ground` → `vision_crop` → `vision_describe` → `vision_pixel_diff` → 修复 → 再截图,Agent 可以一直迭代到任务完成。
|
|
@@ -37,19 +42,20 @@
|
|
|
37
42
|
|
|
38
43
|
## 对比同类插件
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
最接近的同类是 [@anionex/dsh-vision-toolkit](https://github.com/Anionex/dsh-vision-toolkit)(Anionex),它是知名 `agent-vision-toolkit` 系列的 DSH 原生版。两者都提供 `vision-tools` 技能和一组像素级工具,区别在理念:**零配置粘贴即用** vs **Agent 主导的视觉工程**:
|
|
41
46
|
|
|
42
|
-
| |
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
50
|
-
|
|
|
47
|
+
| | dsh-vision-router | @anionex/dsh-vision-toolkit |
|
|
48
|
+
|---|---|---|
|
|
49
|
+
| 开箱图片问答 | ✅ 内置免费视觉链(OVHcloud 匿名端点),免注册免 Key | 远程工具需自备视觉 API Key(本地像素工具免 Key) |
|
|
50
|
+
| 运行时 | ✅ 纯 Node,无需 Python | 需要 Python 3.11+ 受管运行时 |
|
|
51
|
+
| 图片怎么进来 | ✅ 直接粘贴——轮次自动切视觉链并自动挂载工具 | 工作区路径 + `/vision-tools` 命令,再显式调用工具 |
|
|
52
|
+
| 轮次路由 | ✅ 图片轮切视觉、文本轮切回 DeepSeek——可选隐身接管,模型选择器与官方一致 | 工具驱动,无整轮自动路由 |
|
|
53
|
+
| 支持 profile | Web | Web + Headless |
|
|
54
|
+
| 玩法库 | 像素循环:定位 → 裁剪 → 对比 → 修复 → 再截图 | 更丰富的案例库(长截图 OCR、UI 还原、GUI 自动化) |
|
|
55
|
+
| 测试 | 86 | 162 |
|
|
56
|
+
| 安装 | 一条命令 | 一条命令(npm) |
|
|
51
57
|
|
|
52
|
-
|
|
58
|
+
两者都是 MIT 许可、一条命令安装。想要图片**粘贴即用**、零配置就选本插件;需要 Headless 部署或更丰富的案例库,可以看 @anionex/dsh-vision-toolkit。(功能对比以其 README 2026-08 状态为准。)
|
|
53
59
|
|
|
54
60
|
## 快速开始
|
|
55
61
|
|
|
@@ -59,8 +65,9 @@ dsh plugin --profile web add dsh-vision-router
|
|
|
59
65
|
|
|
60
66
|
重启 `dsh web`——完成,零配置:
|
|
61
67
|
|
|
62
|
-
- 插件的 bundle
|
|
68
|
+
- 插件的 bundle 补丁自动挂载插件行、挂上准入包装并放宽附件限制到 20MB / 1 亿像素——纯增量、不碰核心行;是否接管官方 DeepSeek 路由由「隐身模式」开关决定(默认关);
|
|
63
69
|
- 默认视觉链就是内置免费端点;
|
|
70
|
+
- opencode 等自定义/第三方路由用「额外识图包装」获得发图能力;
|
|
64
71
|
- 全部配置可在 **设置 → 插件 → 插件配置 → 视觉路由(自动识图)** 实时修改。
|
|
65
72
|
|
|
66
73
|
然后直接往对话里贴一张图。Agent 自动挂载视觉工具,通过 `vision_describe`(以及其余 8 个工具)看图,需要时连续多步。
|
|
@@ -119,6 +126,7 @@ Agent 仅根据参考图复刻 UI,再用 `vision_pixel_diff` 验证最终结
|
|
|
119
126
|
| `vision_trace` | SVG 矢量化(potrace 分色;图标/logo) | SVG |
|
|
120
127
|
| `vision_extract_foreground` | 边界洪泛抠图(纯色背景) | 透明 PNG |
|
|
121
128
|
| `vision_html_screenshot` | 给本地 HTML 文件截图(无头系统 Chrome) | PNG |
|
|
129
|
+
| `vision_long_screenshot_ocr` | 长截图转写:重叠分片,tesseract 优先 / 视觉模型回退,按序拼接 Markdown | 分片 PNG + Markdown + manifest |
|
|
122
130
|
|
|
123
131
|
图片格式按**魔数识别**,无扩展名的内容寻址附件文件也能直接用(不用再复制成 `.png`)。
|
|
124
132
|
|
|
@@ -135,6 +143,7 @@ vision_colors image="ref.png" top=8
|
|
|
135
143
|
vision_trace image="icon.png" steps=4
|
|
136
144
|
vision_extract_foreground image="logo.png"
|
|
137
145
|
vision_html_screenshot source="page.html" width=1200 height=720
|
|
146
|
+
vision_long_screenshot_ocr image="chat-log.png" chunkHeight=1200 overlap=120
|
|
138
147
|
```
|
|
139
148
|
|
|
140
149
|
## 供应商降级链
|
|
@@ -151,7 +160,9 @@ vision_html_screenshot source="page.html" width=1200 height=720
|
|
|
151
160
|
|
|
152
161
|
## 隐身模式
|
|
153
162
|
|
|
154
|
-
|
|
163
|
+
隐身模式默认**关闭**(issue #34 起显式 opt-in):关闭时官方 `deepseek-official` 路由原样保留,发图走选择器里可见的「DeepSeek + 自动识图」包装入口。
|
|
164
|
+
|
|
165
|
+
开启隐身模式后,插件接管官方 `deepseek-official` 路由:模型选择器看起来和原版完全一样(同一个 DeepSeek 组、同样的模型名),但每个条目背后都是声明了图片输入的自动识图包装;文字轮交给插件重建的原生 DeepSeek 适配器(读取同一个 `llm-deepseek` 设置段与凭据)。老会话通过隐藏的 `deepseek-vision` 别名继续工作。接管的前提是官方行不在场——在你的 profile 补丁层(`~/.dsh/profiles/<profile>/cordis.patch.yml`)禁用即可:
|
|
155
166
|
|
|
156
167
|
```yaml
|
|
157
168
|
- id: llm-deepseek
|
|
@@ -159,16 +170,25 @@ vision_html_screenshot source="page.html" width=1200 height=720
|
|
|
159
170
|
disabled: true
|
|
160
171
|
```
|
|
161
172
|
|
|
162
|
-
|
|
173
|
+
官方行在场时,插件自动回退为可见包装入口。反过来,隐身模式关闭但官方行仍被禁用时,插件会做 keep-alive 兜底接管,保住 DeepSeek 模型(设置卡片会给出提示);想完全恢复官方原生行,把上面的 `disabled` 改回 `false` 再重启即可。
|
|
174
|
+
|
|
175
|
+
> 隐身模式**只作用于官方 DeepSeek 路由**。opencode 等自定义/第三方文本路由与隐身模式无关——用「额外识图包装」让它们支持发图。
|
|
176
|
+
|
|
177
|
+
## 额外识图包装
|
|
178
|
+
|
|
179
|
+
`wrappedProviders` 给任意第三方/自定义文本路由注册「自动识图」孪生条目:模型选择器里选中它就能发图,文字轮原样交给原路由处理。典型用法是 opencode 等接入的自定义接口——它们默认只声明文本输入,加一行包装即可直接发图。设置卡片里用两个下拉(provider + 模型)配置;模型留空 = 包装该路由的全部模型,同一 provider 要包装多个模型就添加多行。
|
|
163
180
|
|
|
164
181
|
## Web 设置
|
|
165
182
|
|
|
166
183
|
Web 配置页在 **设置 → 插件 → 插件配置** 下注册「视觉路由(自动识图)」卡片,样式与内置卡片一致,可实时修改:
|
|
167
184
|
|
|
168
|
-
-
|
|
185
|
+
- 开关:整轮自动路由(旧模式)、识图工具、图片块改写、隐身模式(仅官方 DeepSeek 路由);
|
|
186
|
+
- **额外识图包装**:provider + 模型双下拉,给 opencode 等自定义路由注册可发图的孪生条目;
|
|
169
187
|
- 视觉请求超时、包装/链路由名;
|
|
170
188
|
- **视觉模型链**(每行一个 `provider/model`,自上而下降级)与文本模型;
|
|
171
|
-
-
|
|
189
|
+
- 每个字段都有「已覆盖」徽标与一键恢复组合默认,以及放弃/保存;
|
|
190
|
+
- 「测试连接」按钮探测第一个视觉提供方并内联显示延迟/失败原因;
|
|
191
|
+
- 产出制品的工具在对话里渲染专用调用卡(关键字段 + 打开文件按钮)。
|
|
172
192
|
|
|
173
193
|
<p align="center">
|
|
174
194
|
<img src="assets/vision-settings.png" width="72%" alt="设置 → 插件 → 插件配置 里的视觉路由卡片。" />
|
|
@@ -184,12 +204,13 @@ Web 配置页在 **设置 → 插件 → 插件配置** 下注册「视觉路由
|
|
|
184
204
|
|---|---|---|
|
|
185
205
|
| `provider` / `model` | `vision-http` / `ovh/Qwen2.5-VL-72B-Instruct` | 简写链路(有适配器的供应商 + 模型) |
|
|
186
206
|
| `fallbacks` | `[]` | 简写供应商的备用模型 |
|
|
187
|
-
| `providers` | `
|
|
207
|
+
| `providers` | 内置免费 `vision-http` 条目 | 多供应商链路 `{ provider, model, fallbacks[] }`,按序尝试;优先于简写形式。第一行开箱预置内置免费模型 |
|
|
188
208
|
| `httpProviders` | 内置 OVH 条目 | OpenAI 兼容直连端点 `{ name, baseURL, model, apiKeyEnv, maxTokens }` |
|
|
209
|
+
| `wrappedProviders` | `[{ provider: 'deepseek-official', models: [] }]` | 额外识图包装:`{ provider, models[] }`,给 opencode 等任意第三方/自定义文本路由注册可发图的孪生条目(卡片里 provider + 模型双下拉;模型留空 = 包装全部)。预置的 deepseek-official 条目标记内置包装、无副作用;改动即时生效 |
|
|
189
210
|
| `routing` | `false` | 旧版整轮链路由(一次性整轮回答)。`false` = 工具优先流程(推荐) |
|
|
190
211
|
| `reverseRouting` | `true` | 开启 `routing` 时,文字轮路由回 `textProvider` |
|
|
191
212
|
| `wrapperRoute` / `chainRoute` | `deepseek-vision` / `vision-chain` | 准入包装路由名 / 降级链路由名(置空关闭) |
|
|
192
|
-
| `stealth` | `
|
|
213
|
+
| `stealth` | `false` | 接管官方 `deepseek-official` 路由(仅官方行;自定义路由用 `wrappedProviders`) |
|
|
193
214
|
| `textProvider` | `deepseek-official` / `deepseek-v4-pro` | 负责思考的模型(你的日常模型) |
|
|
194
215
|
| `tool` / `progressiveTools` / `autoActivateOnImage` | `true` ×3 | 视觉工具开关 / 渐进式挂载 / 图片轮自动挂载 |
|
|
195
216
|
| `rewriteImages` | `true` | 模型输入层改写图片块(缓存描述或工具提示标记);界面日志保留图片 |
|
package/cordis.patch.yml
CHANGED
|
@@ -4,13 +4,19 @@
|
|
|
4
4
|
# without any manual cordis.patch.yml edits. Later layers (the profile's own
|
|
5
5
|
# cordis.patch.yml, --patch overlays) override these rows by id.
|
|
6
6
|
|
|
7
|
-
#
|
|
8
|
-
#
|
|
9
|
-
#
|
|
10
|
-
|
|
11
|
-
#
|
|
12
|
-
#
|
|
13
|
-
# 自动替用户禁用核心行(issue #34)。
|
|
7
|
+
# 纯增量补丁(issue #34):不碰核心行。官方 llm-deepseek 行保持原样,插件
|
|
8
|
+
# 挂载后是否接管官方 deepseek-official 路由由设置里的「隐身模式」开关决定
|
|
9
|
+
# (默认关;开启后需自行在 profile 补丁层禁用 llm-deepseek 行)。
|
|
10
|
+
|
|
11
|
+
# 挂载插件行。配置全部可选(默认即内置免费视觉端点 + 工具优先的图片流程),
|
|
12
|
+
# 可在 Web 设置 > 插件 > 插件配置 的「视觉路由」卡片里实时修改。
|
|
14
13
|
- insert:
|
|
15
14
|
- id: vision-router
|
|
16
15
|
name: dsh-vision-router
|
|
16
|
+
|
|
17
|
+
# 放宽附件图片限制(部署默认 5MB / 4000 万像素 → 20MB / 1 亿像素),
|
|
18
|
+
# 大尺寸设计稿/扫描图可过审。字段可选,不需要可在 profile 补丁层覆写。
|
|
19
|
+
- id: attachment-local
|
|
20
|
+
config:
|
|
21
|
+
maxImageBytes: 20971520
|
|
22
|
+
maxImagePixels: 100000000
|