dsh-codex-share
Verifieddsh-codex-share · v0.4.3 · MIT · Web UI
Use the local Codex CLI ChatGPT subscription login as a DeepSeek Harness LLM provider
Install
dsh plugin add dsh-codex-share Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Published to npm without a public repository. Inspect the package contents before installing.
Creators
Readme
dsh-codex-share
A DeepSeek Harness LLM adapter that uses the same ChatGPT subscription login as the local Codex CLI. It reads Codex's current auth.json for each model call. Codex CLI owns sign-in and token refresh; this package has no OAuth flow and stores no credential. Calls go to the Codex subscription backend through pi-ai's Codex Responses implementation, not the OpenAI Platform API endpoint.
Requirements
- DeepSeek Harness
0.2.0-rc.2(earlier releases are no longer supported), with Node.js^22.19.0 || >=24. - Codex CLI signed in with a ChatGPT account and configured for file credential storage. Run
codex loginand checkcodex login status. Codex must be able to read and update$CODEX_HOME/auth.json(default~/.codex/auth.json). - The harness process must run as the same OS user, or have read access to that same credential file. A keyring-only Codex login is not supported.
Install
Install the bundle into a harness profile:
dsh plugin --profile web add dsh-codex-share
On a fresh profile, pnpm may stop with ERR_PNPM_IGNORED_BUILDS for the pi-ai dependency tree. In $DSH_HOME/profiles/web/pnpm-workspace.yaml (default ~/.dsh/profiles/web/pnpm-workspace.yaml), set the generated allowBuilds entries for @google/genai and protobufjs to false, as the harness source workspace does. Then run dsh plugin --profile web remove dsh-codex-share followed by the add command again; a failed add can leave the package installed without activating its bundle layer.
For development from this checkout, from its directory:
dsh plugin --profile web add .
Restart the profile after installation or update. The bundle mounts one provider route, openai-codex-local, with the model catalog supplied by pi-ai 0.87, including GPT-6 Astra, Sol, and Luna, plus GPT-6.1 Sol (gpt-6.1-sol). GPT-6.1 Sol uses Codex’s default 272K context and supports low through max reasoning; its pricing follows OpenAI’s model documentation. GPT-6.1 Luna is not listed in the current OpenAI or Codex catalogs; use gpt-6-luna for Luna. This route replaces the plugin's earlier openai-codex route, which collides with pi-ai's configurable provider directory; update any saved model selection to openai-codex-local. The plugin appears in Settings → Plugins → Plugin list. Open Settings → Models and use Edit model IDs in the OpenAI Codex row to add subscription model IDs (one per line). The IDs are saved as additionalModelIds on the llm-codex-share entry in the profile's cordis.patch.yml and take effect without a restart. The installed catalog remains available; clearing the additional IDs restores it. For example, enter a model ID that your account can use but the catalog does not list yet. An unrecognized ID can be listed, but requests to it will fail if the Codex endpoint rejects it. Select a listed model in the model picker or agent preset. For a local Codex home outside the default location, set the absolute CODEX_HOME path in the environment that launches the harness. Direct Cordis composition can configure codexHome on the dsh-codex-share plugin instead.
The plugin intentionally does not refresh a stale token. When Codex writes a replacement, the next harness request reads it. When Codex's current access token has expired, harness calls fail until Codex refreshes its own login. An API-key-only Codex login is rejected; this route never falls back to OPENAI_API_KEY.
Optional GLM Coding Plan (global)
When GLM_API_KEY is non-empty in the Harness launch environment, this plugin also adds GLM Coding Plan (global) to the model picker under the glm-coding-global provider route. It uses pi-ai's installed Z.AI model catalog and the global Coding Plan endpoint, https://api.z.ai/api/coding/paas/v4 (not the China endpoint or the standard pay-as-you-go API).
Export your Coding Plan key before launching the Harness, or set it in a Harness launch .env file, and restart the profile. No manual model/provider configuration is needed. With no key, or an empty/whitespace-only key, the GLM route is omitted. ZAI_API_KEY does not enable this route. GLM requests use only GLM_API_KEY and do not require a Codex login; Codex requests continue to use the local Codex credential file. The key is not written to plugin settings. Available models follow the installed pi-ai catalog, plus GLM-5.3 Flash X (glm-5.3-flashx) when upstream does not yet list it. Flash X inherits Flash's 1M context, 128K maximum output, image input, and reasoning capabilities; its cost estimate is left at zero until upstream supplies model-specific pricing (this does not imply free usage). Z.AI's documentation currently says FlashX is not yet available on the Coding Plan; it is listed for forward compatibility, but requests may be rejected until your plan supports it.
Development
pnpm install --ignore-scripts
pnpm typecheck
pnpm test
pnpm build
pnpm pack
The development links in package.json and local overrides in pnpm-workspace.yaml point to the ../../deepseek-harness checkout. Replace those paths when developing elsewhere; consumers of the published package use the versioned runtime dependencies instead.