DSH Hub
dsh-image-gen cover

LeemanCheung/dsh-image-gen

dsh-image-gen

UIWeb UI2 GitHub stars· updated 2026-08-22

GPT Image 2 generation with progressive Codex-style previews for DeepSeek Harness

Install

npx @deepseek-ai/dsh plugin --profile web add dsh-codex-connect

Restart `dsh web` after install. Bundle APIs can change during the developer preview.

README badge

dsh-image-gen DSH Hub badge
[![DSH Hub](https://dshhub.dev/badge/leemancheung-dsh-image-gen.svg)](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.

中文说明

<p align="center"><img src="./assets/demo.svg" width="760" alt="Animated dsh-image-gen progressive preview" /></p> <p align="center"><img src="./assets/final-card.png" width="760" alt="dsh-image-gen completed durable image card" /></p>

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

AreaDelivered behavior
Tool and access pathsExposes 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 experienceSubscription 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 resultsSaves 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 compatibilityReturns text-only tool output to the model while retaining the image reference in UI metadata, including for nested Code Mode calls.
Safety boundariesResolves 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; no OPENAI_API_KEY is 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-motion support.

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:

Related plugins