Introduction¶
DeepSeek Harness (DSH) extends its functionality through a plugin mechanism, but for model inference, users still need to integrate third-party services on their own. Existing solutions either require manual tool development or lack flexible session-level model switching capabilities. This plugin solves that problem: it provides a ready-to-use generate_image tool for DSH agents, supports the MiniMax H3 image generation model, and allows session-level overriding of the default model.
Plugin Overview¶
comfanworld/dsh-minimax-image is a model inference plugin that provides text-to-image capability for DeepSeek Harness. The plugin is named @comfanworld/dsh-minimax-image, version 1.0.0, maintained by comfanworld, and licensed under the MIT License.
The plugin offers three main features:
generate_imagetool: Available in any DSH agent, calls the MiniMax H3 image model to generate images- Plugin page: Adds a “MiniMax Image Generation” entry in the DSH plugin management interface for saving API keys, configuring the default model, and switching API sites
image_modeltool and/image-modelcommand: Override the image model within a conversation session, affecting only the current session
Installation & Activation¶
The plugin requires DeepSeek Harness 0.2.2-rc.5 or later.
Install via UI:
- Open the Plugins menu in DSH
- Select Add plugin
- Paste
https://github.com/comfanworld/dsh-minimax-image - Click Install
- Enable the plugin
Install via terminal:
dsh plugin --profile <profile> add github:comfanworld/dsh-minimax-image
After installation, select the plugin in the Plugins list to enable it.
Install from a local checkout (for development):
dsh plugin --profile <profile> add /absolute/path/to/dsh-minimax-image
In the local directory, you need to run npm install or pnpm install first to resolve dependencies.
Configuration¶
Configure the following fields in DSH’s UI under Plugins → MiniMax image generation:
| Field | Description |
|---|---|
| API key | Stored in the local DSH credential store under the key MINIMAX_API_KEY. The value will not be displayed again in the configuration UI, nor written to the plugin config file. The environment variable MINIMAX_API_KEY also works, but the stored key takes priority. |
| Default model | Select the default model: MiniMax-H3-Image (standard) or MiniMax-H3-Image-Highspeed (high-speed), or enter a custom relay model ID. Changes take effect immediately without restarting DSH. |
| API site | Optional endpoint override. Defaults to the domestic site https://api.minimax.cn. Use https://api.minimax.io for the international site, or enter a relay address. |
To obtain an API key: Go to the MiniMax platform → Account Management → API keys (the platform is at platform.minimax.cn or platform.minimax.io; keys are not interchangeable between the two platforms).
Usage¶
Direct conversation invocation:
Simply describe your requirement in the conversation, and the agent will automatically invoke the generate_image tool. Images are downloaded to a minimax-images/ folder in the session working directory and displayed in Markdown format within the reply.
Example:
Draw a Shiba Inu wearing round glasses coding late at night, cyberpunk style, 16:9
Session-level model switching:
Type the following command in the conversation to switch the image model for the current session:
/image-model MiniMax-H3-Image-Highspeed: Use the high-speed model/image-model default: Clear the session override and revert to the plugin’s default model/image-model(no argument): Display the model currently in use for this session
Session override configurations are saved in ~/.dsh/minimax-image/sessions.json.
Tool parameters:
| Parameter | Description |
|---|---|
prompt |
Image description, required |
count |
Number of images to generate, 1–10, default 1. Each successfully generated image is billed |
size |
Image dimensions in WIDTHxHEIGHT format, e.g. 1024x576. If not specified, the aspect_ratio + area parameters are used |
aspect_ratio |
Aspect ratio, e.g. 16:9, 3:4, 1:1, or auto |
area |
Resolution area: 1K, 2K (default), or 4K |
output_format |
Output format: png, jpeg (default), or webp |
Limitations & Notes¶
- Currently only supports text-to-image generation. The reference image editing endpoint (
/v1/images/edits) is not exposed. - A single request may take a long time; the tool waits up to 660 seconds. Because the endpoint is not idempotent, a timeout may still result in a charge.
- Images are downloaded to local disk; the plugin does not reuse the image URLs provided by the service.
Use Cases¶
Ideal for developers who need to integrate image generation capabilities into DSH agents, especially those who want to:
- Quickly connect to the MiniMax H3 image model
- Flexibly switch models at the session level
- Keep configuration and credentials securely stored
Please review the source code and license before use to ensure compliance with your project’s standards.