Preface¶
DeepSeek Harness (dsh) is an agent framework open-sourced by DeepSeek AI, designed under the principle of “everything is a plugin”: models, tools, and interfaces can all be attached via plugins. Many people already use Codex CLI daily, have run codex login on their local machine, and their ChatGPT subscription quota is tied to that account. When switching to DSH for coding and running Agents, however, they still need to apply for another OpenAI Platform API Key and pay separately by token. Two separate entry points, two separate billing cycles, when all they want is to connect their already-paid subscription to another harness.
The community plugin dsh-codex-subscription does exactly this: instead of going through the OAuth web login flow again, it directly reads the login credentials stored locally by Codex CLI, making ChatGPT subscription models appear in DSH’s model selector. It is maintained by yequ172672, currently has 14 stars on its GitHub repository, and is categorized under “Models and Providers” in the community directory. The directory site deepseek-harness-plugin.com is an independent indexing platform and has no official affiliation with DeepSeek / Horizon Robotics. Please verify the repository yourself before installing.
This article is organized after cross-checking the directory details page, GitHub README, package.json, and the npm page: what this plugin is, how to reuse credentials, how to install it, and how to configure a proxy.
What It Is¶
dsh-codex-subscription is an LLM adapter plugin for DSH. The directory page lists it under this repository name; the npm package name is dsh-llm-codex, with the current version 0.1.2. package.json declares the MIT license, and there is no separate LICENSE file in the repository root. It requires Node.js >=20, and its dependencies are aligned with DeepSeek Harness 0.1.0-rc.6.
The problem it solves is very specific: if you have already logged into ChatGPT Subscription via Codex CLI on your local machine, this plugin lets you continue using the same quota in DSH, rather than having to configure an OPENAI_API_KEY again. The plugin package includes dsh.bundle.patch (corresponding to cordis.bundle.yml), which will automatically become a profile layer after installation via the official dsh plugin command, without needing to manually edit the composition file.
After installation, a provider named Codex (ChatGPT Subscription) will appear in the web model selector, with the route name codex; the llm-codex entry will be listed in Settings → Plugins.
Core Features¶
Reuse Local Codex Credentials¶
After running codex login in Codex CLI, the OAuth token for your ChatGPT subscription will be written to ~/.codex/auth.json (or the directory pointed to by the CODEX_HOME environment variable). This plugin reads this file in the same way as the CLI, so you do not need to enter an API Key again.
There are two credential formats, as clearly explained in the README:
| Credential Format | Endpoint | Authentication Method |
| — | — | — |
| tokens (auth_mode: chatgpt, subscription) | https://chatgpt.com/backend-api/codex/responses | Bearer access_token, with Codex request headers such as chatgpt-account-id |
| OPENAI_API_KEY (auth_mode: apikey) | https://api.openai.com/v1/responses | Bearer API Key |
Daily usage follows the first method: subscription login. The second is a compatibility path when switching to API Key mode in the CLI, and is not the primary use case for this plugin.
The plugin re-reads auth.json with every request. If you switch accounts, log out, or log back in in your terminal, DSH will pick up the change on its next request without restarting the plugin.
Token Refresh and Writeback¶
When the access_token expires (HTTP 401), the plugin uses the refresh_token to request auth.openai.com/oauth/token. After a successful refresh, it will atomically write back to auth.json by default, then automatically retry the request once. This behavior matches the Codex CLI, keeping credentials synchronized between both tools.
If you do not want the plugin to modify this file, set writeBack to false in the settings. Expired tokens will only be refreshed in memory, and after restarting dsh, it will re-read the old token from disk and refresh again.
Model Catalog and Protocol¶
The model list is assembled in priority order:
1. staticModels explicitly provided in the configuration
2. Real-time request to GET {base}/codex/models
3. Fall back to reading ~/.codex/models_cache.json if the above fails
4. Use the built-in static list as a final fallback
The built-in fallback includes models such as gpt-5.6-sol, gpt-5.6-luna, gpt-5.6-terra, gpt-5.5, gpt-5.4-mini, and more. Which models your account can actually use depends on the real-time catalog or Codex’s local cache; the static list is only a backup when offline or the API fails.
The protocol uses the OpenAI Responses API, with SSE streaming enabled when stream: true. Inference summaries, body text, and tool calls are mapped to DSH’s reasoning / text / tool-call blocks respectively, and usage metrics are extracted from response.completed. The adapter currently only supports text-only content: content with images will be rejected with UNSUPPORTED_CONTENT.
Installation and Activation¶
The installation command given on the directory page can be run in the DeepSeek Harness terminal:
dsh plugin add github:yequ172672/dsh-codex-subscription
For reproducible installations, pin the commit as specified on the directory page. The latest commit on the current main branch is 200a5d3e32fadc99468f8a5e0764a6d089d3bb01 (2026-08-17, version bumped to 0.1.2):
dsh plugin add github:yequ172672/dsh-codex-subscription#200a5d3e32fadc99468f8a5e0764a6d089d3bb01
The repository README also provides an installation method using the npm package name, which installs the plugin to a specified profile (using web as an example):
dsh plugin --profile web add dsh-llm-codex
Both sources point to the same package. There are other similarly named Codex integration plugins in the community, so please verify that the maintainer is yequ172672 and the repository is yequ172672/dsh-codex-subscription when installing.
Prerequisites¶
The README lists four requirements, all of which must be met:
1. The dsh core has already been installed. If the dsh command is not available, install it from the official repository first, for example:
npm install -g @deepseek-ai/dsh
dsh --version
The official DeepSeek repository currently also recommends starting the Web UI directly with npx @deepseek-ai/dsh web. This plugin is a profile layer, so a working dsh installation must already exist.
2. pnpm has already been installed. The dsh plugin command will forward calls to it, and the CLI will prompt you if it is missing.
3. You have already run codex login. The plugin does not handle popping up the login page, it only reads local credentials.
4. You can access chatgpt.com. Domestic networks usually require a proxy, see the next section for details.
Verify Successful Attachment¶
You can check the combined configuration without starting the service:
dsh --profile web --dump-config
You should see lines containing # == dsh-llm-codex and llm-codex in the output. Then restart dsh, open the web interface, and Codex (ChatGPT Subscription) should appear in the model selector.
Typical Usage¶
Configure a Proxy¶
The ChatGPT backend often requires a local proxy. Node’s native fetch does not read system proxies, so you need to add this to $DSH_HOME/settings.yaml:
llm-codex:
proxy: http://127.0.0.1:7890
You can also use the HTTPS_PROXY environment variable. The priority order is: explicit proxy configuration > HTTPS_PROXY > HTTP_PROXY; hosts matching NO_PROXY will be connected directly. Change the port to match your local proxy software; 7890 is just an example from the README.
Settings changes support hot reload, so you do not need to restart after editing. Other optional fields include clientVersion (default 0.144.1), writeBack (default true), authFile, modelsCacheFile, and staticModels.
Set as Default Model¶
Also add this to settings.yaml:
agent-default-model:
provider: codex
model: gpt-5.6-sol
reasoningEffort: medium
gpt-5.6-sol is an example model from the README and built-in catalog. If your account pulls a different slug, change the model value to the actual ID shown in the selector.
Common Errors¶
| Symptom | Fix Suggested in README |
|---|---|
MISSING_CREDENTIAL: Failed to read Codex credential file |
Run codex login first |
TRANSPORT:Connect Timeout |
Failed to connect directly to the ChatGPT backend, configure a proxy |
| HTTP 401 with refresh failure | Subscription expired or flagged for risk review, run codex login again |
| HTTP 429 | Subscription quota exceeded or rate-limited, retry later |
| Empty model list | If real-time discovery fails and there is no models_cache.json locally, it will fall back to the built-in static list |
The repository also includes a smoke test that reads by default and will not write to auth.json:
npm run test:smoke
Set the HTTPS_PROXY environment variable if you need to use a proxy. This is a developer self-test path and does not need to be run during daily use.
The README also recommends pairing this plugin with dsh-session-import-codex: this plugin handles models and credentials, while that plugin handles importing Codex historical sessions into DSH. They are not from the same repository, so install them separately if needed.
Applicable Scenarios and Notes¶
This plugin is suitable for users who already use Codex CLI, have a valid ChatGPT subscription login locally, and want to connect the same quota to DSH for text conversations and tool calls. It is not suitable for: users who have not installed Codex CLI, do not have subscription eligibility, or primarily rely on multimodal (image) input — the current adapter will reject image content. The subscription quota is measured by OpenAI per account and shares the same quota as Codex CLI; running tasks in DSH will consume quota from the CLI side.
The plugin will read and, during refresh, rewrite ~/.codex/auth.json. This is a login state file, do not commit it to git, and do not enable writeBack in untrusted environments. Both the community directory and the README remind users: the plugin runs with the permissions of the current dsh process, and may execute code during installation. You should inspect the source repository and license before installing; for reproducible environments, pin the commit hash.
DeepSeek Harness is still in developer preview, and official documentation may introduce breaking changes in the future. This plugin depends on @deepseek-ai/dsh-llm and other 0.1.0-rc.6 packages. If the provider stops working after upgrading dsh, you should return to the repository to verify version compatibility instead of assuming permanent compatibility.
Summary¶
dsh-codex-subscription connects the local login credentials already saved by Codex CLI to DSH: subscription models appear in the selector, tokens are updated in sync with the CLI, and proxy and default model settings are written to settings.yaml. It is not a first-class citizen in the official app store, but an adapter written by the community following the “everything is a plugin” principle. First confirm that codex login works and that your network can reach the ChatGPT backend, then install via the directory page command, which will be more aligned with your existing subscription usage than configuring a separate Platform API Key.
Directory page: https://deepseek-harness-plugin.com/zh-CN/plugins/dsh-codex-subscription/
GitHub: https://github.com/yequ172672/dsh-codex-subscription
npm package: https://www.npmjs.com/package/dsh-llm-codex