Preface¶
The extension capabilities of DeepSeek Harness (DSH) are accessed via plugins. When the DeepSeek model needs to handle image tasks, it usually requires the additional integration of visual models or image generation services. dsh-vision-imagen is a DSH plugin maintained by xuxun-oss, used to bridge Google Gemini’s multimodal recognition and image generation, and supports some OpenAI-compatible backends.
Below is an introduction to its positioning, capabilities, installation methods, and precautions.
What is it¶
dsh-vision-imagen is a DSH plugin with an MIT license, package name dsh-vision-imagen, and version 1.3.0.
It solves a specific need: in a regular DeepSeek session, when viewing, generating, or editing images, there is no need to manually switch models; the plugin routes tasks to visual or image generation backends based on the task.
Basic requirements are as follows:
| Item | Requirement |
|---|---|
| Host | DeepSeek Harness dsh ≥ 0.1.0-rc.7 |
| Runtime Environment | Node.js ≥ 18 |
| peerDependencies | @deepseek-ai/dsh-tools (*), react (^18.2.0) |
| API Key | Must be provided by yourself; Google AI Studio provides a free key for Gemini |
Core Capabilities¶
Image Recognition¶
The vision_read listed in the plugin documentation is used to recognize, read, describe, and analyze images, covering scenarios such as OCR, objects, charts, etc. Input supports local paths or http(s) URLs.
Text-to-Image¶
The generate_image listed in the plugin documentation is used for text-to-image. After generation, it calls the Gemini vision model for self-correction feedback; if the quality is not met, it redraws based on an optimized prompt.
Image Editing¶
The edit_image listed in the plugin documentation is used to modify or optimize existing images: first analyzing the original image, then generating an improved version and performing self-correction iterations.
Auto-routing within Session¶
In a regular DeepSeek session, the plugin can route to visual or image generation models based on the task without manual model switching.
Backend & Settings¶
The plugin documentation supports the default Gemini backend and OpenAI-compatible backends, with examples including GPT-4o, Qwen-VL, GLM-4V, gpt-image, DALL-E, Flux, etc. The settings page allows configuring the API Key, backend provider, and model, and supports automatic degradation if the model is unavailable.
Image Output¶
Generated images are saved in:
~/.dsh/vision-imagen-images/
Result cards are displayed inline and provide clickable links:
/api/vision-imagen/images/<file>
Installation & Enablement¶
First, confirm that your machine meets the dsh and Node.js version requirements.
The one-line installation command is:
dsh plugin --profile web add dsh-vision-imagen
For local testing, you can also clone the repository first and then load the local directory:
git clone https://github.com/xuxun-oss/dsh-vision-imagen.git
dsh plugin --profile web add /path/to/dsh-vision-imagen
After installation, open:
Settings → Vision Imagen
Enter the Google AI Studio API Key and click “Test Connection”.
If switching to an OpenAI-compatible backend, change the backend in the “Backend Provider” on the settings page, and enter the corresponding API Key and endpoint. If using the Gemini backend, follow the README instructions to use only the native Gemini REST API (generateContent / predict); do not append /openai to the endpoint.
Typical Usage¶
-
Recognize Image: Provide a local path or
http(s)URL in the session and request needs like “Recognize this image” or “Read the table in the image”. The corresponding tool in the plugin documentation isvision_read. -
Text-to-Image: Describe the target scene and request generation. The corresponding tool in the plugin documentation is
generate_image. After generation, there will be visual model feedback; if the quality is not met, it redraws based on the optimized prompt. -
Edit Image: Provide an existing image and request changes like “Optimize background” or “Adjust the scene”. The corresponding tool in the plugin documentation is
edit_image. -
Switch Backend: Select Gemini or an OpenAI-compatible backend on the settings page, enter the corresponding API Key and endpoint, and then execute the tasks above.
Suitable Scenarios & Precautions¶
Suitable for the following scenarios:
- Need to integrate visual recognition and image generation capabilities via a DSH plugin.
- Hope to process image understanding, generation, and editing simultaneously in a regular DeepSeek session.
- Already have a Gemini or OpenAI-compatible backend API key.
Precautions:
- The plugin runs with the permissions of the current dsh process; please check the source code and license before installation.
- API Keys are saved in local configuration files at:
~/.dsh/vision-imagen.json
The settings page only displays the last 4 digits of the echoed key, and it should not be committed to the version control repository.
- The plugin’s HTTP routing only allows access from local loopback addresses; the route prefix is:
/api/vision-imagen/*
Non-loopback requests return 403.
- If using the Gemini backend, follow the README instructions to use the native Gemini REST API endpoint; do not append /openai.
- The settings page supports automatic degradation when a model is unavailable. This article does not elaborate on specific model chains.
Links¶
- Community Plugin Directory: https://www.skillhub.cn/plugins/xuxun-oss/dsh-vision-imagen
- GitHub: https://github.com/xuxun-oss/dsh-vision-imagen