Introduction¶
When developing agents in DeepSeek Harness (hereinafter referred to as DSH), you will inevitably encounter requirements for image generation or editing. The difficulty lies in the inconsistency of APIs across different service providers: OpenAI-based services use the Images-compatible interface, while Google Gemini uses the Interactions API, with different authentication methods and parameter systems. If an agent is hard-bound to a specific provider, switching providers or implementing failover later requires a complete rework.
The philosophy behind dsh-image-tools is to consolidate this into two tools: image-generate and image-edit. It exposes provider-neutral, unified parameters to the model, while multiple providers can be “plugged in” in the background, attempting them in order of priority. Below is an introduction to its features, installation, and typical usage.
What is this¶
dsh-image-tools is a DSH plugin that provides unified multi-provider image generation and editing capabilities through provider-neutral image-generate / image-edit tools, covering two backend types: OpenAI Images-compatible services and Google Gemini Interactions API. It is maintained by JuneLearn, is licensed under MIT, and is currently version 0.1.0.
Core Features¶
Ordered Multi-Provider Management¶
The plugin manages an ordered list of image services, where each service uses a separate API key and is configured with its own model. Services are arranged by priority (high to low), and the failover order can be adjusted up and down in settings. When adding a service, choose from three protocol/presets: OpenAI Images, OpenAI Compatible, or Google Gemini (Interactions API).
Generation and Editing Parameters¶
The parameters for image-generate are as follows:
prompt: Required, image prompt.profile: Optional, specifies the service ID; omitting it enables sequential failover.count: 1–8, default 1.size,aspect_ratio,resolution(Gemini supports auto / 0.5K / 1K / 2K / 4K),quality,output_format,compression,background: Effective when the model supports them.
The parameters for image-edit are:
refs: Required, an array of local paths orasset:image-*references.mask: Optional, alpha PNG; available if the model supports masks.
Parameters are validated before the request, rather than silently discarding unsupported values. It is recommended to pass only aspect_ratio for composition; if the model also receives redundant parameters in the same direction (e.g., portrait added with 3:4), the explicit ratio takes precedence, and true direction conflicts will still be rejected.
Result Preview and Asset References¶
Generation results are previewed within the session and saved to the outputs/images/ directory. Files take the form image-YYYYMMDD-HHMMSS-xxxxxxxx.png. Mutually exclusive writing and random suffixes prevent overwrites. Each output comes with a de-identified JSON metadata sidecar of the same name, containing no API keys, full response bodies, or headers. Results can be reused via stable asset:image-* references, which remain parseable after a process restart.
Failover and Billing Security¶
The plugin only performs sequential failover on connection-related faults to avoid automatic retries for requests where billing status is unclear. Requests to Gemini always set store=false, relying neither on the vendor’s session state.
Mounting Host and Web Client Simultaneously¶
The dsh.bundle declaration inside the package mounts both the Host and the Web client simultaneously; no manual modification of the profile is required.
Installation and Enablement¶
Prerequisites:
- Node.js 20 or later (Node.js 24 LTS is recommended);
- Git;
- pnpm;
- DeepSeek Harness 0.1.0-rc.6.
Install directly from GitHub:
npx --yes -p @deepseek-ai/dsh dsh plugin --profile web add github:JuneLearn/dsh-image-tools
After installation, start the Web UI:
npx --yes -p @deepseek-ai/dsh dsh web
The Web UI listens on http://127.0.0.1:3080 by default.
Configuring Image Services¶
Start the Web UI first, then follow the steps below to add services:
- Open Settings > Plugins > Configurable plugins > Image Tools;
- Click Add service, and select OpenAI, OpenAI Compatible, or Google Gemini in the dedicated editor;
- Fill in the Service Name, Endpoint, API Key, and Model, then save;
- Optional: Test the connectivity of the saved URL, key, and model. The test will not generate an image.
API keys are stored via DSH credentials; the normal settings status will not return the keys. The settings list will display each service’s name, type, model, key status, and row actions. Please note that OpenAI-compatible proxies without a model list endpoint will be reported as reachable but unverified.
Typical Usage¶
After configuring the services, you do not need to specify the tool, model, or parameters within a session; simply describe your requirements:
Create a cute moe-style image of a blue whale maid.
DSH will automatically invoke image-generate and attempt the configured services in order. Quantity, composition, and quality can also be expressed in natural language:
Create two high-quality 16:9 cinematic concept images of a futuristic city.
Editing continues within the session:
Change the background of the previous image to an underwater castle, but keep the character unchanged.
DSH will automatically reference the previous result and call image-edit. You can also upload local images from the session working directory as references. Remote URL references and paths outside the session working directory will be rejected.
Applicable Scenarios and Considerations¶
This plugin is suitable for scenarios where you need to integrate image generation/editing capabilities into DSH agents but do not want to lock in to a single provider. Ordered multi-provider failover is useful for availability-sensitive session workflows; the design of failover limited to connection faults keeps the billing risk clearly defined.
Before installation, there are a few points to confirm:
- The plugin runs with the permissions of the current dsh process; you should check the source code and license (this project is MIT) before installing;
- The README contains affiliate links and the discount code
99F509ABC6C38F77for the WPIronman API Relay. The plugin declares independence from this relay and does not require the use of any specific relay; please evaluate price, reliability, and privacy policies yourself when choosing a service; - If you have previously used
dsh-image2-draw, you must remove the old package before installing, as they use different setting namespaces. Old settings, keys, tools, and result cards will not be imported, and API keys will not be copied automatically:
npx --yes -p @deepseek-ai/dsh dsh plugin --profile web remove dsh-image2-draw
npx --yes -p @deepseek-ai/dsh dsh plugin --profile web add github:JuneLearn/dsh-image-tools
After removal, you need to recreate the services in the Image Tools settings.
Conclusion¶
dsh-image-tools unifies multi-provider image generation and editing under two tools, trading flexibility for ordered services and restrained failover strategies. At the same time, it clarifies security boundaries through parameter validation, de-identified sidecars, and credentials storage. If you need image capabilities in DSH, it is worth a try.
- Community directory page: https://www.skillhub.cn/plugins/JuneLearn/dsh-image-tools
- GitHub repository: https://github.com/JuneLearn/dsh-image-tools