Introduction

Within DSH’s plugin system, ChatGPT subscriptions can be integrated into dsh web. dsh-chatgpt-subscription is maintained by songoao25. Its goal is to allow users with ChatGPT Plus / Pro subscriptions, or plans including Codex quotas, to complete official OAuth authorization in the DSH settings page, and then directly use ChatGPT models for conversation within DSH, consuming the corresponding subscription quotas.

It completes the binding through the plugin settings page and does not reuse existing codex CLI logins. After binding, ChatGPT models will appear in the DSH model switcher, with the provider displayed as ChatGPT.

What is this

dsh-chatgpt-subscription is a DeepSeek Harness (DSH) plugin. Its core capabilities include:

  • Binding ChatGPT subscription via official OAuth.
  • Using ChatGPT models within DSH.
  • Displaying binding status, token expiration, and remaining time in the subscription page of the settings sidebar.
  • Automatically maintaining access token and preserving the last available state if refresh fails.
  • Serving as a companion plugin for the Bottom Info Bar to provide token support for quota display.

Verified package information:

  • Package name: dsh-chatgpt-subscription
  • Version: 0.2.0
  • License: MIT
  • peerDependencies: react ^18.0.0
  • GitHub: https://github.com/songoao25/dsh-chatgpt-subscription

Core Functions

Official OAuth Binding

The plugin uses the official OAuth flow, completing the full PKCE + state authorization for auth.openai.com. The token is exchanged directly with OpenAI; the plugin does not save passwords.

Strict Official Mode

Only authorization completed through this plugin’s settings page counts as binding. Existing codex CLI logins are not silently reused.

Using ChatGPT Models in DSH

After binding, ChatGPT models will appear in the DSH model switcher with the provider ChatGPT, for example:

  • gpt-5.6-terra
  • gpt-5.5
  • gpt-5.4

When selecting these models for conversation, it will consume the ChatGPT subscription quota.

Token Guard

The plugin automatically refreshes the access token before it expires. The refresh logic is JWT-aware, with a refresh threshold of 45 minutes. Refreshed credentials will be injected into DSH credentials.

Execution timing:

  • Run once at startup.
  • Run every 30 minutes thereafter.
  • On refresh failure, preserve the last available state.

Binding Status Page

In DSH’s Settings → Subscription page, you can see:

  • Bound / Unbound status.
  • Token expiration and remaining time.
  • Available actions: Authorize Login, Re-authorize, Unbind.

Relationship with Bottom Info Bar

Bottom Info Bar is an optional companion plugin. This plugin is responsible for binding and token maintenance; Bottom Info Bar reads the token to display ChatGPT quotas, including 5-hour / weekly / monthly windows and reset times.

You can use this plugin directly without Bottom Info Bar; however, Bottom Info Bar’s ChatGPT quota display depends on this plugin.

Requirements

Before using this plugin, the following conditions must be met:

  • DeepSeek Harness (DSH) dsh CLI, with the ability to run the web interface dsh web.
  • pnpm for dsh plugin related installation.
  • ChatGPT Plus or Pro subscription, or a plan including Codex quota.

Installation and Enablement

Below is the one-click script installation method marked as recommended in the README. It clones the repository, enters the directory, and runs the installation script. It installs to the "web" profile by default, but can be overridden using --profile <name>.

git clone https://github.com/songoao25/dsh-chatgpt-subscription.git
cd dsh-chatgpt-subscription
./install.sh                # installs to the "web" profile; use --profile <name> to override

After installation, restart dsh web. Simply refreshing the page is insufficient; the plugin only takes effect after dsh web starts.

Typical Usage

  1. Restart dsh web, then open Settings in the sidebar.
  2. Click Subscription. This entry is located below Models.
  3. Click Authorize Login. The browser will open the official OpenAI login page.
  4. Log in with a ChatGPT account and approve authorization. Once complete, the page will show Bound.
  5. Create a new session, switch to a ChatGPT model (e.g., gpt-5.6-terra under provider ChatGPT), and start a conversation. At this point, the conversation will consume the ChatGPT subscription quota.

If the browser tab does not open automatically, please allow pop-ups in DSH.

Security and Local Storage

Token Storage Location

Tokens are stored only in:

  • ~/.codex/auth.json, with file permissions 0600.
  • DSH credential store.

Tokens are not logged and are not stored in the repository.

Local OAuth Callback

The local OAuth callback server only binds to 127.0.0.1, validates state, and times out after 5 minutes.

Unbinding Behavior

Clicking unbind removes the binding marker and injected credentials, but retains ~/.codex/auth.json. Existing codex CLI logins are unaffected.

Uninstall

If you want to uninstall the plugin, enter the repository directory and run the uninstall script:

cd dsh-chatgpt-subscription
./uninstall.sh

Uninstalling removes content added by this plugin but retains ~/.codex/auth.json.

Applicable Scenarios and Notes

Suitable users:

  • Already have a ChatGPT Plus / Pro subscription, or a plan including Codex quota.
  • Want to switch ChatGPT models directly within dsh web.
  • Want to authorize via the official OAuth page rather than relying on existing codex CLI logins.
  • Want to see binding status and token remaining time.

Notes to note:

  • The plugin runs with the current dsh process permissions. You should check the source code and license before installing.
  • After installation, you must restart dsh web; simply refreshing the page is not enough.
  • This plugin maintains the token, but the conversation consumes the ChatGPT subscription quota.
  • Bottom Info Bar’s ChatGPT quota display depends on this plugin; if only Bottom Info Bar is installed, you cannot obtain the binding and token maintenance capabilities provided here separately.

Conclusion

The problem dsh-chatgpt-subscription solves is specific: binding ChatGPT subscriptions within DSH using official OAuth, and managing binding status, token status, and re-authorization in the settings page. For those who need to integrate ChatGPT models into the DSH workflow, it provides a local, checkable, and unbindable integration method.

Repository address: https://github.com/songoao25/dsh-chatgpt-subscription.

No verified directory page links are provided in the available materials, so this article will not list unverified links.