HiSeax/dsh-image-to-text ↗★ 0

dsh-image-to-text

DSH plugin that lets text-only (non-multimodal) models send and read images: bypasses the image admission gate, rewrites image blocks to local paths, and OCRs/describes them via configurable vision API providers (image_to_text tool). 适合使用无多模态能力的纯文本模型但仍需处理图片输入的用户。

Package
dsh-image-to-text
Compatibility
Unverified
Harness peer range
^0.1.0-rc.6
Cordis peer range
^4.0.1
Version
0.1.2
License
MIT
Last updated
Aug 15, 2026

Install

This plugin has no verified bundle, or compatibility checks failed. Read the repository notes first. Read the full README ↗

Configuration

Plugin row config fields:

FieldDefaultMeaning
pythonPathWindows probes C:\Program Files\Python313\python.exe, else pythonPython executable path or PATH command
providersbuilt-in 7 provider templatesOverride by name (optionally model), or add new providers
bypassImageGatetrueWrap llm.resolveModelInfo to admit image prompts
rewriteImageBlockstrueRewrite image blocks to local paths before text-only adapters

Custom API URL / key (plugin config)

- insert:
    - id: image-to-text
      name: 'dsh-image-to-text'
      config:
        pythonPath: 'python'
        providers:
          # Override a built-in provider: only name (and optionally model) is needed
          - name: zhipu
            apiKey: 'your-zhipu-key'
            endpoint: 'https://open.bigmodel.cn/api/paas/v4/chat/completions'
          # Add a fully custom OpenAI-compatible provider
          - name: my-vision
            model: 'vision-model'
            apiKey: 'sk-xxx'
            endpoint: 'https://api.example.com/v1/chat/completions'
            format: openai
            priority: 1

Built-in provider names: zhipu, gemini (shared by several Gemini models), grok. New providers need the full name/model/apiKey/endpoint/format/priority.

Custom API URL / key (environment variables)

Named by provider name (non-alphanumeric → _, uppercase):

IMAGE_TO_TEXT_API_KEY_ZHIPU=your-key
IMAGE_TO_TEXT_ENDPOINT_ZHIPU=https://open.bigmodel.cn/api/paas/v4/chat/completions

Environment variables are read on every call and never written to disk.

Usage

Upload an image in a session, or the model sees an image in context and calls image_to_text:

{
  "images": ["C:\\path\\to\\image.png"]
}

Optional arguments: model (force a specific model), prompt (custom prompt). Returns:

{
  "text": "OCR and description",
  "provider": "gemini",
  "model": "gemini-3.6-flash"
}