Introduction

In the plugin-based usage of DeepSeek Harness, many capabilities can be integrated as plugins. For scenarios using the openai-codex provider, in addition to the model request itself, there is often a need to handle browser OAuth, local callbacks, credential saving, and access token refresh. dyuan311/dsh-openai-codex-oauth solves this type of login and credential management problem: it connects the ChatGPT subscription OAuth login to the DeepSeek Harness Web interface.

What is this

dsh-openai-codex-oauth is a community plugin for DeepSeek Harness, positioned as the ChatGPT subscription OAuth for the openai-codex provider.

This plugin uses the OAuth implementation provided by @earendil-works/pi-ai and uses the @deepseek-ai/dsh-llm-pi-ai model adapter.

Core Features

  1. Interactive Login: Supports /codex-login to start OAuth authorization.
  2. Credential Persistence: OAuth credentials are stored in OPENAI_CODEX_OAUTH_CREDENTIAL, and access tokens are stored in OPENAI_CODEX_ACCESS_TOKEN.
  3. Token Refresh: Provides capabilities related to refreshing access tokens.
  4. Login Status Query: /codex-status displays credential state, source, and access token expiry.
  5. Logout: /codex-logout clears stored OAuth credentials and access tokens.
  6. Login Methods: Supports browser OAuth using OAuth 2.0 Authorization Code with PKCE; also supports device-code login.

Installation and Activation

First, confirm that the runtime environment meets the requirements:

  • DeepSeek Harness 0.1.0-rc.6
  • Node.js 22.19.0 or newer
  • pnpm
  • An OpenAI account with Codex subscription access
  • Local TCP port 1455 available during browser login

The plugin runs with the permissions of the current dsh process. It is recommended to check the source code, dependencies, and license before installing. This project uses the MIT License; the upstream project is also distributed under the MIT License, and relevant copyright notices and license text are in THIRD_PARTY_NOTICES.md.

If you have a local tgz file, execute the following in the corresponding directory:

dsh plugin --profile web add ./dsh-openai-codex-oauth-0.1.1.tgz

After installation, enter the DeepSeek Harness Web interface to use the login commands below.

Typical Usage

First, open the Harness Web interface and send:

/codex-login

Follow the prompts to select browser login. You can also use an explicit method:

/codex-login browser
/codex-login device

After authorization is complete, select an openai-codex model from the model selector.

Check status:

/codex-status

Logout:

/codex-logout

Applicable Scenarios and Notes

Suitable for users already using the openai-codex provider in DeepSeek Harness and wishing to complete ChatGPT subscription OAuth login via the Web interface. It does not replace the model invocation itself, but rather supplements login, credential status, and logout cleanup.

When using OAuth, please note that access and refresh tokens correspond to the relevant OpenAI account. Please keep the Harness credential file private and keep the account controlled by a single user. At the same time, use it within the account’s usage allowance; OpenAI Terms of Service and specific plan rules determine subscription access permissions.

The Codex backend and request formats may change; future updates from OpenAI or pi-ai may require compatibility adjustments.

Links

This is an independent community integration; OpenAI, DeepSeek, and Pi retain their respective names and trademarks. Repository URL:

https://github.com/dyuan311/dsh-openai-codex-oauth