Introduction¶
When integrating OpenAI models into DeepSeek Harness Desktop, the common approach is to provide your own OpenAI Platform API key, which operates on a pay-as-you-go basis with quotas managed separately from ChatGPT subscriptions. However, if you have already logged in with ChatGPT via the official Codex CLI on your local machine and possess Codex subscription credits, you might prefer to route requests directly through your subscription within the same desktop environment and view account details and remaining quotas in a native settings page, rather than maintaining a separate set of API keys.
Below is an introduction to the community plugin dsh-openai-auth (Maintainer: solstice621, Category: Client). It identifies or completes local Codex ChatGPT logins within Harness, reuses the Codex subscription credits of the same account, and provides a native “OpenAI / Codex” settings page. This plugin is an independent community project and is not affiliated with DeepSeek or official OpenAI plugins; it does not add credits, nor does it alter OpenAI account permissions or rate-limiting rules. The README specifies an MIT license, and no OpenAI Platform API key is required.
What is this¶
dsh-openai-auth consists of a native Harness bundle, a backend provider, and a client settings page. It reads local Codex login caches (or completes official authorization via a browser), handles renewal and quota queries through the official Codex CLI’s app-server, and synchronizes the model directory to Harness’s model selector. Dialogue capabilities reuse the Harness adapter’s streaming output, tool calling, history replay, and image processing.
Directory page: skillhub.cn/plugins/solstice621/dsh-openai-auth
Source code and documentation: github.com/solstice621/dsh-openai-auth
Core Features¶
The capability overview from the documentation is as follows (refer to the README feature table for usage details).
| Feature | Key Points |
|---|---|
| Reuse Existing Login | Identifies local Codex ChatGPT login caches (currently supports file storage: CODEX_HOME/auth.json or default ~/.codex/auth.json) |
| Browser Login | Initiates official ChatGPT browser authorization launched by Codex within the settings page; shares the login with local Codex, and re-logging in will switch the local Codex account |
| Auto / Manual Renewal | Tokens nearing expiration are updated in the cache by the official Codex CLI; the “Refresh Authorization” button on the settings page requests immediate renewal; reasoning requests also automatically renew when less than five minutes remain before expiration |
| Subscription Credits | Displays multiple credit windows, remaining ratios, and reset times returned by the official API; the page initially shows the last snapshot and refreshes in the background; the backend refreshes every 5 minutes by default (configurable) |
| Connection Toggle | “Disable this connection” only blocks new inference on the Harness side; it does not log out of Codex or delete caches |
| Model Auto-Sync | Synchronizes the directory via model/list at startup and every 6 hours by default; manual refresh is available in the settings page; and supplements GPT-6.1 Sol (low / medium / high / xhigh / max) for older Harness directories |
| System Proxy | On macOS, if no explicit Harness proxy is set, it can run according to the current system HTTP/HTTPS proxy (PAC / SOCKS-only currently unsupported) |
Regarding credentials: The plugin does not write access/id/refresh tokens into Harness settings or browser storage; login and renewal are written to the Codex cache by the official Codex CLI. The apiKey channel transmits the Codex OAuth access token and does not accept OpenAI Platform API keys.
Installation and Activation¶
Before installation, the official Codex CLI must be present on the local machine, and the account must be logged in via ChatGPT. The README verified combination is macOS + DeepSeek Harness Desktop 0.2.0-rc.2 + Codex CLI 0.154.0; the plugin is currently bound to the Harness 0.2.0-rc.2 interface, and other versions have not been verified. Keychain-only storage, Windows, and Linux desktop environments have not been verified.
- Confirm in the terminal that Codex is logged in with ChatGPT (if not logged in, run
codex loginfirst, or you can log in from the interface after installing the plugin):
codex login status
-
Open “Plugins” → “Add Plugin” on the left side of Harness.
-
Enter the GitHub package address, or download the
.tgzfrom Releases and fill in its absolute path:
github:solstice621/dsh-openai-auth#v0.3.2
-
Install and enable the plugin, then fully quit and reopen Harness.
-
Open “More” → “Settings” → OpenAI / Codex at the bottom left, and confirm the account is connected.
-
Select a model under OpenAI · Codex Credits in the session model selector, such as GPT-6.1 Sol.
The repository provides directly runnable JavaScript and native client entries; no prepare, postinstall, or third-party installation scripts are required, nor is modification of the App installation package or asar necessary. If the DeepSeek welcome page appears at startup, you can select “Add API Key” → “Configure Later” to use Codex models.
If the desktop process PATH cannot find codex, use command -v codex to check the path first, and configure the plugin in the desktop profile’s cordis.patch.yml (restart Harness required after modification, except for connection toggles):
- id: dsh-openai-auth
name: dsh-openai-auth
config:
codexCommand: /absolute/path/to/codex
# Optional; defaults to CODEX_HOME or ~/.codex
# codexHome: /absolute/path/to/.codex
# useSystemProxy: true
# refreshSkewSeconds: 300
# modelRefreshMinutes: 360
# modelDiscoveryCommand: /absolute/path/to/current/official/codex
# modelCachePath: /absolute/path/to/models.json
Common configuration options: codexCommand (default codex), quotaRefreshMinutes (default 5, range 1–1440), modelRefreshMinutes (default 360), refreshSkewSeconds (default 300). The quota snapshot cache is located at ~/.dsh/cache/dsh-openai-auth/<CODEX_HOME hash>/quota.json by default and can be adjusted via quotaCachePath.
Typical Usage¶
Using an account already logged into Codex
Enter the OpenAI / Codex settings page. You should see the email (can be hidden), subscription type, connection status, and authorization validity period without needing to copy tokens.
Switching or New Login
Click “Log in with ChatGPT” or “Re-log in with ChatGPT”; the browser will open the official page. The page updates automatically upon completion. The attempt will be cancelled after ten minutes; cancellation does not actively globally log out of Codex.
Viewing and Refreshing Credits
Opening the settings page first displays the last successfully read snapshot, which is then refreshed in the background via codex app-server; you can also click “Refresh Credits”. When DSH is running and the connection is enabled, the backend periodically saves successful snapshots even if the settings page is not open.
Disabling Codex on the Harness Side
After clicking “Disable this connection”, the provider will no longer initiate new inference, but the local Codex login and cache are retained; click “Enable this connection” when needed.
Switching Models
Switch to available models under OpenAI · Codex Credits in the session model selector; the plugin does not automatically rewrite the model of existing sessions, so manual switching is required.
Use Cases and Notes¶
Who it is for
Users who are already using DeepSeek Harness Desktop 0.2.0-rc.2 on macOS, have the Codex CLI installed locally, and are logged in via ChatGPT (file storage); who wish to chat using subscription credits within the desktop Harness and manage authorization and quotas in a native UI without configuring an OpenAI Platform API key.
Installation and Trust
The plugin runs with the current DSH process permissions. It will launch the Codex executable you configured and read the Codex login cache; conversation content is sent to OpenAI as normal model calls. Before installation, you should review the source code and MIT license of the GitHub repository and only configure trusted official CLI paths.
Permissions and Platforms
The presence of a model in the selector does not guarantee that the account has calling permissions; credits and rate limits are managed by OpenAI. To uninstall, first select another provider in Harness, then disable or uninstall via the “Plugins” page; Codex login itself is still managed by Codex.
Common Issues (Excerpted from README)
Not logged in or cache cannot be read: Confirm ChatGPT login; Keychain-only users can run codex -c cli_auth_credentials_store='file' login manually. Unable to start Codex: Configure the absolute path for codexCommand and restart. Network or proxy changes: Check reachability and restart Harness before refreshing authorization.
Conclusion¶
dsh-openai-auth integrates local Codex ChatGPT subscription login, renewal, and credit queries into the native settings and model selection workflow of Harness Desktop. It is suitable for developers who do not want to maintain a separate Platform API key but want to use Codex credit models within DSH. For details and screenshots, see the GitHub README; Community directory entry: skillhub.cn/plugins/solstice621/dsh-openai-auth.