← 返回列表
D

dsh-vision-guard

v0.1.3 · 2 天前发布

Transparent image guard + vision analysis for DeepSeek Harness: text-only models read pasted images without the 400 session deadlock.

dshdsh-plugindeepseek-harnessvisionimageocrguardmultimodal

README

dsh-vision-guard

中文 | English

让纯文本模型"看图",且图片永远不会卡死你的会话。

Transparent image guard + vision analysis tool for DeepSeek Harness (dsh).

DeepSeek Harness 的主流模型(deepseek-v4-pro 等)是纯文本模型。两个麻烦:

1. 纯文本模型看不了图——用户贴一张截图,模型只能当没看见;
2. 更糟的是 400 卡死:某些网关(如 opencode-go)的主路由只接受 text,图片块一旦写进会话日志,之后每一轮都会把历史连同图片重发给上游 → 400 unknown variant \image_url\`` → 整个会话永久卡死。

本插件用两道闸门根治这两个问题,并把"看图"变成纯文本模型可用文字消费的能力。

---

它做什么


用户贴图 → [闸门1] agent/pre-step 门口改写:图片在【写入会话日志之前】就被视觉模型转成文字
→ 日志永远只有文字,图片块根本不存在
→ [闸门2] llm/stream 兜底:历史重放时若发现图片块(例如装插件前就已中毒的会话),
在请求层改写为 OCR 文本后再发给模型
  • 视觉模型做眼睛,主模型做大脑:deepseek-v4-pro 照常推理,图片内容以文字形式出现在上下文里。

  • 修复已中毒的会话:装插件之前就被 400 卡死的会话,装上之后发
  • 查看完整 README →

    版本兼容矩阵

    DSH 版本状态说明
    dsh@0.1.0-rc.6 ✅ 兼容 cordis patch ✅
    dsh@0.1.0 ✅ 兼容 标准 patch ✅
    dsh@0.2.0 ⚠️ 待验证 待实测(API 可能在变)
    dsh@0.3.0+ ❓ 未知 尚未发布

    💡 兼容矩阵每周末自动跑实测,欢迎 PR 修正

    元数据

    License
    MIT
    npm
    dsh-vision-guard
    Repo
    git+https://github.com/good-boy4069/dsh-vision-guard.git
    Engines
    {"node":">=18"}
    Weekly DL
    0
    Monthly DL
    0
    dsh.bundle
    {"bundle":{"patch":"./cordis.patch.yml"}}