
Hu9956/dsh-codex-provider
50Last commit Aug 13, 2026
dsh-codex-provider DSH plugin
This plugin integrates OpenAI Codex authentication into DSH through device-code OAuth flow. It allows users to log in with their OpenAI account, automatically refresh tokens, and use Codex models (gpt-5.4, gpt-5.5, etc.) in the model selector by consuming their ChatGPT subscription quota. The plugin also provides a supplier management UI in DSH settings.
How to install the dsh-codex-provider DSH plugin
dsh plugin --profile web add dsh-codex-providerCopying does not run this command. Review the repository and version before installing the dsh-codex-provider DSH plugin.
dsh-codex-provider DSH plugin data source
dsh-codex-provider DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-codex-provider DSH plugin can do
- Device-code OAuth login without API key
- Import existing login from Codex CLI (~/.codex/auth.json)
- Automatic token refresh with refresh token rotation
- Supplier management interface showing login status, account, plan, token expiry
- Activate built-in openai-codex models in DSH after login
Where the dsh-codex-provider DSH plugin fits
- Use ChatGPT Plus/Pro subscription to power Codex models inside DSH without needing an OpenAI API key
- Seamlessly switch between Codex CLI and DSH with the same OAuth session
- Manage multiple OpenAI accounts or switch between accounts via the supplier UI
- Automate token refresh to avoid manual re-authentication during long sessions
Who the dsh-codex-provider DSH plugin is for
- DSH users who have a ChatGPT Plus/Pro subscription and want to use Codex models without API key
- Developers already using Codex CLI who want to integrate the same session into DSH
dsh-codex-provider DSH plugin limitations
- Only supports OpenAI Codex (ChatGPT Plus/Pro subscription), not other providers
- Requires DSH >= 0.1.0-rc.6 and Node.js 22 (verified)
- User must manually enable 'Device code authorization for Codex' in ChatGPT web settings before login
- Shares OAuth session with Codex CLI; token refresh on one side may invalidate the other side's refresh token
- Plugin is in early RC stage; interfaces may change with future DSH versions
dsh-codex-provider DSH plugin: from the repository README
Quoted from the Hu9956/dsh-codex-provider README, the upstream source of the dsh-codex-provider DSH plugin. Copyright remains with the original authors.
DeepSeek Harness (DSH) 供应商插件:**OpenAI Codex(ChatGPT Plus/Pro 订阅)** 的设备码 OAuth 登录、令牌自动刷新与供应商管理。 在 DSH 设置中新增 **“供应商”** 分区,通过设备码授权登录 OpenAI 账号后,即可在模型选择器中使用 DSH 内置的 `openai-codex` 模型(`gpt-5.4`、`gpt-5.5`、`gpt-5.6-*` 等),消费你的 **ChatGPT Plus / Pro 订阅额度**。 ## ✨ 功能 - **设备码 OAuth 登录**:在界面点击“使用 OpenAI 账号登录”,按提示完成设备码授权,无需 API Key - **导入 Codex CLI 登录态**:直接复用本机 `~/.codex/auth.json` 中已有的登录(无需重新授权) - **令牌自动刷新**:后台定期检查 access token,过期前自动用 refresh token 轮换(refresh_token 也会一并轮换) - **供应商管理界面**:设置 → 供应商,展示登录状态、账号、套餐(Plus/Pro)、令牌过期时间,支持退出登录 - **激活内置 Codex 模型**:登录后 `openai-codex` 路由自动激活,模型选择器直接可选 <img width="1590" height="776" alt="ScreenShot_2026-08-14_020002_683_副本" src="https://github.com/user-attachments/assets/4c2d8b0e-edb8-46a8-876d-f297f0ec8f54" /> <img width="1892" height="1020" alt="ScreenShot_2026-08-14_043716_413" src="https://github.com/user-attachments/assets/09abd005-4432-4eb9-b9fc-6acab9772361" /> ## 📦 安装 ```bash dsh plugin --profile web add dsh-codex-provider ``` 插件包自带 DSH bundle 配置,安装时会自动加入 profile,无需手动编辑 `cordis.patch.yml`。 重启 dsh web 服务(Ctrl+C 后重新运行启动命令),刷新页面即可在 **设置 → 供应商** 看到入口。 也可以从 GitHub 安装当前源码版本: ```bash dsh plugin --profile web add github:Hu9956/dsh-codex-provider ``
Read the full READMERepository license: MIT
dsh-codex-provider DSH plugin questions
How do I install the dsh-codex-provider plugin?
Run the command `dsh plugin --profile web add dsh-codex-provider` in your terminal. This will install the plugin and automatically add the required bundle configuration. After installation, restart your DSH web service (Ctrl+C then restart the startup command) and refresh the page to see the supplier entry in Settings.
Do I need an OpenAI API key to use this plugin?
No, you do not need an API key. This plugin uses device-code OAuth to authenticate with your OpenAI account and consumes your ChatGPT Plus/Pro subscription quota. The plugin directly connects to chatgpt.com/backend-api, the same channel used by the official Codex CLI.
What should I do if the device code authorization fails?
First, make sure you have enabled the 'Device code authorization for Codex' toggle in your ChatGPT web settings (Settings → Account Security & Login). Then copy the device code displayed on the plugin page, click 'Log in with OpenAI account', and paste the code when prompted. The authorization flow strictly follows OpenAI's device code protocol.
Can I use this plugin together with Codex CLI?
Yes, they share the same OAuth session. When you log in via the plugin, it also writes the tokens to the credential store, which is compatible with Codex CLI. Note that token refresh on either side may invalidate the other side's old refresh token – if that happens, simply re-run `codex login` on the CLI side.
Which models are available after login?
The plugin activates the built-in `openai-codex` models in DSH, such as `gpt-5.4`, `gpt-5.5`, and `gpt-5.6-*`. The exact list depends on your DSH version and the permissions of your OpenAI account. You can see available models in the model selector after a successful login.