在 DeepSeek Harness 里用 ChatGPT 订阅访问 Codex 模型并用 gpt-image-2 生成/编辑图片——无需 OpenAI Platform API key
Use your ChatGPT subscription in DeepSeek Harness to access Codex models and generate or edit images with gpt-image-2—no OpenAI Platform API key required.
安装
dsh plugin --profile web add github:stoneface10/dsh-codex-connect-plusGitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试
安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗
安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。
README
目录
English | 中文
Use your ChatGPT/Codex subscription inside DeepSeek Harness for Codex models and
gpt-image-2generation/editing—without an OpenAI Platform API key.
Sign in once with ChatGPT OAuth. Codex model requests use the signed-in account's subscription capacity; image generation/editing uses the same OAuth session and remains subject to account availability, region, limits, and upstream policy.
What you get
- Codex models in the normal DSH model picker — no separate CLI workflow.
gpt-image-2generation and editing — create images from prompts or edit 1–8 local references, with inline previews and local output files.- No OpenAI Platform API key or pay-as-you-go API billing setup — authorization comes from your user-approved ChatGPT/Codex OAuth session.
- Quota-conscious defaults — automatic model retries default to
0, and image requests are never silently retried.
Community derivative. Not affiliated with or endorsed by OpenAI, DeepSeek, or the upstream Codex Connect maintainers.
Features
- ChatGPT/Codex OAuth login and provider-native automatic refresh.
- OpenAI Codex model catalog through Harness's normal LLM service.
- Optional standalone Codex search provider.
- Optional
view_imagetool for vision-capable models. codex_image_generatefor 1-4gpt-image-2outputs.codex_image_editfor 1-8 local PNG/JPEG/WebP references and an optional mask.- Durable DSH attachments, session-authorized replay, inline preview, and local files under
outputs/codex-image. - Fixed upstream origins, no redirects, bounded inputs/responses, cancellation, timeout, strict image signatures, and redacted provider errors.
Requirements
- DeepSeek Harness
0.1.0-rc.7or newer. This release is adapted to the rc.7 keyed-slot settings-card API. On older Harness versions the package still installs (the plugin system does not enforce peer ranges), but the Plugin configuration card may not render, so upgrade Harness first or stay on0.1.0-beta.2for0.1.0-rc.5/rc.6-era Harness. - Node.js
^22.19.0 || >=24.0.0.
Install
Install the public npm beta:
dsh plugin --profile web add dsh-codex-connect-plus@beta
Immutable GitHub fallback:
dsh plugin --profile web add 'github:stoneface10/dsh-codex-connect-plus#v0.1.0-beta.4'
A matching .tgz is also attached to the GitHub prerelease.
For local development:
dsh plugin --profile web add link:/absolute/path/to/dsh-codex-connect-plus
Do not install dsh-codex-connect, dsh-codex-image-connect, and this combined package in the same profile: they own the same provider and tool names.
Configure
Open Settings → Plugins → Plugin configuration → Codex Connect Plus.
- Sign in with ChatGPT.
- Keep or change optional capability toggles.
- Save profile settings.
Default capability and quota-safety settings:
modelMaxRetries: 0
enableSearch: false
enableImageTool: false
enableImageGeneration: true
The package does not take over the profile's default model or global search route. modelMaxRetries: 0 avoids silently repeating a full subscription-backed request after a transient failure; users may deliberately select one or two retries in Plugin configuration when reliability matters more than quota conservation. Image generation/editing remains non-retrying because the provider may already have processed a timed-out request.
Image tools
Example requests:
Use codex_image_generate to create a high-quality portrait travel poster.
Use codex_image_edit with refs ["photo.png"] to replace the background.
Generated files resolve from the current DSH session cwd and are stored under:
outputs/codex-image/
Reference images are limited to 4 MB each and 8 images per edit request. Generation can take several minutes. A timeout or transport failure is not retried automatically because the upstream may already have processed the request.
Security and API status
- OAuth credentials remain in DSH's dedicated credential file. On POSIX systems the plugin checks owner-only permissions; do not copy, commit, or disclose this file.
- Refresh is performed by the pi-ai Codex provider through the locked credential store; the image module neither stores nor refreshes refresh tokens itself.
- Image requests use fixed HTTPS ChatGPT/Codex application endpoints and reject HTTP redirects.
- Before provider-controlled errors are surfaced, their length is bounded and recognized Bearer tokens, JWTs, authorization/token fields,
b64_json, and image data URLs are redacted. - Generated attachment reads are authorized through the owning DSH session; the plugin exposes no public attachment-reading route.
Codex Images uses an unpublished, changeable ChatGPT/Codex application backend, not a public or supported OpenAI Platform API. The feature may stop working after upstream changes; availability depends on the user's account permissions, subscription, region, limits, and upstream policy. Users are responsible for complying with applicable service terms.
Development
pnpm install
pnpm run check
npm pack --dry-run
The repository intentionally commits both src/ and generated lib/, matching the upstream distribution model. The npm/Release .tgz includes runtime files and documentation, but excludes source, tests, scripts, credentials, logs, and local outputs.
See the Token/quota optimization report (中文) for retry, cache, compaction, and subagent guidance. See RELEASING.md for the Alpha checklist.
Legal / provenance
dsh-codex-connect-plus is a derivative of dsh-codex-connect, which in turn includes software derived from Yan-Zero/dsh-codex.
Image-generation and in-conversation image UI portions include adaptations from dsh-image2-draw and codex-gpt-image. Applicable transitive attribution for dsh-multimodal is also retained.
See NOTICE and THIRD_PARTY_NOTICES.md.
OpenAI, ChatGPT, Codex, DeepSeek, and DeepSeek Harness are names or trademarks of their respective owners. This independent project is not affiliated with, endorsed by, or sponsored by those owners.
This project uses an existing user-authorized ChatGPT/Codex OAuth session. It does not claim that the Codex Images backend is a public, official, or supported API.
License
Apache-2.0. See LICENSE. Adapted third-party portions remain subject to THIRD_PARTY_NOTICES.md.
原始 README: https://github.com/stoneface10/dsh-codex-connect-plus/blob/main/README.md ↗
同类插件
查看全部 →
agent-vision-toolkit
为纯文本模型"看图“设计更好的视觉工具箱和技能,支持多图理解,图片问答,前端UI还原、GUI 自动化等,并可选无缝接入多个主流agent,直接识别粘贴图片| A vision toolkit and skill designed for text-only llms — image Q&A, long-screenshot OCR, frontend UI restoration, and GUI automation, with optional seamless integration for Codex, Claude Code, Pi, Oh My Pi, and OpenCode

api-relay-audit
从 DeepSeek Harness 对 AI API 中转站和 LLM 代理运行本地安全审计,生成 Markdown 报告,覆盖提示词注入、模型替换信号、工具调用改写、错误泄漏、流完整性和按 profile 启用的 Web3 风险。

OpenStory
✨ OpenStory 现已支持 DeepSeek Harness 插件! 现在可以通过 dsh-openstory 将 OpenStory 多智能体推演接入 DeepSeek Harness,让 agent 直接启动模拟、查看角色、下达指令并逐回合推进故事。查看 DSH 插件配置与使用指南。

phi
pi的编码代理 ∞ 提供者、子代理、hashline编辑和权限门

anysearch-dsh
DeepSeek Harness(DSH)的 AnySearch 网络搜索提供方与高级搜索工具。

codex-switch
Codex Switch 是一个 macOS 工具,一键配置 Codex 的自定义 API,同时保留官方 OpenAI 登录。保存后 Codex 的模型选择器里只会出现你选的那个 provider 的模型。也支持 Claude Code 的官方 / 自定义 API 切换。Codex Switch is a lightweight helper for configuring multiple coding-agent API routes. For Codex, it keeps Official OpenAI and a custom API provider configured in parallel, registers the custom model in Codex's mod