DeepSeek Harness Image Plugin: Giving Conversational Models a Drawing Tool

Introduction

When building an agent in DeepSeek Harness (DSH) that needs to generate images, you either copy prompts into external tools or rely on a model with image input to describe the scene. This adds extra steps and makes it hard to manage prompts and results together. DSH’s philosophy is “everything is a plugin”—integrating image generation directly into the conversation lets the model decide when it needs an image, how to create it, and how many to generate, with results staying right in the conversation flow.

Plugin Overview

dsh-images is a model inference plugin that provides a generate_image tool to the conversation model, producing images using your configured image generation model. It also adds an Images panel to the left sidebar, collecting all generated images with masonry-style browsing, zoom, and download support. The panel includes a Recipes tab with 191 verified prompt templates, plus the ability to create, import, and share recipes.

Installation & Enablement

Add the DSH Plugins index in DeepSeek Harness, then install the plugin.

  1. Go to Plugins → Discover → Sources and add the index:
   https://raw.githubusercontent.com/kadaliao/dsh-plugins/main/marketplace.json

The Discover tab is part of the experimental Custom plugin markets feature; if you don’t see it, enable it first under Plugins → Experimental plugins.

  1. Go to the Discover tab, search for Images, and install.

  2. Open the Images panel in the left sidebar, click Settings, and fill in your image generation model (see “Settings” below). Refresh the page once after installation.

If you don’t use Discover, you can also paste the package name directly in the plugin manager:

@kadaliao/dsh-images

Or install via terminal (use --profile desktop for the desktop version, and restart Harness after installing):

dsh plugin --profile web add @kadaliao/dsh-images

Using It in Conversation

When the model needs an image, it calls the generate_image tool. While the provider is generating, the turn’s process collapse will show a flickering placeholder image and the prompt. Once the image returns, it appears as a standalone row above the model’s reply and remains visible after collapsing. You can request multiple images at once (n up to 4), displayed side by side.

Hovering over an image reveals controls:
- Download: Save the image.
- ⋯ Menu: Download, copy prompt.
- Click the image to open the viewer.

The viewer supports:
- Scroll wheel (or two-finger pinch on a trackpad) to zoom centered on the cursor position, range 50%–1000%.
- − / + buttons in the top bar for stepped zoom; click the percentage in the middle to fit to screen.
- After zooming in, drag to pan; double-click to toggle between 1× and 2×.

Keyboard shortcuts:
- + / - to zoom
- 0 to fit to screen
- ← / → to cycle through images from the same call
- Esc to close

Below the image, the model name, pixel dimensions, and cost are displayed (e.g., gpt-image-1.5 · 1024×1024 · ≈ $0.017). On models with image input support, the model also receives this image, which it can use to inspect the result or provide further description.

Reference Image Input

generate_image also supports reference images. The model can place reference images in the images parameter (up to 16), where each entry can be:
- An attachment ID from an image in the conversation (sha256:…)
- A previously generated image ID (provided in the tool result)
- A file path: absolute, ~/…, or relative to the session working directory

When reference images are included, the request is sent to the provider’s POST /images/edits (multipart) endpoint instead of /images/generations. Input supports PNG, JPEG, and WebP; previously generated GIFs are sent as sprite sheets, so animated images can also be iterated on. The tool card will display “Based on N reference image(s).” The provider and image model must support the edits endpoint (OpenAI’s gpt-image-* series supports this; most gateways pass it through).

Animated Images (GIF)

When the model requests an animated image, it includes a frames parameter in generate_image (4, 6, 9, or 16 frames), plus an optional frameMs (duration per frame in milliseconds, default 100). Since image generation models only output static images, the plugin first has the model draw a sprite sheet (multiple frames of the same scene and action arranged in a grid), then slices the frames and encodes them into an infinite-loop GIF (max 480 px per frame on the longest edge, shared palette across all frames, ordered dithering to prevent color banding). This requires only a single image generation request, costing the same as a static image.

What you see in the conversation, in the panel, and what you download is the GIF (e.g., … · GIF · 16 frames · …). Harness attachments store only single-frame images, so what the model sees is the sprite sheet; the sprite sheet is also saved alongside the GIF (<id>-sheet.png) and is deleted together when the GIF is removed. How smooth the animation looks depends on the model’s frame-to-frame consistency—simple repetitive actions (running, waving, bouncing, spinning, etc.) work best.

So far, OpenAI’s gpt-image series (e.g., gpt-image-1.5, gpt-image-2, gpt-image-2.5-*, gpt-image-2.6-*, etc., with or without gateway prefixes) has been confirmed to produce properly aligned sprite sheets. When using non-GPT models, a GIF will still be generated, but a note below the result and in the settings drawer will say “This model may not support GIF source generation”: models that don’t output in a grid may produce a GIF that just flashes between different crops of the same image. Support will be extended as other models are verified.

The Images Panel

