Use your ChatGPT account in DeepSeek Harness for coding conversations, image generation, and web search. Sign in from DSH, check your usage, and manage these capabilities in one settings page.
Quick start · Image generation · Settings · Configuration
See it in action

An actual run: a 1254 × 1254 PNG, saved to the workspace, available to download, followed by a normal assistant reply. The screenshot shows the Chinese DSH interface; the settings and image card support English too.
What you get
| Capability | In DSH |
|---|---|
| Coding conversations | The openai-codex model route, including streamed replies and image context. |
| Account & usage | ChatGPT sign-in, CLI login import, cancellation, sign-out, plan and usage windows when available. |
| Image generation | The imagegen tool, inline preview, dimensions, download, and workspace save status. |
| Reference images | Edit using workspace images or recent image attachments. |
| Web search | A Codex search provider with cached, indexed, and live modes. |
| Native settings | A full Codex page and a compact Plugins card, with light/dark themes and English/Chinese labels. |
Quick start
Requires a current DSH installation with the 0.1.5 adapter interfaces and Node.js 22.19+ or 24+.
dsh plugin --profile web add dsh-codex-adapter@latest
dsh web
- Open Settings → Codex and sign in with ChatGPT, or import your existing Codex CLI login.
- Choose a model under Codex in the conversation model picker.
- Start a conversation, or ask for an image.
If dsh-codex is already installed, remove it before adding this adapter: both own the same openai-codex route.
dsh plugin --profile web remove dsh-codex
Image generation
Try this in a conversation:
Generate one watercolor illustration of an orange cat by a sunny window, with a small green plant and no text. Save it as window-cat.png.
The image card shows the result, its dimensions and size, a download button, and the workspace save status. DSH may collapse completed tool calls; expand the tool group to see the image again.
For image editing, provide referenced_image_paths or num_last_images_to_include to imagegen. Use one reference method per call, with up to five images.
Generated images are durable attachments, so the conversation can continue with image context. Local saves respect workspace access, cancellation, and observed-file protection. A remote filesystem must provide binary writing to support workspace saves; otherwise the image remains available as an attachment and download.
Settings
- Account: browser or device sign-in, manual callback fallback, cancel, CLI import, and sign-out. Login attempts expire after ten minutes.
- Usage: plan, remaining allowances, reset times, and credits when returned by the service. Missing data stays unknown; an unavailable usage request does not sign you out.
- Capabilities: image generation/editing, web search, and search mode. Saved changes apply to subsequent requests.
Web search
Enable web search in Settings → Codex. If several search providers are available, select Codex explicitly in your profile patch:
# ~/.dsh/profiles/web/cordis.patch.yml
- id: web
config:
searchProvider: openai-codex
fetchProvider: http
The setting DSH_WEB_SEARCH_PROVIDER=openai-codex is another way to select the provider. This plugin supplies search; DSH's configured fetch provider still owns page fetching.
Credentials & compatibility
Sign-in state uses DSH's credential service. A standalone CLI document can seed an empty record; refreshes then use the shared credential writer. Sign-out clears both so an older file cannot silently sign you back in.
dsh plugin --profile web exec dsh-codex-adapter status
dsh plugin --profile web exec dsh-codex-adapter import
status prints account metadata, never tokens. The CLI also supports login, logout, and an optional import path. See configuration and authorization for storage locations and advanced settings.
The adapter follows the installed PiAiAdapter contract, including model errors and attachment resolution. It does not implement the other bundle's fast mode, native compaction, or /codex terminal command.
Implementation & acknowledgements
Authentication is built on pi-ai's openaiCodexProvider, with authentication flow and settings UI references from Yan-Zero/dsh-codex. At runtime, pi-ai provides model communication, OAuth sign-in, and credential refresh; DSH's PiAiAdapter connects the provider to the harness.
Image generation/editing and ChatGPT's built-in web-search integration are implemented by this project. The adapter directly calls the ChatGPT Codex backend's image and search endpoints, reuses the credentials managed by pi-ai, and integrates the results with DSH's tools, attachments, and search service. The provider's image-input capability lets conversation models receive images; image generation uses this adapter's separate imagegen client.
The local binary-write compatibility code used to save generated images is adapted from dsh-codex 0.2.9 and retains its Apache-2.0 license. The remainder of this package is MIT licensed.
Automated releases
Tagged releases use GitHub Actions and npm Trusted Publishing. Push v<package.json version> to run a clean install, the full checks, and publication to latest. The workflow rejects mismatched tags, leaves existing immutable versions intact, and uses GitHub OIDC instead of a stored npm publish token.
The first npm version is bootstrapped interactively; subsequent versions use the package's trust binding to baixianger/dsh-codex-adapter and release.yml.
Development & feedback
npm ci
npm run check
No comments yet. Be the first to write one.