Connect a ChatGPT account to Codex models in DeepSeek Harness through browser PKCE or device-code OAuth, with automatic token refresh and Web or headless login.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:AdonisSheldon/dsh-openai-oauth
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
Sign in to ChatGPT from DeepSeek Harness and use available Codex models without an OpenAI API key or Codex CLI. The plugin keeps the standard DSH sessions, tools, permissions, and model selector.
Features
- Browser login with PKCE or Device Code login
- Web settings and a headless login command
- Automatic token refresh
- Models and reasoning levels discovered from the signed-in account’s Codex catalog
- Codex native web search through ChatGPT OAuth, without a DeepSeek API key
- Credentials stored locally under the Harness home
Requirements
- DeepSeek Harness
0.2.1-rc.5 - Node.js
^22.19.0or>=24.0.0 pnpmonPATH- A ChatGPT account with Codex access
Version 0.3.0 supports macOS and Linux. Windows support is not included yet.
When upgrading from plugin 0.1.x, upgrade DSH first, reinstall the plugin, then restart DSH. Saved OAuth credentials remain in the same location.
Install
Install with an Agent (recommended)
Give this address to an Agent and ask it to follow the runbook:
https://raw.githubusercontent.com/AdonisSheldon/dsh-openai-oauth/main/AGENTS.md
When it finishes, you only need to approve any DSH restart and complete the ChatGPT login yourself.
Install with DSH
After the package is published:
dsh plugin --profile web add dsh-openai-oauth@0.3.0
dsh --profile web --dump-config
Install from the current checkout
pnpm install --frozen-lockfile
pnpm run check
pnpm pack
dsh plugin --profile web add ./dsh-openai-oauth-0.3.0.tgz
dsh --profile web --dump-config
Restart a running DSH Web process after installation.
Login and use
- Open Settings → OpenAI OAuth.
- Choose Browser login or Device Code.
- Sign in with a ChatGPT account that has Codex access.
- Open Models and select an
openai-codexmodel.
Browser login waits for a callback on 127.0.0.1:1455. Use Device Code when that port is unavailable or the browser is on another machine.
For a headless profile:
dsh plugin --profile headless add ./dsh-openai-oauth-0.3.0.tgz
dsh plugin --profile headless exec dsh-openai-login
The command asks which login method to use. Non-interactive terminals must pass --browser or --device-code.
Web search
The bundle selects openai-codex-search through the existing DSH web provider interface, without changing Harness source. After ChatGPT sign-in, ask the Agent to search the web. The standard search tool displays results and source links and records the query and result in the Session. Web fetching keeps the profile's existing fetch provider.
Each query makes an additional Codex model request with the native server-side web_search tool and uses the signed-in ChatGPT account's quota. Queries are sent to OpenAI; the full conversation is not sent. Search and authentication failures are reported directly, without falling back to DeepSeek API access.
Search follows the initiating Session's selected Codex model. Other model routes and calls outside a Session use the first visible model in the account catalog. Search availability depends on OpenAI and the selected model. To pin a search model or change the timeout, merge these settings into the profile's user configuration:
- id: llm-openai-oauth
config:
searchModel: gpt-6.1-sol # Replace with an available model that supports search
searchTimeoutMs: 90000
searchModel is optional. searchTimeoutMs defaults to 90000 milliseconds, with a minimum of 1000. To retain a different search provider, override web.config.searchProvider in the profile's user configuration. Uninstalling restores the original profile selection.
Update and uninstall
dsh plugin --profile web update dsh-openai-oauth
dsh plugin --profile web remove dsh-openai-oauth
Restart DSH after installing, updating, or removing the plugin. Login, logout, and token refresh do not require a restart.
Sign out in Settings → OpenAI OAuth before uninstalling if the stored credential should also be deleted. Uninstalling the package otherwise preserves it.
Notes
- This connects a ChatGPT account to the Codex model provider; it does not create an OpenAI API key.
- The Web integration supports only a local DSH Host bound to
127.0.0.1. - Credentials are stored unencrypted at
$DSH_HOME/plugins/dsh-openai-oauth/credentials.json. - Model availability and quota depend on the signed-in account.
- OpenAI may change the Codex OAuth protocol independently of this plugin.
- This is an unofficial community project and is not affiliated with or endorsed by OpenAI or DeepSeek AI.
See SECURITY.md for security reporting and deployment notes.
Links
More in this category
Ebony-Vinyl/dsh-our-free-model★ 79981
Adds free model lanes to DeepSeek Harness — DeepSeek V4.1 Flash, Kimi K3 and others — with no login, sign-up or API key, plus a local OpenAI-compatible gateway, fallback routing and a usage dashboard.
dingminhua/dsh-connect-workbuddy★ 1778
Connects locally signed-in WorkBuddy models, CN and international alike, to DSH, reading each model's credit multiplier from the upstream catalog on every refresh, with per-model image input toggles, account switching backed by an auto-failing-over pool, manual daily check-in, and read-only credit overviews shown as compact pills on the card and in the composer.
Alice-Marx/dsh-model-router★ 987
Routes DeepSeek Harness work across configured model APIs and supported vendor CLIs with dependency-aware packages and cost previews.
V1ki/dsh-plugin-subscriptions★ 623
Use ChatGPT (Codex), Claude, and Grok subscriptions as DeepSeek Harness LLM providers, with Settings login, model catalogs, usage, plus image_generate, video_generate, and x_search tools.
XDTrees/dsh-workbuddy-xdpool★ 562
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool (multi-account rotation, live credits, and a model catalog showing per-model credit multipliers and free/night-discount tags).
XDTrees/dsh-xdpool★ 562
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool: multi-account rotation, 429 cooldowns, live credits, a model catalog with per-model credit multipliers and free/night-discount tags, QR-code login for 13 vendors, and aggregate free-tier channels. Accounts persist across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.