The plugin-based architecture of DeepSeek Harness (DSH) allows developers to call various external services through simple configuration. The dsh-image-gen plugin encapsulates OpenAI Images-compatible interfaces, directly integrating Text-to-Image and Image-to-Image capabilities into DSH’s conversation flow.
This plugin is maintained by Anyway-one and released under the MIT license. It is a rewrite and fix of the older dsh-image2-draw, resolving a bug in the original version that could cause crashes on load. The plugin does not rely on local storage; instead, it writes the API Key only into DSH’s credential system (default reference name: IMAGE_GEN_API_KEY) and does not echo it in configuration files.
Core Features¶
- Configuration entry: Provides a dedicated Image Gen card in Settings → Plugins → Plugin settings.
- Tool support: Provides the
image-generate(Text-to-Image, supporting 1-8 images) andimage-edit(Image-to-Image, supporting up to 8 PNG/JPEG/WebP reference images) tools. - Endpoint compatibility: Only the baseURL needs to be provided; the plugin automatically appends the path (for example, converting
https://example.com/v1tohttps://example.com/v1/images/generations). - Result handling: Images are rendered inline in the conversation, with thumbnails, lightbox zoom, and save support. At the same time, images are also persistently saved under
outputs/image-gen/in the session working directory, automatically numbered to avoid overwriting. - Security and validation: The API Key is stored securely. The plugin validates configuration writes, response size, timeouts, and reference files. It does not automatically retry on 524/timeout errors, avoiding duplicate billing.
Installation¶
Install using npx:
npx --yes -p @deepseek-ai/dsh dsh plugin --profile web add github:Anyway-one/dsh-image-gen
npx --yes -p @deepseek-ai/dsh dsh web
Configuration¶
- Open Settings → Plugins → Plugin settings and expand the Image Gen card.
- Fill in the Endpoint (baseURL), for example
https://example.com/v1. - Fill in the API Key (stored in credentials by default, with reference name
IMAGE_GEN_API_KEY). - Optional: Adjust Model (default
gpt-image-2), Edit endpoint, or Timeout. - After saving the configuration, use the
image-generateorimage-edittool in the conversation.
Notes¶
- The plugin runs with the permissions of the current DSH process. You should check the source code and license before installation.
- To pin a specific version, install it with
github:Anyway-one/dsh-image-gen#v0.1.0. - Note that 524/timeout errors are not automatically retried. Manually retry to avoid duplicate billing.
By adapting to OpenAI-compatible interfaces, this plugin simplifies image generation configuration in DSH and is suitable for developers who need to integrate various image model capabilities.