DSH HUB
HomePlugin StorePlugin PacksCommunityRankingsResourcesPublish Guide
Plugin source
Back to catalog

Triple3h /

Triple3h/dsh-image-read

Verified

DSH native plugin: structured image analysis via multimodal APIs (read_image_mimo tool) with provider failover, caching, SSRF protection and a Web UI config card. DSH 原生插件:多模态识图,返回结构化 JSON 证据,支持故障转移/缓存/SSRF 防护/Web 配置卡片。

★ 0 Stars0 Forks0 IssuesN/A Community rating0 Confirmed installs
View on GitHub
READMESource: master@7cfbc77a

dsh-image-read

English | 中文

GitHub stars GitHub license

A DeepSeek Harness (dsh) native plugin that analyzes images with multimodal models and returns structured JSON evidence — via a read_image_mimo tool any model can call.

vs modlens: no dependency on a (modlens vision) model variant — the image path is passed directly through a tool call, so any model can use it.

What you get

  • general image understanding / ocr text extraction / multi-image comparison
  • Structured output — summary + ocr (full_text + lines) + layout (regions with type/reading_order) + uncertainty
  • Provider failover — configure multiple providers; one fails, the next is tried automatically
  • Result caching — local file cache for 1h, failure cooldown 60s
  • SSRF protection — private IP blocking, hostname preservation, DNS-rebinding detection
  • Automatic large-image compression (sips, scales down by default above >1024px)
  • Local pre-check of fully transparent PNGs (IDAT alpha scan)
  • API key redaction — keys and URLs are replaced with *** in error messages
  • Exponential backoff retry — 429 / 5xx / timeout / network errors, 1s/2s/4s

Tool

read_image_mimo

Install (web profile)

  1. Add the dependency and bundle entry to ~/.dsh/profiles/web/package.json
  2. pnpm install
  3. Restart the web host

Or link-install in development:

npm install
npm run build
npm run link-profile

Configure

Prefer the Web UI: Settings → Plugins → Plugin configuration → Image recognition — fill in the endpoint (baseUrl), model and API key; blanks fall back to the provider chain in cordis.patch.yml. If baseUrl lacks /chat/completions it is appended automatically.

The provider chain (failover) is configured under config in cordis.patch.yml:

config:
  providers:
    - name: mimo
      baseUrl: 'https://api.xiaomimimo.com/v1'
      apiKey: 'sk-...'
      model: 'mimo-v2.5'
    # optional fallback
    - name: dashscope
      baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1'
      apiKey: 'sk-...'
      model: 'qwen3-vl-plus'
  timeoutMs: 120000
  maxImageDimension: 1024

Legacy single-provider config (baseUrl / apiKey / model at the top level) is still supported.

Output shape

{
  "summary": "description of the image's core content",
  "ocr": {
    "full_text": "all text in the image...",
    "lines": [{"text": "first line", "language": "zh"}]
  },
  "layout": {
    "regions": [
      {"type": "title", "reading_order": 1, "text": "title text"},
      {"type": "paragraph", "reading_order": 2, "text": "body..."}
    ]
  },
  "uncertainness": ["notes on blurry parts"]
}

Local smoke test

MIMO_API_KEY=sk-xxx node --input-type=module -e "
import('./lib/index.js').then(async (m) => {
  const r = await m.readImage(
    { image_path: '/tmp/test.png', mode: 'general' },
    undefined,
    { providers: [{ name: 'test', baseUrl: 'https://api.xiaomimimo.com/v1', apiKey: process.env.MIMO_API_KEY, model: 'mimo-v2.5' }], timeoutMs: 120000, maxImageDimension: 1024 }
  );
  console.log(JSON.stringify(r, null, 2));
});
"

License

MIT

—/ 5

No ratings yet

Verified DSH bundle

Commit 7cfbc77a04fb

Community comments

No comments yet. Be the first to write one.

DSH HUB

A community index for DSH plugins. Not an official GitHub or DeepSeek AI product.

CommunityResourcesAPIAbout