Foreword¶
DeepSeek Harness (dsh) adopts an “everything is a plugin” approach, where model providers, settings pages, commands, and more can all be extended via plugins. If you already have a ChatGPT / Codex subscription and wish to utilize your subscription quota in dsh, this plugin provides a direct path to do so.
dsh-llm-codex-oauth is maintained by Player-MINEPIG and licensed under the MIT License. Its purpose is to register the openai-codex provider (utilizing the openai-codex-responses online protocol) built into pi-ai as a codex-oauth provider for the dsh LLM seam. This allows dsh to select models under the codex-oauth provider within model settings for conversations.
Core Features¶
Subscription Model Access¶
The plugin registers a model provider named codex-oauth. The model catalog is maintained with the installed pi-ai version, for example:
gpt-5.3-codex-sparkgpt-5.4gpt-5.5gpt-5.6-*
After installation, the specific available models will be based on the pi-ai model catalog currently installed on your system.
Image Input¶
When pasting or dragging and dropping images on the web interface, it uses dsh’s durable attachment support, which includes:
- PNG
- JPEG
- WebP
- GIF
Only models declared to support image in the model catalog will receive images. Images within tool results like read_image will also be forwarded to the next turn.
Viewing images requires the profile to mount attachments; the web profile has this capability by default. For pure text models or when the attachment service is not mounted, image requests will be rejected.
Non-image files such as PDFs / Office documents will not be sent as multimodal blocks. If processing is needed, you can place them in the workspace and use file tools to read them.
OAuth Login and Credentials¶
Login uses auth.openai.com and employs the same OAuth client as the Codex CLI, using the device code login flow. This flow is headless-friendly and does not require a local callback server.
Credential handling is as follows:
- Refresh tokens / access tokens are stored only in the dsh credential database at
$DSH_HOME/.credentials.yaml. - The file permissions are set to
0600. - Tokens are not included in configurations, session logs, or this repository.
- When the access token expires, pi-ai automatically renews it using the refresh token within the serialized write path.
- The device code during the login state resides only in process memory; after a restart, the credential database is authoritative.
Settings Page and Commands¶
The settings page provides a “Codex Subscription (ChatGPT)” section, including login / logout buttons and real-time status.
The conversation side retains read-only commands:
/codex-status/codex-logout
Multi-turn Conversation¶
The plugin fully preserves the provider’s native replay metadata, such as signatures, supporting multi-turn requests across conversation turns.
Installation and Activation¶
The installation command is as follows:
dsh plugin --profile web add file:/path/to/dsh-llm-codex-oauth
Here, the file: prefix must be retained. Passing the directory path directly causes pnpm to install it in link: mode, which may lead Node to fail to find node_modules when resolving internal dependencies of the plugin using the real path.
If the ignored-builds prompt from pnpm 11 causes dsh plugin to report pnpm failed, you can change the placeholder value for allowBuilds: in the pnpm-workspace.yaml file within the profile directory to false, then re-run the same installation command.
After installation, run the following command to verify:
dsh --profile web --dump-config
If using dsh temporarily via npx, you can also use:
npx @deepseek-ai/dsh --profile web --dump-config
The output should include the llm-codex-oauth line.
Typical Usage¶
-
After restarting dsh, open the settings page and select “Codex Subscription (ChatGPT)” from the sidebar.
-
Click “Login ChatGPT Account”, follow the prompts to open the verification URL, enter the device code, and log in to your ChatGPT account.
-
After the status changes to “Connected”, go to the Models settings page and switch the model to one under the
codex-oauthprovider. -
To log out, you can return to the settings page and click “Logout”, or enter
/codex-logoutin the conversation. You can use/codex-statusat any time to check the status.
Use Cases and Notes¶
This plugin is suitable for users who already use the plugin system within dsh and possess a ChatGPT / Codex subscription. It primarily addresses the issue of “integrating subscription quota into dsh conversations” and does not provide image generation capabilities.
Please note the following limitations before use:
- The Codex ChatGPT backend does not accept
temperature,maxTokens,stop. temperature/maxTokenswill be silently ignored.stopwill still be rejected.reasoningEffortandsessionIdwill continue to be sent.- The plugin does not perform image generation.
- Non-image files such as PDFs / Office documents will not be sent as multimodal blocks.
- The model catalog follows the installed pi-ai version.
Security risks must also be clarified: This plugin calls the undocumented, officially unsupported ChatGPT web backend chatgpt.com/backend-api, which carries risks of violating OpenAI’s terms of service and account restrictions. The decision to use it must be evaluated independently.
This repository does not contain secrets. If you plan to push the repository, ensure .gitignore is effective and never commit $DSH_HOME/.credentials.yaml or its contents.
Before installation, it is recommended to review the source code and confirm that the MIT License meets your usage requirements. After activation, the plugin runs under the current dsh process permissions.
Conclusion¶
The core value of dsh-llm-codex-oauth is to integrate ChatGPT / Codex subscriptions into dsh via OAuth device code login under the codex-oauth provider, while maintaining necessary capabilities such as credential isolation, image input, and multi-turn replay.
GitHub Repository:
https://github.com/Player-MINEPIG/dsh-llm-codex-oauth
The community directory is an independent site and should not be interpreted as an official app store; no verifiable directory page address is provided in the current materials.