Skip to main content

dsh-image-gen

100Stars2Forks1Issues1Watchers

Adds in-conversation image generation to DeepSeek Harness web client, supporting Google Gemini, OpenAI, and ByteDance Seedream, with a built-in local image gallery.

Evidence5/5methodologySourceInstallMaintenanceDSH versionSecurity scan
Machine-auditedInstall commandRepo verifieddsh-plugin topicLicenseREADMEAI wiki
Language
TypeScript
License
MIT
Branch
main
ai-agentcordisdeepseekdeepseek-harnessdsh-plugingeminiimage-generationopenai

Install

cmdweb profile
$ dsh plugin --profile web add dsh-image-gen

Run the command above in your terminal to install this plugin via the dsh CLI. You can switch Profile in the top-right corner. New to dsh? Read the beginner tutorial

Install via your agent

Install the DeepSeek Harness plugin shanliuling/dsh-image-gen for me: review the repository at https://github.com/shanliuling/dsh-image-gen first, then run the install command and verify the plugin loads successfully.

Paste this instruction to the DSH Web GUI assistant — it will install and verify for you.

One-Line Description

Adds native in-chat image generation capability to DeepSeek Harness (DSH) Web, supporting Google Gemini, OpenAI (including compatible proxies), and ByteDance Seedream (Volcano Ark), with built-in local image gallery, fullscreen preview, copy and download interactions.

Core Features

  • Trigger image generation through natural language in conversation, with the Agent automatically invoking the generate_image tool and rendering images directly into the current session flow
  • Simultaneously supports Google Gemini, OpenAI / OpenAI compatible proxies, and ByteDance Seedream (Volcano Ark) three providers, switchable anytime in Web settings
  • Top bar comes with a "Gallery" Tab, aggregating all historically generated images in reverse chronological order, supporting Prompt keyword search and provider filtering
  • Image results integrate with DSH's own Attachment and Conversation system; reopening historical conversations still shows previously generated images
  • Hovering over images or entering the gallery supports fullscreen preview, one-click copy to clipboard, local download, and open in new tab
  • API Keys are securely managed through DSH's built-in credential service; frontend only writes, never reads plaintext

Technical Implementation

  • Language: TypeScript (with React client)
  • Key Dependencies: @deepseek-ai/cordis, @deepseek-ai/dsh-tools, @deepseek-ai/dsh-attachment, @deepseek-ai/dsh-credentials, react
  • Architecture Pattern: DSH Bundle dual injection — Host face registers generate_image tool + same-origin image HTTP route via Cordis apply(ctx, config) in src/index.ts, Client face injects settings card into settings.plugin.item, conversation result card into tool.call.toolview, and gallery Tab into conversation.view from src/client/index.tsx; gallery metadata persisted locally via browser IndexedDB
  • Entry Files: src/index.ts (Host face, lib/index.js) / src/client/index.tsx (Client face, lib/client.js)

Use Cases

For users who want DSH Agent to directly generate illustrations, concept images, or blog post images in chat. After installation, simply fill in the API Key once, then have the Agent describe the desired image; it will appear in the current conversation and automatically be added to the "Gallery" for later lookup, copying, and downloading.

Prerequisites and Compatibility

DependencyMin VersionDescription
DeepSeek Harness>=0.1.0-rc.5Declared via peerDependencies; web profile required
Node>=22.19.0 (also supports >=24.0.0)Declared via engines.node
Cordis>=4.0.0 <5Plugin Host face injection framework
React>=18.2.0 <19Client face rendering dependency
Schemastery>=3.18.0 <4Configuration Schema definition
PlatformWeb onlydsh.client.platform explicitly declared as web, not applicable for headless / desktop profile
Native ModulesNonePure JS + standard browser APIs

Installation

dsh plugin --profile web add github:shanliuling/dsh-image-gen

Configuration Options

