CaseyTso/dsh-analyze-image-tool ↗★ 0
analyze-image-tool
A vision bridge for text-only DeepSeek Harness models: registers an `analyze_image` tool that answers questions about images via ANY OpenAI-compatible vision/multimodal endpoint (SiliconFlow, DashScope, Zhipu, OpenRouter, Ollama, ...).
AI Analysis
核心用途是为纯文本模型提供图像分析能力。适合需要处理图像输入、进行多模态交互的 DeepSeek Harness 用户。必要条件是需要配置兼容 OpenAI 的视觉/多模态 API 端点及模型。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CaseyTso/dsh-analyze-image-toolREADME
Read the full README ↗Configuration
Prefer the WebUI panel (recommended), or configure in profile's cordis.patch.yml under the plugin id:
- id: analyze-image-tool
config:
baseURL: https://api.siliconflow.cn/v1 # Any OpenAI-compatible endpoint
apiKey: *** # Leave empty to use below chain
model: Qwen/Qwen3-VL-32B-Instruct # Vision/multimodal model id on the endpoint
maxTokens: 2048
timeoutMs: 60000 # Increase for large images / slow endpoints, e.g. 120000
maxImageBytes: 10485760
defaultQuestion: Describe this image thoroughly. Include any visible text verbatim, the overall layout, and notable details.
composerNoteTemplate: 用户在这条消息里粘贴了一张图片(附件 ID: {attachment_id})。要查看图片内容,请调用 analyze_image 并传入该附件 ID(attachment_id 参数)。
composerNoteTemplate supports {attachment_id} and {image_index} placeholders.
Endpoint Examples (same config, pick one)
| Use case | baseURL | Model example | Notes |
|---|---|---|---|
| SiliconFlow (default) | https://api.siliconflow.cn/v1 | Qwen/Qwen3-VL-32B-Instruct | Requires key, strong vision |
| Alibaba DashScope | https://dashscope.aliyuncs.com/compatible-mode/v1 | qwen3-vl-flash | Compatible mode, cost-effective |
| Zhipu | https://open.bigmodel.cn/api/paas/v4 | glm-4.6v-flash | Free tier available |
| OpenRouter | https://openrouter.ai/api/v1 | google/gemini-2.5-flash | Multi-model aggregator |
| Local Ollama | http://localhost:11434/v1 | qwen3-vl:4b | No key needed, fully offline |
API Key Resolution Chain (in order)
apiKeysaved in WebUI panel(ctx.settingsuser layer)- Plugin config
apiKey(cordis.patch.yml) - Environment variable
VISION_API_KEY, thenSILICONFLOW_API_KEY(can be in~/.dsh/.envor exported) - dsh credential channel(
VISION_API_KEY, thenSILICONFLOW_API_KEY) - Local endpoint (localhost) requires no key
Leaving apiKey empty in the panel = no override, continues down the chain.
Tool Usage
Model calls analyze_image for image-related tasks:
path(mutually exclusive withattachment_id): absolute local path, http(s) URL, or data: URL(支持 PNG/JPEG/WebP/GIF/BMP/TIFF/HEIC,默认上限 10MB)。attachment_id(mutually exclusive withpath): attachment ID of image pasted into composer(形如sha256:…), see "Paste image recognition" below.prompt(optional): specific question, e.g. "extract all visible text verbatim", "count buttons", "describe layout". Default is detailed description including all visible text.