zhu1090093659/dsh-web-ui--packages-dsh-tool-describe-image3.6k

@linxin666/dsh-tool-describe-image

面向模型的图像描述工具:通过兼容 OpenAI 的端点调用视觉语言模型来描述本地、网络或附件中的单张图片。

AI 分析

核心用途是为模型赋予纯文本的图像理解能力。适合需要处理多模态图像任务的用户,必要条件是需配置兼容 OpenAI 的 VLM 端点和模型。

包名
@linxin666/dsh-tool-describe-image
版本
0.1.19
许可证
Apache-2.0
最近更新
2026年8月17日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:zhu1090093659/dsh-web-ui#aeaaca8692376f442a1761e56273c574027ce96d&path:packages/dsh-tool-describe-image

Configuration

KeyDefaultMeaning
baseURL— (required)OpenAI-compatible endpoint root (e.g. https://dashscope.aliyuncs.com/compatible-mode/v1); trailing slashes stripped
apiStylechat-completionsProtocol 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
apiKeyInline key for local debugging; prefer !!js process.env.VISION_API_KEY over a hardcoded secret
apiKeyEnvVISION_API_KEYCredential reference (environment-variable name); empty string disables reference resolution
defaultPromptsee sourceThe instruction used when a call omits its prompt — tune it to your workload (OCR, UI review, translation…)
maxBytes10485760Image byte bound (local files and downloads alike)
maxOutputTokens1024Output-token cap: max_tokens under chat-completions, max_output_tokens under responses
timeoutMs60000Per-call vision request timeout
renderImagePreviewtrueUpgrade 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 (![图片](https://github.com/zhu1090093659/dsh-web-ui/blob/aeaaca8692376f442a1761e56273c574027ce96d/packages/dsh-tool-describe-image/describe-image/raw/sha256:%E2%80%A6)) 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.