Favio8/dsh-plugin-deepeye ↗★ 4
dsh-plugin-deepeye
DeepSeek Harness native plugin: vision capabilities for text-only LLMs (describe, OCR, VQA, layout analysis, clipboard)
AI Analysis
核心用途是为不具备多模态能力的纯文本模型外挂视觉解析工具。适合需要对图片、屏幕截图或剪贴板图像进行 OCR 和视觉问答的混合任务。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Favio8/dsh-plugin-deepeyeREADME
Read the full README ↗配置
API Key 解析优先级
插件支持多层 API Key 解析,用户可以选择最方便的方式:
- cordis.yml 显式配置 —
config.apiKey: !!js process.env.XXX - 自动环境变量回退 — 根据
provider自动匹配对应环境变量 - 通用变量 —
DEEPEYE_API_KEY(适用于所有 provider)
| provider | 自动回退的环境变量 |
|---|---|
openai | OPENAI_API_KEY |
gemini | GEMINI_API_KEY |
custom | DEEPEYE_API_KEY |
最简配置:只需设置环境变量,无需在 cordis.yml 中显式写 apiKey:
### 使用 OpenAI
```yaml
- id: deepeye-vision
name: 'dsh-plugin-deepeye'
config:
provider: openai
# apiKey: !!js process.env.OPENAI_API_KEY # 可省略,自动回退
model: gpt-4o # 可选,默认 gpt-4o
# baseUrl: '' # 可选,代理或 Azure 端点
使用 Gemini
- id: deepeye-vision
name: 'dsh-plugin-deepeye'
config:
provider: gemini
model: gemini-2.0-flash # 可选,默认 gemini-2.0-flash
使用智谱 GLM-4V(免费)
智谱的 glm-4v-flash 是免费视觉模型,走 OpenAI-compatible 端点,对应 provider: custom。
把 examples/zhipu-glm4v.cordis.patch.yml 的内容合并到 profile 的用户 patch 层(%USERPROFILE%\.dsh\profiles\web\cordis.patch.yml,Linux/macOS 为 ~/.dsh/profiles/web/cordis.patch.yml):
- id: deepeye-vision
config:
provider: custom
baseUrl: https://open.bigmodel.cn/api/paas/v4
model: glm-4v-flash
maxTokens: 1024
API Key 通过环境变量提供(custom provider 自动读取 DEEPEYE_API_KEY):
### 使用自定义端点
适用于 vLLM、Ollama、LM Studio 等 OpenAI-compatible 服务:
```yaml
- id: deepeye-vision
name: 'dsh-plugin-deepeye'
config:
provider: custom
baseUrl: http://localhost:8080/v1 # 必填:端点地址
model: qwen-vl-plus # 必填:模型名
# apiKey: !!js process.env.DEEPEYE_API_KEY # 可省略
完整配置参考
- id: deepeye-vision
name: 'dsh-plugin-deepeye'
config:
provider: openai # 'openai' | 'gemini' | 'custom'
apiKey: '' # 留空则自动读 env(见上表)
baseUrl: '' # custom 端点或代理地址
model: '' # 留空使用 provider 默认模型
cacheEnabled: true # 结果缓存开关
cacheMaxSize: 200 # 缓存最大条目
cacheTtlSeconds: 86400 # 缓存条目有效期(秒,0 表示不过期)
maxImageDimension: 1536 # 图片最大尺寸(超过自动缩放)
jpegQuality: 85 # JPEG 压缩质量
maxTokens: 4096 # OpenAI-compatible 视觉模型最大输出 token
requestTimeout: 30000 # 单次请求超时(毫秒)
maxRetries: 2 # 瞬时失败(429/5xx/网络错误)重试次数
retryDelay: 1000 # 首次重试前的基础延迟(毫秒,指数退避)
maxImageDownloadBytes: 20971520 # URL 图片最大下载字节数
pasteCompat: auto # 'off' | 'auto' | 'force',粘贴图片兼容模式
缓存键包含「provider + baseUrl + 图片 + prompt + model」:切换后端或模型不会误命中旧缓存;条目按
cacheTtlSeconds过期。