CaseyTso/dsh-analyze-image-tool0

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 분석

核心用途是为纯文本模型提供图像分析能力。适合需要处理图像输入、进行多模态交互的 DeepSeek Harness 用户。必要条件是需要配置兼容 OpenAI 的视觉/多模态 API 端点及模型。

패키지
analyze-image-tool
버전
0.1.0
라이선스
MIT
최근 업데이트
2026. 8. 15.

설치

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:CaseyTso/dsh-analyze-image-tool

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 casebaseURLModel exampleNotes
SiliconFlow (default)https://api.siliconflow.cn/v1Qwen/Qwen3-VL-32B-InstructRequires key, strong vision
Alibaba DashScopehttps://dashscope.aliyuncs.com/compatible-mode/v1qwen3-vl-flashCompatible mode, cost-effective
Zhipuhttps://open.bigmodel.cn/api/paas/v4glm-4.6v-flashFree tier available
OpenRouterhttps://openrouter.ai/api/v1google/gemini-2.5-flashMulti-model aggregator
Local Ollamahttp://localhost:11434/v1qwen3-vl:4bNo key needed, fully offline

API Key Resolution Chain (in order)

  1. apiKey saved in WebUI panel(ctx.settings user layer)
  2. Plugin config apiKeycordis.patch.yml
  3. Environment variable VISION_API_KEY, then SILICONFLOW_API_KEY(can be in ~/.dsh/.env or exported)
  4. dsh credential channel(VISION_API_KEY, then SILICONFLOW_API_KEY
  5. 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 with attachment_id): absolute local path, http(s) URL, or data: URL(支持 PNG/JPEG/WebP/GIF/BMP/TIFF/HEIC,默认上限 10MB)。
  • attachment_id(mutually exclusive with path): 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.