zhu1090093659/dsh-web-ui--packages-dsh-tool-describe-image ↗★ 3.6k
@linxin666/dsh-tool-describe-image
Model-facing describe_image tool for the dsh web GUI: gives a text-only model image understanding by asking a vision-language model at an OpenAI-compatible endpoint to describe one image (local path, http(s) URL, or attachment reference). Hot-pluggable — mounted via ~/.dsh/cordis.patch.yml + a profile node_modules symlink, no dsh source changes.
AI Analysis
核心用途是为模型赋予纯文本的图像理解能力。适合需要处理多模态图像任务的用户,必要条件是需配置兼容 OpenAI 的 VLM 端点和模型。
Install
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zhu1090093659/dsh-web-ui#aeaaca8692376f442a1761e56273c574027ce96d&path:packages/dsh-tool-describe-imageREADME
Read the full README ↗Configuration
| Key | Default | Meaning |
|---|---|---|
baseURL | — (required) | OpenAI-compatible endpoint root (e.g. https://dashscope.aliyuncs.com/compatible-mode/v1); trailing slashes stripped |
apiStyle | chat-completions | Protocol style: chat-completions appends /chat/completions; responses appends /responses (OpenAI Responses API input / max_output_tokens / output_text shapes) |
model | — (required) | Vision model id, optionally with a thinking suffix (:off / :low / :medium / :high). The suffix is stripped before the id reaches the endpoint: :off maps to thinking.type: disabled (chat-completions) or reasoning.effort: none (responses); every other level maps to enabled or is forwarded as the reasoning.effort value. No suffix means no thinking control field |
apiKey | — | Inline key for local debugging; prefer !!js process.env.VISION_API_KEY over a hardcoded secret |
apiKeyEnv | VISION_API_KEY | Credential reference (environment-variable name); empty string disables reference resolution |
defaultPrompt | see source | The instruction used when a call omits its prompt — tune it to your workload (OCR, UI review, translation…) |
maxBytes | 10485760 | Image byte bound (local files and downloads alike) |
maxOutputTokens | 1024 | Output-token cap: max_tokens under chat-completions, max_output_tokens under responses |
timeoutMs | 60000 | Per-call vision request timeout |
renderImagePreview | true | Upgrade image references in the conversation into inline thumbnails (click for full size); false keeps the raw reference text. Display-only — message text and model-side analysis are unchanged |
Configured mount example (profile cordis.patch.yml / composition file):
- id: describe-image
name: '@linxin666/dsh-tool-describe-image'
config:
baseURL: https://dashscope.aliyuncs.com/compatible-mode/v1
model: qwen-vl-max
apiKey: !!js process.env.VISION_API_KEY
Endpoints exposing only the Responses API set apiStyle: responses:
- id: describe-image
name: '@linxin666/dsh-tool-describe-image'
config:
baseURL: https://api.openai.com/v1
apiStyle: responses
model: gpt-4o-mini
apiKey: !!js process.env.VISION_API_KEY
Endpoints whose models enable extended thinking by default (MiMo-V2.5, DeepSeek V4) can turn it off per call so reasoning tokens do not consume the output budget:
- id: describe-image
name: '@linxin666/dsh-tool-describe-image'
config:
baseURL: https://api.xiaomimimo.com/v1
model: mimo-v2.5:off
apiKey: !!js process.env.VISION_API_KEY
Usage
Custom instructions
The tool takes a prompt argument: tell the vision model exactly what you need — "transcribe all
text", "extract the table as CSV", "diagnose the UI layout problems", "translate the text into
Chinese". A targeted instruction beats a generic description; the tool description steers the
text model toward passing one. Calls without a prompt fall back to defaultPrompt.
Sending images directly
Text-only models have no image entry in the DSH input box, so drag or paste an image into the
composer: at send time the plugin rewrites the image-bearing send into a describe-image reference
() instead of an image block the model cannot read. The
bytes travel to the host /describe-image/attach route (validated for size and magic bytes,
persisted in the attachment store); only the reference text enters the session log.
The web shell renders user messages as plain text, so the sent reference would sit in the
transcript as raw markdown; with renderImagePreview on (the card's "Render image preview in
chat" toggle, on by default) the client upgrades each reference in place into an inline thumbnail
— click it for a full-size overlay. If the raw route is unreachable through the current origin
(for example behind a proxy that does not forward it), the thumbnail load fails and the reference
text stays as-is.