Back to home

wanshichenguang

dsh-tool-vision

DSH plugin: image_describe (识图) tool over the DashScope OpenAI-compatible vision API (qwen3.7-flash). Bring your own DASHSCOPE_API_KEY.

Stars
0
Language
TypeScript
Created
Aug 16, 2026
Updated
Aug 16, 2026

Introduction

dsh-tool-vision

English | 中文

A DeepSeek Harness plugin: the model-facing image_describe(识图) tool. It reads a local image file and asks the DashScope OpenAI-compatible API (qwen3.7-flash) to describe it or answer a focused question.

Works in every agent preset: the bundle patch inserts the tool at the host plane, so every session sees it in the tool catalog.

Install

dsh plugin --profile web add dsh-tool-vision

Restart dsh web (or install it from the Plugin Market with one click). The tool appears as image_describe in the model's tool catalog.

API key

The plugin ships no key. Set the key in the environment that starts DSH:

DASHSCOPE_API_KEY=sk-xxxx

You can also pass it per-row in cordis.patch.yml:

- id: tool-vision
  name: 'dsh-tool-vision'
  config:
    apiKey: sk-xxxx

Without a key the tool registers normally and fails with VISION_NO_API_KEY on use, naming the fix.

Tool

ToolArgsBehavior
image_describepath (string), prompt (string, optional)Resolves the image (absolute path, or relative to the workspace), sends it as a base64 data URL plus the prompt to POST {baseUrl}/chat/completions, and returns the assistant text. Omitting prompt uses defaultPrompt (a complete content description).

Config

KeyDefaultMeaning
baseUrlhttps://dashscope.aliyuncs.com/compatible-mode/v1DashScope OpenAI-compatible endpoint.
apiKeyDASHSCOPE_API_KEY environment variableDashScope API key; an explicit config value wins over the environment.
modelqwen3.7-flashVision model id.
defaultPrompt请详细描述这张图片的内容:画面主体、关键细节、文字信息(如有)、布局与结构。Instruction used when a call omits prompt.
timeoutMs120000Cooperative tool-call timeout budget (ms).
maxImageBytes20971520Cap on one image's byte size.
maxOutputChars65536Cap on the returned description text.

Security

  • No credentials ship with the package; the key stays in your environment or profile config.
  • The HTTP client sets redirect: 'error': the configured endpoint receives the credential, and a redirect fails the call instead of forwarding the key or the image to another origin.
  • The image bytes go only to the configured endpoint.

Known Limitations and Deferred Work

  • Single provider, single request shape — the tool targets the DashScope OpenAI-compatible endpoint only; a provider-selection seam is deferred until a second vision backend needs the same schema.
  • No vision-specific permission policy — the tool executes without requesting ctx.approval; a deployment that needs confirmation must add a tools/pre-execute policy.

License

MIT