Opening Images in the left sidebar (or typing /images) brings up the gallery, displaying all images generated across sessions in reverse chronological order as masonry cards. Each card shows the prompt, model, pixel dimensions, cost, and generation time; the header bar displays cumulative spending.

Hovering over a card reveals:
- Download
- ⋯ Menu: Download, copy prompt, Create similar, Convert to recipe, Save as-is recipe, Download (with recipe), Remove from gallery

Click a card to open the zoom viewer. The Open source conversation button in the viewer’s top bar jumps to the conversation where the image was created (hover to see the conversation title). If the conversation is archived, it won’t jump directly but will prompt you with an “Unarchive and open” option (for images created by sub-agents, this unarchives the parent conversation); if the conversation has been deleted, it will indicate the conversation no longer exists.

The panel auto-refreshes when open; scroll down to load older images.

Removing from the gallery only deletes the plugin’s own copy; the image remains visible in the conversation’s attachments (managed by Harness attachment storage).

Recipes

A recipe is a verified prompt template with a few fill-in-the-blank slots, annotated with size or animation parameters. The Recipes tab in the panel displays them as cards, supports search, and allows filtering by category (photo transformation, hand-drawn, magazine poster, infographic, 3D, sticker animation, illustration, product, comic) and source (built-in, mine, community).

Clicking a recipe shows the cover, requirements, and source. Fill in the blanks (each slot displays a default value), add any extra instructions, and click Create with this recipe. This opens a new conversation in the plugin’s Images workspace (not the current conversation) with a pre-filled message describing the recipe. The workspace folder defaults to ~/.dsh/images/workspace, auto-created on first use and added to the sidebar; workdir is configurable. Recipes that require user-uploaded images (e.g., turning a photo into a figurine, coloring a line drawing) will prompt the user to attach images in the input box before sending.

The model calls generate_image with the recipe’s ref and filled parameters; the tool applies the template itself, so the verified prompt text is passed as-is to the image generation model, with extra instructions appended. Generated images are tagged with the recipe used in both the conversation and the gallery; click the tag to open it. The model can also proactively search recipes via the image_recipes tool—for example, “What magazine cover recipes are available?” or “Draw this as a chalkboard classroom.”

Built-in Recipes

There are 191 built-in recipes covering nine categories: photo transformation, hand-drawn, magazine posters, knowledge infographics, 3D figurines, sticker animations, illustrations, product shots, and comics. They are adapted from the most-starred prompt collections on GitHub whose licenses permit redistribution, including:
- JimLiu/baoyu-skills (MIT)
- PicoTrex/Awesome-Nano-Banana-images (Apache-2.0)
- YouMind-OpenLab/awesome-gpt-image-2 and awesome-nano-banana-pro-prompts (CC BY 4.0)
- ZeroLu/awesome-nanobanana-pro (MIT)
- freestylefly/awesome-gpt-image-2 (MIT)
- Evolink-AI/awesome-gpt-image-2-API-Prompts (CC0)
- jamez-bondos/awesome-gpt4o-images (CC BY 4.0)

These collections have been converted into templates. Brand and studio names have been replaced with descriptions of the style itself, with source and original author credited. See recipes/CREDITS.md for the full list. All covers were generated using gpt-image-2.6 with the built-in recipes. Cards display at the cover’s own aspect ratio (max 1:2 portrait, max 3:1 landscape), with no content cropped.

My Recipes

From the ⋯ Menu on a gallery image, you can:
- Create similar: Use this image’s own prompt and settings as a recipe, write what you want to change, and start a new conversation.
- Convert to recipe: Have the model turn this image into a template with fill-in-the-blank slots. Opens a new conversation in the Images workspace; the model reads the prompt, converts swappable elements (text in the image, subject, color palette, style details) into slots, writes bilingual labels and defaults, saves it to “Mine,” and uses the image as the cover.
- Save as-is recipe: Save this image’s prompt and settings to “Mine” verbatim, using the image as cover, with no fill-in-the-blank slots.
- Download (with recipe): Package the recipe into the PNG (see “Sharing Recipes” below).

Built-in and community recipes can be copied via Save to mine. If your own recipe has no cover, the first image generated with it will automatically become the cover.

Sharing Recipes

Every recipe supports three sharing methods, no server required:

  • Copy recipe string: A short text with a title and a line of dshimg1.… (compressed recipe). Paste it in “Recipes → Import,” or paste it directly into a conversation (the model will import it for you).
  • Share card: A PNG containing the cover, title, and description, with the recipe embedded in the image’s text block. Drag it to the Recipes tab (or select it in “Import”) to import. Download (with recipe) does the same thing for any image. If software strips metadata and keeps only the image while discarding the recipe, send the recipe string along with it.
  • Share to…: Limited to your own recipes. Choose a repository from your subscribed sources that accepts issue submissions. The panel first previews what will be made public (title, description, prompt, parameters; your photos and conversations are never uploaded), then opens a pre-filled issue. Submitting to a repository subscription source publishes immediately; submitting to the kadaliao/dsh-images-recipes repo triggers a workflow check and opens a PR, visible to everyone after merge. GitHub can’t attach images via a link, so when submitting to a repository source, copy the cover to clipboard first (press ⌘V below the “Cover” field to paste), then submit the issue. If the shared recipe has no fill-in-the-blank slots, the panel will remind others they can only reproduce this exact image and offer a “Convert to template first” option. If you share to a repository source but forgot the cover, the card will show “Missing cover · Add it”—clicking copies the cover and opens the corresponding issue; just edit the issue and paste the cover in.

