
LeemanCheung/dsh-image-gen
dsh-image-gen
GPT Image 2 generation with progressive Codex-style previews for DeepSeek Harness
Install
npx @deepseek-ai/dsh plugin --profile web add dsh-codex-connectRestart `dsh web` after install. Bundle APIs can change during the developer preview.
README badge
[](https://dshhub.dev/plugins/leemancheung-dsh-image-gen)Paste this into your README. The star count updates with every catalog sync.
From the README
Excerpt from LeemanCheung/dsh-image-gen, cleaned of badges and images.
dsh-image-gen
Generate images in DeepSeek Harness with OpenAI gpt-image-2, using a signed-in Codex subscription by default or an API key when explicitly configured.
These illustrations mirror the shipped developing and completed card states. API-key mode can replace the light field with real streamed drafts; Codex subscription mode animates until its non-streaming response arrives. The completed state remains available as a durable DSH attachment with preview and download controls.
Capability map
| Area | Delivered behavior |
|---|---|
| Tool and access paths | Exposes the Codex-compatible image_gen tool for gpt-image-2; defaults to refreshable dsh-codex-connect subscription OAuth and can explicitly use a DSH API-key credential. |
| Progressive experience | Subscription requests show a developing animation until their non-streaming result; API-key requests can show up to three provider-sent partial images, cross-faded in place. |
| Durable results | Saves only the completed image as a DSH immutable attachment, so the same card can replay, preview in a lightbox, and download after a session reload. |
| Conversation compatibility | Returns text-only tool output to the model while retaining the image reference in UI metadata, including for nested Code Mode calls. |
| Safety boundaries | Resolves credentials per request, pins the subscription endpoint, rejects redirects, bounds response sizes and concurrency, validates image bytes through DSH, and retries only transient failures. |
Highlights
- Registers the Codex-compatible model tool name
image_gen. - Reuses the refreshable OAuth login owned by
dsh-codex-connect; noOPENAI_API_KEYis required for Codex subscription mode. - Streams up to three real provider partial images when the API-key Images endpoint is selected; Codex subscription mode keeps the developing animation active until its non-streaming response arrives.
- Cross-fades each partial over one animated developing plate, then sharpens into the final image.
- Stores the final image in DSH's immutable attachment store and supports replay, lightbox preview, and download.
- Keeps model-facing tool output text-only, so image generation does not make a text-only model route reject conversation history.
- Supports native tool calls and nested Code Mode calls with the same durable card.
- Resolves credentials per operation, rejects redirects, limits response sizes, validates image bytes through DSH, and retries only transient failures.
- Includes Chinese and English UI copy plus
prefers-reduced-motionsupport.
Codex parity and improvements
OpenAI Codex's built-in image_gen tool hardcodes gpt-image-2, calls the ChatGPT Codex Images endpoint with subscription OAuth, records one working state, and saves the completed image under Codex's generated-images directory. Its public backend currently requests a non-streaming JSON response and its UI does not expose a distinctive diffusion animation.
dsh-image-gen keeps the compatible image_gen name and model while improving the visible process:
…

