Leeminjing/dsh-eyes1

dsh-eyes

On-demand vision for text-only LLMs in DeepSeek Harness: keep pasted/attached images in the backend, and let the model call view_image to look at them anytime via any OpenAI-compatible vision endpoint — as if the model were natively multimodal.

包名
dsh-eyes
版本
0.1.0
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Leeminjing/dsh-eyes

2) 配置 API Key(Windows;换成你所用视觉提供商的 key)

setx VISION_API_KEY "sk-你的key"

3) 配置视觉模型(必填,换成你账号里可用的视觉模型)

setx VISION_MODEL "qwen-vl-plus"

4) 配置接口端点(默认百炼;换其他 OpenAI 兼容提供商时必改)

setx VISION_ENDPOINT "https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions"

使用

  1. 在会话里粘贴一张图片(Ctrl+V)或拖拽/点附件;
  2. 发一句问题,例如「这张图里写了什么?」;
  3. 主模型收到的是「图片引用说明」,它需要看图时会自动调 view_image(attachment_id=…)
  4. view_image 用视觉模型提取图片内容,主模型基于这些文字回答。

你可以在后续任意一轮继续追问同一张图(「再看一下图里第二行的数字」),图片一直留在后台,可反复查看。

配置

配置项环境变量默认值
API KeyVISION_API_KEY(必填)
视觉模型VISION_MODEL(必填,无默认)
接口端点VISION_ENDPOINThttps://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
API 风格VISION_API_STYLEauto(按端点路径自动判断)
目标主模型—(代码内 targetProviderdeepseek-official
本地图片大小上限(image_path—(代码内 maxImageBytes15 MB

粘贴/附件图片的大小受 Harness 附件存储限制(默认 5 MB),与上表「本地文件」上限无关。

同时支持 Chat Completions 与 Responses APIVISION_API_STYLE 取值 auto(默认)/ chat / responses

  • auto:按端点路径自动识别——.../chat/completions → Chat Completions,.../responses → Responses API;裸 base URL 默认 Chat Completions 并自动补全路径。
  • chat / responses:强制指定,插件会把端点路径自动归一化到对应协议。 请求体与响应解析都随风格切换(messages/image_urlinput/input_image),对使用方式完全透明,切换无需任何改动。

常见 OpenAI 兼容视觉提供商:

提供商端点模型示例
阿里云百炼https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completionsqwen-vl-plus / qwen-vl-max
OpenAIhttps://api.openai.com/v1/chat/completionsgpt-4o / gpt-4o-mini
Moonshothttps://api.moonshot.cn/v1/chat/completionsmoonshot-v1-8k-vision-preview
OpenRouterhttps://openrouter.ai/api/v1/chat/completionsqwen/qwen2.5-vl-72b-instruct

也可在 cordis.patch.yml 里给该行传 config(会覆盖默认值 / 环境变量):

- insert:
    - id: dsh-eyes
      name: dsh-eyes
      config:
        apiKey: sk-xxx          # 同 VISION_API_KEY
        model: qwen-vl-plus     # 同 VISION_MODEL
        # endpoint, targetProvider, maxImageBytes 同理