Introduction¶
When building conversational agents in DeepSeek Harness (DSH), generating and reading images often requires leaving the chat interface: either manually switching to an API console or third-party tool, or relying on external scripts to paste results back into the conversation. For developers debugging models on the web interface daily, this interrupts context and prevents the model from directly “seeing” image content.
dsh-chat-imagine, published by community maintainer corrinehu, aims to integrate image generation and recognition into the DSH chat workflow: generation results are displayed directly in the conversation, while image recognition converts images into structured JSON evidence for any model in the current session to use. This article introduces its capabilities, installation methods, and typical usage.
What It Is¶
dsh-chat-imagine is a DSH plugin (SkillHub category: Internet Tools), currently version 0.4.1, licensed under MIT. It implements automatic image generation tools within the DSH chat window—supporting both API channels and local CLI (with mmx/codex/agy supported)—and displays images inline in the conversation. It also supports using the corresponding CLI’s vision capabilities to recognize images, outputting structured evidence for models to read.
Plugin repository: https://github.com/corrinehu/dsh-chat-imagine
Core Features¶
Image Generation: Dual Channels via API and CLI¶
The plugin supports two image generation paths. After installation, it automatically detects available channels on your local machine.
API Channel
- Uses the OpenAI-compatible interface already configured in DSH to find available image generation models.
- For built-in channels (e.g., OpenRouter), if no base URL is set in DSH settings, the plugin will automatically use DSH’s default address, behaving consistently with chat routing.
CLI Channel
The plugin scans your local machine for the following CLIs. Any found will be available for both generation and recognition:
| CLI | Description |
|---|---|
mmx |
MiniMax CLI |
codex |
OpenAI Codex CLI |
agy |
Google Antigravity CLI |
Note the quota sources for CLI image generation:
- Calling
codexconsumes ChatGPT account (Plus/Pro) quota, not an API key; it requires the codex CLI to be installed and a logged-in account with image generation quota (check withcodex login status). - Calling
agyconsumes Google account quota; it requires the agy CLI to be installed and logged in within the Antigravity app.
When codex/agy are detected, the plugin also registers the cli-image-gen skill, teaching the model to fall back to CLI image generation when the generate_image tool fails (due to quota, region restrictions, or parsing errors), with final inline display using show_image_file.
Image Recognition: Converting CLI Vision Capabilities to Structured Evidence¶
Image recognition relies on local CLIs: installing any one of mmx/codex/agy allows use of the analyze_image tool; installing all is not required. Without any installed, the plugin can still generate images normally, but calling image recognition will return “CLI not found, image recognition not supported.”
Image recognition uses the vision capabilities of the same CLI channel:
mmx: vision describecodex:exec -iwith attached image + server-side JSON schemaagy:--json-schema
The tool reads images (local paths or http(s) URLs) into structured JSON evidence, containing full OCR text and line-by-line text, layout regions in reading order, semantic entities and relationships, visual cues, and a list of uncertain items. Any model (including text-only models) can call this directly without switching to a vision model.
Channels are selected by default based on speed (mmx → codex → agy), but the default recognition channel can be fixed using the visionBackend parameter of set_image_default. When a channel’s quota is exhausted, specify another in the conversation (using the backend parameter or simply saying “use codex to read”).
Installation and Enabling¶
The plugin has currently only been tested in the DSH Web profile. Before installation, it is recommended to review the repository source code and MIT license; the plugin runs with the current DSH process permissions, and CLI channels will call locally installed executables.
It is recommended to install via npm (which includes pre-built artifacts):
dsh plugin --profile web add dsh-chat-imagine
Alternatively, install from GitHub source:
dsh plugin --profile web add github:corrinehu/dsh-chat-imagine
After installation and enabling, image generation and recognition capabilities are available directly in new conversations.
Typical Usage¶
First-Time Image Generation and Setting Default Channels¶
After installation and enabling, describe what you want to draw directly in a new conversation:
Help me generate a Q-style blue whale logo
The plugin will retrieve available channels and models, then ask for the default generation channel. Once set, there’s no need to repeat the selection.
Daily Image Generation¶
Thereafter, just describe directly in the chat:
Generate a 16:9 snowy mountain sunrise
The generation result will be displayed directly in the chat.
To specify a non-default channel, just state it in the conversation:
Use agy to generate a widescreen image in hand-drawn colored pencil style explaining large model post-training
Image Recognition (Reading Images)¶
After installing any CLI among mmx/codex/agy, you can have the model read image content:
Help me read this image /tmp/screenshots/error.png and copy the original error message
The five-segment structured evidence returned by the tool draws on modlens’s contract design, deliberately omitting coordinate boxes and confidence fields. The main difference from modlens-like “taking over model routing” schemes is that image recognition uses the vision model via the CLI channel, without needing to switch to a vision model in the current session.
Applicable Scenarios and Notes¶
Who Is It For
- Developers doing conversational debugging on the DSH web interface who want image generation results to appear directly in the chat.
- Scenarios requiring image content (OCR, layout, semantics) in text-only model sessions without manually switching vision models.
- Users with OpenAI-compatible image generation APIs or locally configured
mmx/codex/agyCLIs.
Things to Note
- Images are stored only in the DSH process memory; after restarting, historical image links will become invalid. If you need to retain them, save them from the chat interface.
- Node.js version requirement:
^22.19.0or>=24.0.0. - The SkillHub directory page and DeepSeek / High-Flyer have no official affiliation; it is part of the community plugin ecosystem.
Links¶
- SkillHub directory page: https://www.skillhub.cn/plugins/corrinehu/dsh-chat-imagine
- GitHub repository: https://github.com/corrinehu/dsh-chat-imagine