ysr666/dsh-vision-router
ysr666/dsh-vision-router为纯文本 Agent 提供视觉能力:内置免 Key 视觉链 + 像素级视觉工具(看图问答、定位、裁剪、像素对比、取色、OCR、矢量化、抠图、截图);粘贴图片即可用。
在 DSH 聊天窗口自动调用生图工具(API 渠道,或本机 CLI:已支持 mmx / codex / agy)并展示图片,也支持利用对应 CLI 识别图片。
English | 中文
Automatically call image-generation tools from the DeepSeek Harness (DSH) chat window (via API channels, or the local CLIs: mmx / codex / agy), display the generated image inline, and also recognize images using the corresponding CLI.
Two image-generation methods are supported:
Uses OpenAI-compatible providers already configured in DSH and finds their available image models.
For built-in providers (e.g. OpenRouter) whose base URL is left blank in DSH settings, the plugin falls back to DSH's built-in default endpoint, matching how chat routing resolves them.
The plugin scans the local machine for the MiniMax CLI (mmx), the OpenAI Codex CLI (codex), and the Google Antigravity CLI (agy); each one found becomes an available image-generation and image-recognition backend.
codex spends your ChatGPT account (Plus/Pro) quota rather than an API key. Requires the codex CLI installed and signed in to an account with image quota left (check with codex login status).agy spends your Google account quota. Requires the agy CLI installed and signed in via the Antigravity app.cli-image-gen, which teaches the model to drive the CLIs for image generation when the generate_image tool fails (quota / region restrictions / parsing), and to finish with inline display via show_image_file.vision describe, codex's exec -i with image input + server-enforced JSON schema, agy's --json-schema). So installing any one of mmx / codex / agy enables image recognition — no need to install all three; if none is installed the plugin still works, only analyze_image returns a "CLI not found" notice.mmx → codex → agy); you can also pin a default with the visionBackend parameter of set_image_default.# npm (recommended; ships prebuilt artifacts)
dsh plugin --profile web add dsh-chat-imagine
# or install from the GitHub source
dsh plugin --profile web add github:corrinehu/dsh-chat-imagine
After installing the plugin, start a new conversation and ask for an image:
Create a cute blue whale logo.
The plugin checks available channels and models, then asks which one to use as the default:
Once set, you don't need to choose again. Just describe the image you want in the chat:
Generate a 16:9 sunrise over snowy mountains.
The result appears directly in the chat.
You can also use another image backend:
Just say so in the conversation, for example:
Use agy to generate a widescreen hand-drawn colored-pencil diagram explaining LLM post-training.
Image recognition requires a local CLI: with any one of mmx / codex / agy installed, the analyze_image tool is available (any one suffices — no need to install all three); if none is installed the plugin still works, only image recognition is unavailable — calls return a "CLI not found" notice. Once a CLI is present, the tool reads an image (local path or http(s) URL) into structured JSON evidence — OCR full text and per-line text, layout regions in reading order, semantic entities and relations, visual notes, and an uncertainty list.
Read this image /tmp/screenshots/error.png and copy out the error text verbatim.
mmx (fastest, direct VLM, ~3-8s) → codex (server-enforced JSON schema, most reliable) → agy (Gemini, weekly quota shared). Pin a default with the visionBackend parameter of set_image_default; otherwise it auto-picks by speed.backend parameter, or just "use codex").