Vision & Multimodal

dsh-vision-adapter

motongv/dsh-vision-adapter · ★ 0

motongv

? DeepSeek Harness ?????:???? Kimi????? DeepSeek ? DSH ??

License
MIT
Added
2026-08-23
Maintenance
active
Install kind
github

No manifest check is available; listing does not imply compatibility or security review.

安装

dsh plugin --profile web add github:motongv/dsh-vision-adapter

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. What you get
  2. Install (one command)
  3. Built-in providers (8)
  4. Configuration
  5. Models
  6. How it works
  7. Details
  8. FAQ
  9. License

Adds vision capability to DeepSeek Harness (DSH): after installing, you can drag & drop an image into the chat to have it recognized — the image goes to a vision model, the text goes to DeepSeek for reasoning, and the chat entry point stays exactly the same.

This is a plugin specifically for DeepSeek Harness (DSH), not a generic OpenAI client tool. It requires the DSH web UI (dsh web).

What you get

After installation, a visual settings page appears under Settings → Vision:

  1. Pick a vision provider from the dropdown (endpoint and model are pre-filled automatically);
  2. Paste your API Key into the field (masked by default, click the eye icon to reveal);
  3. Click Save & Apply.

After saving, two models appear in the model picker at the bottom-right of the chat input — DeepSeek V4 Pro Vision (X) and DeepSeek V4 Flash Vision (X) (X = the provider you chose). Select one and drag an image in to recognize it.

Install (one command)

dsh plugin --profile web add dsh-vision-adapter

Then restart DSH.

Built-in providers (8)

Just pick a provider — endpoints and models are pre-configured. You only paste your API Key:

Provider Vision model (preset) Endpoint (preset) Credential saved to
Kimi (Moonshot) kimi-k3 https://api.moonshot.cn/v1 VISION_API_KEY
Zhipu GLM glm-4v-flash https://open.bigmodel.cn/api/paas/v4 ZHIPU_API_KEY
Qwen (Tongyi) qwen-vl-plus https://dashscope.aliyuncs.com/compatible-mode/v1 DASHSCOPE_API_KEY
OpenAI gpt-4o-mini https://api.openai.com/v1 OPENAI_API_KEY
Google Gemini gemini-2.0-flash https://generativelanguage.googleapis.com/v1beta/openai GEMINI_API_KEY
Doubao (Volcengine Ark) doubao-1.5-vision-pro https://ark.cn-beijing.volces.com/api/v3 ARK_API_KEY
MiniMax (Hailuo) MiniMax-VL-01 https://api.minimax.chat/v1 MINIMAX_API_KEY
StepFun (Ji Yue) step-1v https://api.stepfun.com/v1 STEPFUN_API_KEY

How the API Key works: paste the plaintext key for the provider you chose. On save, the plugin writes the key securely into DSH's credential store (~/.dsh/.credentials.yaml) and only keeps a reference name in the settings file — the plaintext never lands in settings. The page shows a Configured / Missing status badge. Once configured, you can leave the field empty and save again.

Configuration

  1. After restart, open Settings → Vision;
  2. Select a provider in the dropdown — endpoint and model are filled in automatically;
  3. Paste your API Key (masked by default; click the eye icon to reveal);
  4. Choose Output language (Chinese or English);
  5. Click Save & Apply.

The advanced section lets you change the DeepSeek text backend (model name / endpoint / key reference). Defaults: deepseek-v4-pro + DEEPSEEK_API_KEY.

Models

Each provider exposes two models, backed by two DeepSeek reasoning backends:

  • DeepSeek V4 Pro Vision (X) → text routed to DeepSeek V4 Pro
  • DeepSeek V4 Flash Vision (X) → text routed to DeepSeek V4 Flash

When you switch providers in Settings, the model names update in sync (pick Zhipu → shows Zhipu, pick MiniMax → shows MiniMax).

How it works

image ──► vision model (Kimi/Zhipu/Qwen/OpenAI/Gemini/Doubao/MiniMax/StepFun) ──► text description
text + description ──► DeepSeek ──► reply

The plugin runs an in-process HTTP bridge inside DSH and registers the selected vision model as an llm-pi-ai provider (merged incrementally — it never overwrites other plugins' or your existing vision bridges). The image is described into text by the vision model, then the text + description are sent to DeepSeek for reasoning.

Details

  • Image description cache: the same image only calls the vision model once;
  • Rate-limit backoff: automatic retry with backoff on 429 / concurrency limits;
  • Compatibility fixes: developer → system role normalization, max_completion_tokens → max_tokens, etc.;
  • Secure key storage: plaintext keys pasted in Settings are moved into DSH's credential file, not kept in the settings file.

FAQ

Q: I don't see Settings → Vision or the models after installing? Restart DSH (dsh plugin add only changes config; plugins mount at startup).

Q: 401 when recognizing? The API Key is missing, wrong, or expired — check the Configured / Missing badge in Settings, and get a new key from the provider's console if needed.

Q: 429 when recognizing? The provider's free quota is rate-limited. The plugin already retries with backoff and caches images; if it keeps happening, top up the quota or switch to a provider with more headroom.

Q: Can I add another vision provider? Edit PROVIDERS in src/config.js (add one entry: endpoint, model, and credential reference name).

License

MIT