ConfigTypeDescriptionDefault
providerstringSelect image generation provider: google (Google Gemini), openai (OpenAI or compatible proxy), seedream (ByteDance Volcano Ark)google
googleModelstringModel name used for Google endpointgemini-3.1-flash-image
googleEndpointstringComplete Google Interactions interface address (including proxy scenarios)https://generativelanguage.googleapis.com/v1beta/interactions
openaiModelstringModel name used for OpenAI / compatible proxy endpointgpt-image-2
openaiBaseURLstringOpenAI compatible /v1 interface address (for proxy/relay)https://api.openai.com/v1
seedreamModelstringVolcano Ark Seedream model namedoubao-seedream-5-0-260128
seedreamBaseURLstringVolcano Ark /api/v3 interface addresshttps://ark.cn-beijing.volces.com/api/v3

API Keys are not in the Config schema; they are saved separately via the DSH credentials service. The frontend writes but does not read plaintext. Credential names are GEMINI_API_KEY / OPENAI_API_KEY / ARK_API_KEY.

FAQ

Q: Where do I fill in the API Key after installation?

A: Open DSH Web (default http://localhost:3080), go to Settings → Plugins → Image generation, expand the card, select the Provider and fill in the corresponding API Key to save. The key is encrypted via DSH credentials service; the frontend will not display plaintext.

Q: Do I need to prepare keys for all three providers?

A: No, you only need to prepare the key for the currently selected Provider; switch Provider and then add the corresponding key.

Q: What services can be used with OpenAI Compatible mode?

A: Any service that provides an OpenAI /v1/images/generations compatible interface, including various relay stations, self-deployed gateways, or Volcano Ark endpoints with the same protocol. Simply change the Base URL to the service's /v1 address.

Q: Where are generated images stored?

A: Image binaries are persisted by DSH's own Attachment service and can be viewed when reopening historical conversations. Gallery metadata (Prompt, Provider, model, etc.) is stored in browser IndexedDB; uninstalling the plugin or switching browsers will not automatically sync.

Q: What if I can't see the "Gallery" Tab in the top bar?

A: The Gallery Tab is injected into the conversation.view slot and should appear automatically after plugin installation. If it doesn't appear, confirm you are on the web profile, refresh the page, or check if the plugin is disabled.

Q: What does the error "generate_image requires the XXX credential" mean?

A: The API Key for the currently selected Provider has not been configured. Go back to Settings → Plugins → Image generation to fill in and save it. The error message will include the corresponding environment variable name (GEMINI_API_KEY / OPENAI_API_KEY / ARK_API_KEY).

Q: Can multiple images be generated in one go?

A: The generate_image tool returns one image per call, but the Agent can automatically make multiple consecutive calls as needed; all results will be uniformly managed in the gallery.

Q: Can generated images be downloaded locally?

A: Yes. Hover over images in the conversation or gallery cards to reveal a toolbar; click the download icon to save as PNG/JPEG locally.

Difficulty Level

Beginner — After installation, simply fill in one API Key in settings, keep other parameters at default, and start generating images in conversation; switching providers and adjusting models are all done in the same settings card.

Known Issues and Limitations

  • Web profile only: dsh.client.platform explicitly declared as web, cannot load under headless / desktop profile
  • Subject to DSH's own attachments.imageLimits.maxImageBytes limit; images exceeding the limit will be actively rejected by the plugin with an error
  • Only accepts four MIME types for storage: image/png, image/jpeg, image/webp, image/gif
  • Google endpoint supports aspect_ratio and image_size (1K/2K/4K) control; OpenAI and Seedream only use the size field
  • Google Gemini official interface may have connectivity issues in some network environments; can be resolved by configuring googleEndpoint with a proxy or relay address

Read the usage guide →

Install steps, key points, FAQ and compatibility for this plugin — auto-derived from indexed fields.

Listing badge

Listed on deepseek-plugin.org
[![Listed on deepseek-plugin.org](https://img.shields.io/badge/listed_on-deepseek--plugin.org-007EC6)](https://deepseek-plugin.org/plugins/shanliuling/dsh-image-gen)

Paste this markdown into your GitHub README to link back to this listing. The badge only states the listing — not a security endorsement.

← Back to plugin directory