DeepSeek Harness plugin

dsh-imagegen-songlair

Codex-style image_gen and grok-build /imagine for DeepSeek Harness. OpenAI-compatible images/generations.

Jump to install

Source facts

Repository
songlairui/dsh-imagegen
Latest update
Aug 15, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/songlairui/dsh-imagegen
Plugin: dsh-imagegen-songlair
Author: songlairui

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-imagegen

Codex-style image_gen and grok-build /imagine for DeepSeek Harness.

DeepSeek chat-completions is text-only, and DSH does not ship a native text-to-image API. This bundle registers:

SurfaceMirrorsBehavior
Model tool image_genCodex built-in image_genThe agent draws on request; files land in the workspace
Slash command /imagine <prompt>grok-build /imagineGenerates immediately, no model turn

The backend is OpenAI-compatible POST {baseURL}/images/generations. Shipped defaults target xAI:

  • https://api.x.ai/v1
  • credential name XAI_API_KEY
  • model grok-imagine-image-quality

Any compatible gateway works (OpenAI, OpenRouter, a local proxy). Override baseURL, apiKeyEnv, and model in the profile patch. Never put the API key in the patch file.

Install

dsh plugin --profile web add https://github.com/songlairui/dsh-imagegen/archive/refs/tags/v0.1.0.tar.gz

Restart the running dsh web process. dsh --profile web --dump-config should include a # == dsh-imagegen layer.

Store the key in DSH credentials (Settings → Models) under XAI_API_KEY, or export XAI_API_KEY / OPENAI_API_KEY.

Use

> Use image_gen to draw a shiba in sunglasses as a 35mm film still, save as shiba.png

or:

/imagine a shiba in sunglasses, film still, 35mm

Outputs:

  • workspace generated_images/<name>.png
  • $DSH_HOME/generated_images/<name>.png

If the current route declares image input (for example a grok-4 vision model), the tool result also carries a durable DSH image block so the picture can render inline.

Configuration

A profile patch replaces the whole config object. Restate every field you care about in $DSH_HOME/profiles/web/cordis.patch.yml:

- id: imagegen
  name: dsh-imagegen
  config:
    baseURL: https://api.x.ai/v1
    apiKeyEnv: XAI_API_KEY
    model: grok-imagine-image-quality
    timeoutMs: 180000
    outputDir: generated_images

OpenAI Images:

    baseURL: https://api.openai.com/v1
    apiKeyEnv: OPENAI_API_KEY
    model: gpt-image-2

Any other OpenAI-compatible images/generations endpoint: set baseURL to that origin plus /v1, and apiKeyEnv to the credential name you stored in DSH.

Tool parameters

image_gen(prompt, file_name?, model?, size?, quality?, reference_image?)

  • prompt required
  • file_name e.g. hero.png
  • model overrides the default
  • size 1024x1024 / 1536x1024 / 2K / auto
  • quality gpt-image only: low / medium / high / auto
  • reference_image local path, data URL, or https URL

Key resolution

1. ctx.credentials.resolve(apiKeyEnv) 2. Environment variables XAI_API_KEY / OPENAI_API_KEY / OPENROUTER_API_KEY 3. A non-expired xAI key in ~/.grok/auth.json (grok CLI cache), if present