Community Recipes

The Recipes tab subscribes to the community index by default (https://raw.githubusercontent.com/kadaliao/dsh-images-recipes/main/index.json; falls back to a jsDelivr mirror if GitHub is unreachable). It fetches on first open, then once per week, caching to ~/.dsh/cache/images/recipes/. Covers are downloaded once and cached. Each community recipe’s issue serves as its home page: 👍 there is a vote, images in comments are the showcase wall, and the index tallies daily, sorting community recipes by vote count. For images created with community recipes, the menu includes Post to showcase wall, which copies the image and opens the corresponding page.

Subscription Sources

Recipes → Sources lists your subscribed sources. You can remove community sources, refresh, or add others. There are two types of subscription sources:

  • Repository: Paste the URL of a public repository (GitHub.com or your company’s GitHub Enterprise, in the format https://<server>/<owner>/<repo>). Open issues in the repo are recipes: an issue with a recipe string (or recipe JSON) counts as one, the first image is the cover, the issue opener is the author, 👍 are votes, and comments are the showcase wall. No moderation: submit an issue to publish, edit to update, close to unpublish. The plugin reads without authentication, every ten minutes (GitHub.com’s anonymous API quota is very low, so it’s set to hourly); opening the Recipes tab after that interval triggers a re-read. For teams wanting to share recipes internally, this is the simplest approach.
  • Index: Any URL serving the same JSON index format over HTTPS (see the community repo’s README for the format), fetched weekly.

Fetching sources and covers sends no personal information. Community recipes are text written by others: like all recipes, they must pass format validation (community recipes also undergo human review before merging; repository sources do not), and the model is instructed to treat them solely as image generation prompts, never as instructions to itself.

Settings

The Settings button in the top-right of the Images panel opens a drawer containing all plugin configuration. Saved to ~/.dsh/cache/images/settings.json, changes take effect on the next image—no reload needed.

  • Connection: Choose which provider route to use, including “Follow conversation” (the one the chat model uses), any provider configured in Harness, or “Custom URL.” API endpoint URLs can be filled in individually. The API key is dedicated to this plugin, stored in the local Harness credential store (DSH_IMAGES_API_KEY), never displayed again, and takes priority over the provider’s own key; leave empty to continue using the provider’s key. “Test connection & fetch models” calls the provider’s /models endpoint and lists image generation models for selection.
  • Model: Fill in the model ID, default size, and quality tier using the provider’s naming. The model field supports type-to-search, listing previously used models, models listed by the provider (after testing connection), and image generation models in the LiteLLM price list. You can type with gaps (e.g., typing img26 finds gpt-image-2.6-sunburst). Names from the price list automatically include any routing prefix already in the field (e.g., sub2api/) or one you type. IDs not in the list can be entered directly. Below the model field, the pricing model for that model is explained.
  • Billing: Per-image price and currency, used only when the model returns no usage data and isn’t in any price list. Below this, the LiteLLM price list status is shown (with an Update button), along with the number of images generated and total cost, broken down by model.

Configuration can also be written in cordis.patch.yml under the plugin’s line; drawer values take priority, and clearing a field in the drawer falls back to the patch value.

Key Default Description
model — Image generation model to use, by the provider’s naming: gpt-image-1.5, gpt-image-1, doubao-seedream-4-0-250828…
provider The one used by the conversation Which provider (the provider name in llm-pi-ai) to use for baseURL and key; set to custom to use only baseURL.
baseURL / apiKeyEnv Inherited from provider Request URL and credential name for signing, for providers not configured in Harness.
size 1024x1024 Size when the model doesn’t specify one (1536x1024, 1024x1536, auto).
quality Model default Quality tier for models that support it (low, medium, high).
pricePerImage / currency — / — Per-image price and currency, used only when the model returns no usage data and isn’t in a price list.

Use Cases & Notes

This plugin is suitable if you’re already developing agents in DeepSeek Harness, need the model to decide when to generate images, and want to manage prompts and results together. If you’ve already configured a conversation model with image input support, this plugin lets you get image results directly in the conversation flow.

The plugin runs with the permissions of the current DSH process. Before installing, review the source code and license (MIT) to ensure compatibility with your environment.

Summary

dsh-images gives the model direct image generation capability within the conversation, integrating prompt, result, and recipe management into one. If you’re building agents in DeepSeek Harness and need the model to generate or edit images autonomously, this plugin makes image generation a natural part of the conversation.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye