DeepSeek Harness plugin

dsh-image-gen-hoyyang

DSH 通用图像生成插件:接入任意 OpenAI 兼容生图网关(自定义 baseUrl + 模型 + API Key),设置页可视化配置。工具 dsh_image_gen / dsh_image_gen_config + 命令 /dsh-image-gen + skill。

Jump to install

Source facts

Repository
hoyyang/dsh-image-gen
Latest update
Aug 20, 2026
Category
Tools & Capabilities
GitHub stars
1
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/hoyyang/dsh-image-gen
Plugin: dsh-image-gen-hoyyang
Author: hoyyang

Check the source files

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

File explorer4 files
README.en.mdSource · read only
README language

<div align="center">

🎨 dsh-image-gen

A universal AI image generation plugin for DeepSeek Harness

Any OpenAI-compatible image gateway · Visual settings-page configuration · One command to generate

![Release](https://github.com/hoyyang/dsh-image-gen/releases) ![License](LICENSE) ![DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) ![dsh-plugin](https://github.com/topics/dsh-plugin)

🌐 Language / 语言简体中文 · English

</div>

---

What is this

dsh-image-gen lets DeepSeek Harness agents generate images directly: any image gateway, any image model, configured with three fields — no code changes.

  • 🎨 One-command generation/dsh-image-gen a cat sleeping on a windowsill and it renders
  • 🔌 Any gateway — any OpenAI-compatible image API (official, relays, one-api / new-api, …)
  • 🎛 Settings-page config — save base URL / model / API key, applies instantly, no restart
  • 🔒 Secure by default — secrets stay on this machine, output dir 0700, errors auto-redacted, nothing logged
  • 💸 Cost control — one image per call; no automatic retries on failure

Quick Start

> Prerequisites: DeepSeek Harness installed (dsh on PATH).

① Install

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

Pin a version with a tag: dsh plugin --profile web add github:hoyyang/dsh-image-gen#v0.2.2

② Configure (30 seconds)

Restart dsh web, open Settings → Plugins → dsh-image-gen, fill in and save:

FieldWhat to fillExample
Gateway base URLRoot of your image gateway (https)https://your-gateway.example.com/v1
ModelImage model name your gateway acceptsgpt-image-2
API KeyGateway secretsk-xxx (stored locally only)

③ Generate

Type in the input box:

/dsh-image-gen a cat sleeping on a windowsill, golden afternoon light, oil painting

Or just ask in conversation: “generate an image of …” — the agent calls the tool automatically.

Triggers

SurfaceExampleWhen to use
Command/dsh-image-gen <prompt> [--size=1024x1536] [--quality=high]Deterministic trigger, no model turn
Conversation“Generate a cyberpunk city poster”Let the model decide when to generate
Tooldsh_image_genScripting / manual invocation
Config checkdsh_image_gen_configFree: validates config only, never bills

Options: --size=1024x1024|1024x1536|1536x1024|auto, --quality=low|medium|high (--low/--medium/--high shorthands).

Configuration

Four ways, first non-empty wins: env vars > settings page > profile config > local file.

1. Settings page (recommended) — see Quick Start ②; visual, applies instantly.

2. Environment variables

export DSH_IMAGE_BASE_URL="https://your-gateway.example.com/v1"
export DSH_IMAGE_MODEL="gpt-image-2"
export DSH_IMAGE_API_KEY="sk-xxx"

3. Profile config — add a config: block to the plugin row in the profile cordis.patch.yml (commented example in [cordis.patch.yml](cordis.patch.yml)).

4. Local file — for UI-less profiles (file must be 0600):

cat > ~/.dsh/dsh-image-gen.json <<'EOF'
{
  "baseUrl": "https://your-gateway.example.com/v1",
  "model": "gpt-image-2",
  "apiKey": "sk-xxx"
}
EOF
chmod 600 ~/.dsh/dsh-image-gen.json

Other options:

OptionDefaultNotes
imagesPath/images/generationsEndpoint path (change it if your gateway differs)
outputDirectory~/.dsh/generated_images/dsh-image-gen/Output dir (0700)
timeoutMs300000Upstream timeout (ms)

Gateway contract

Any gateway speaking the OpenAI Images API shape works:

POST {baseUrl}/images/generations
Authorization: Bearer <API Key>
{ "model": "...", "prompt": "...", "n": 1, "size": "1024x1024", "quality": "high" }

Response: { "data": [ { "b64_json": "..." } ] }

Gateways returning a URL instead of b64_json are not supported yet (PRs welcome).

Behavior

  • Paid & non-idempotent: no automatic retries after timeouts or ambiguous failures — retry manually
  • One image per call
  • Never touches the chat model: the image gateway is separate config, DeepSeek Harness model routing is untouched

FAQ

Q: “No gateway base URL configured”? A: None of the four config sources is set — run dsh_image_gen_config to see what is missing.

Q: Settings changes not applied? A: Settings-page saves apply instantly; env vars need a dsh restart.

Q: My gateway model name has a prefix (e.g. azure_openai/...)? A: Put the exact model name your gateway expects into the Model field — it is passed through verbatim.

Q: Where are images saved? A: ~/.dsh/generated_images/dsh-image-gen/ by default; the command/tool returns the full path.

Development

pnpm install
bash scripts/build.sh   # tsc builds the host, tsdown bundles the client (lib/client.js)

License

[MIT](LICENSE) © 2026 Hoy Yang