Preface¶
The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin”. While DSH itself includes various model capabilities, not all models have the ability to generate or edit images. For developers or users, directly invoking image generation functionality within a pure text model typically requires complex integration.
dsh-image-bridge solves this problem. As a standalone plugin, it mounts the image_generate and image_edit tools onto models within DSH that lack image creation capabilities. By configuring external services, models can gain drawing capabilities, and generated images appear as persistent attachments in the conversation, automatically saved to the session workspace.
Plugin Information¶
- Name: kkj-luna/dsh-image-bridge
- Maintainer: kkj-luna
- Category: Network tools
- License: MIT
- Core value: Connects external image generation services to models in DeepSeek Harness that lack drawing capabilities.
Installation and Activation¶
The plugin is published on npm, and the installation process is very simple. You need to run the command under the Web profile.
- Run the installation command:
dsh plugin --profile web add kkj-luna-dsh-image-bridge
-
After installation, you must restart
dsh web. The plugin code does not support hot reloading; a restart is also required after modifying the code. -
After restarting, open Settings → Image Bridge to confirm that the page loads correctly.
Core Features¶
This plugin primarily provides the following capabilities:
- Tool mounting: Mounts the
image_generateandimage_edittools for models. - Persistent storage: Generated images appear as persistent attachments in the conversation stream and are saved to the
generated-images/directory in the session workspace. - Multi-provider support: Supports any OpenAI-compatible interface (such as OpenAI, Zhipu, Tongyi Qianwen, SiliconFlow, etc.).
- Fault tolerance mechanism: Supports automatic switching between primary and backup models. When the primary model connection fails or generation times out (after the request is sent), it automatically switches to the backup model.
- Web interface configuration: All provider configurations and model selections are completed in the Web interface.
- Security:
- API keys are securely stored in DSH’s credential service (
$DSH_HOME/.credentials.yaml), not sent back to the browser, and not written to config files. - Image URLs returned by the provider are checked by an SSRF security checkpoint, allowing only
http/httpsand blocking local and private network addresses.
- API keys are securely stored in DSH’s credential service (
Typical Usage¶
The configuration process is divided into three steps:
-
Add a provider
In Settings → Image Bridge, click “+ Add model provider”, enter the endpoint address (e.g.,https://api.openai.com/v1) and API key. -
Test and save the model list
Click “Test connection”, and after retrieving the list of available models, click “Save” on the overlay. Note that models will only appear in the dropdown list after being saved. -
Select models and use them
In the “Models” section of the page, select a model for image generation and one for image editing (you can configure a backup for each). Click “Save model settings”. After that, simply issue commands to the model in the conversation, such as “Help me draw a Shiba Inu wearing a space helmet”, and the model will invoke the plugin to generate the image.
Notes and Limitations¶
- Restart requirement: After modifying the plugin code, DSH must be restarted for changes to take effect.
- Key management: Keys are not stored in config files, only in the credential service. Deleting a provider configuration does not automatically clean up stored keys; manual deletion is required.
- Navigation bar icon: The current navigation bar icon is a temporary solution and will rely on official capabilities in the future.
- Timeout strategy: By default, the plugin only switches to the backup model when the connection fails, not when generation speed is slow.
Ecosystem Background¶
DSH’s plugin ecosystem aims to extend system functionality. This plugin is community-maintained. You can find more details in the plugin directory, and the source code is hosted on GitHub.