Bundle
dsh-vision-autoswitch
DeepSeek Harness plugin: auto-route image-bearing requests to deepseek-v4-flash-vision-exp, then fall back to the original model.
- Source
- CultOfLuna
- stars
- 1 stars
- License
- MIT
- Updated
- Updated yesterday
Readme
# dsh-vision-autoswitch
> **DeepSeek 的"自动挡":有图切 Vision,无图回 Pro/Flash,一键都不用点。**
>
> **DeepSeek's "automatic transmission": image in → Vision, image out → back to Pro/Flash — not a single click.**
DeepSeek Harness 插件:当输入包含图片时,临时把当前回合切换到视觉模型
`deepseek-v4-flash-vision-exp` 处理;该回合结束后**自动回落**到你原来的模型。
模型栏所见即所得(`visibleSwitch` 默认开启),当前实际模型与 UI 显示始终一致。
> A DeepSeek Harness plugin: when a request carries an image, route that turn to
> the vision model `deepseek-v4-flash-vision-exp`, then automatically fall back
> to your original model when the turn ends. The model bar always reflects the
> actual model in use (WYSIWYG).
## 功能 / Features
- **图片 → 视觉模型**:当前回合出现图片(用户附件或工具结果里的截图)即切到
`deepseek-v4-flash-vision-exp`,让图片真正被理解。
- **回合结束即回落**:`turn/end` 后立即回到你原选的模型,不依赖下一条输入再检测;
长对话也不失灵。
- **所见即所得**:模型栏同步显示切换与回落;实际分发模型与 UI 一致,不会卡在视觉模型。
- **无需改模型选择**:不写入你原本的模型选择,纯文本回合仍由你选的高能力模型承担。
- **回落目标跟随你的选择**:回落回到你**当前手动选择**的模型(不写死某个模型)。
## 工作原理 / How it works
1. 在 `agent/request` 阶段检测当前回合是否含图(`contentHasImage`),含图则把
`provider/model` 改写为视觉模型;
2. 按会话记住最近一次「非视觉模型」作为回落目标(避免被视觉请求头污染);
3. 监听 `turn/end`,回合结束后写入 `model/selection` 恢复原模型。
## 安装 / Install
把插件装入 profile 的 `node_modules`,并在该 profile 的 `cordis.patch.yml`
追加:
```yaml
- insert:
- id: vision-autoswitch
name: 'dsh-vision-autoswitch'
```
profile 默认 `patchReload: live`,保存后约 1 秒热重载;改插件代码需重启 DSH Desktop。
## 配置 / Config
| 字段 | 默认值 | 说明 |
| ---------------- | ----------------------- | ------------------------------------------- |
| `enabled` | `true` | 总开关 |
| `visionProvider` | `deepseek-official` | 视觉模型所属 provider |
| `visionModel` | `deepseek-v4-flash-vision-exp` | 视觉模型 |
| `providers` | `["deepseek-official"]` | 允许拦截的 provider |
| `visibleSwitch` | `true` | 模型栏跟随切换/回落(所见即所得) |
## License
MIT
Install
dsh plugin --profile web add github:CultOfLuna/dsh-vision-autoswitch
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-vision-autoswitch from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.