DeepSeek Harness plugin

dsh-subscription-search

ChatGPT/Grok subscription OAuth login, model routes, and ChatGPT → Grok → Exa → DeepSeek web-search fallback for DeepSeek Harness.

Jump to install

Source facts

Repository
shaomingbo/dsh-subscription-search
Latest update
Aug 19, 2026
Category
Docs & Rendering
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/shaomingbo/dsh-subscription-search
Plugin: dsh-subscription-search
Author: shaomingbo

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

dsh-subscription-search

ChatGPT / Grok subscription OAuth, model routes, and an ordered ChatGPT → Grok → Exa → DeepSeek web-search fallback for DeepSeek Harness (DSH).

This is a Host Cordis bundle for the published npx @deepseek-ai/dsh installation. It owns its own device-code login (no Codex/Grok CLI auth.json), keeps tokens in $DSH_HOME/.oauth.json (owner-only), synchronizes fresh access tokens into DSH's credential service, and provisions pi-ai model routes through the settings service without replacing your other providers.

It does not contain, upload, or commit any token.

What you get

CapabilityDetail
ChatGPT loginDevice-code sign-in under Settings → Search
Grok loginDevice-code sign-in under Settings → Search (accepts auth.x.ai / accounts.x.ai / x.com verification)
Model routesopenai-codex (ChatGPT subscription) and grok-build (Grok 4.6, reasoning off/low/medium/high/xhigh)
Web search chainChatGPT → Grok → Exa → DeepSeek, each with a 60s attempt budget and a 250s tool budget
Search settings panelChain status table, subscription connect/disconnect, weekly usage, Exa API key input
Weekly usageChatGPT (Codex) and Grok remaining weekly allowance, shown on the subscription cards and under the composer

Requirements

  • Node.js 22.19 or later
  • A DSH installation via npx @deepseek-ai/dsh (web profile)
  • ChatGPT Plus/Pro or SuperGrok/X Premium subscription for the subscription legs

Install

npx --yes github:shaomingbo/dsh-subscription-search#v0.1.4

The installer:

1. adds this package to ~/.dsh/profiles/web/package.json; 2. adds dsh-subscription-search to that profile's dsh.profile.bundles list; 3. removes the superseded dsh-codex-auth-bridge and dsh-grok-build-auth-bridge from the bundle stack; 4. removes bridge-owned grok-build / openai-codex routes from ~/.dsh/settings.yaml (your other providers stay untouched); 5. removes workspace symlinks to a DSH checkout from the profile node_modules (a checkout copy of the Models page calls providerAuth RPCs the published host does not expose); 6. runs pnpm install in the profile.

Restart npx @deepseek-ai/dsh web, open Settings → Search, and sign in with ChatGPT and Grok. The model picker then lists the ChatGPT models and grok-4.6; web_search tries the chain in order.

Alternative installation (official plugin path):

dsh plugin --profile web add github:shaomingbo/dsh-subscription-search#v0.1.4

How it works

Login

The plugin runs pi-ai's device-code OAuth flow for openai-codex and xai. The verification URL is validated against a hardcoded HTTPS origin allowlist before it is shown. Credentials persist in $DSH_HOME/.oauth.json with mode 0600 (directory 0700), written atomically. Nothing secret crosses the browser channel: the UI only ever receives the login id, the validated verification URL, the one-time code, and a secret-free status.

Model routes

Routes are provisioned through ctx.settings.update('llm-pi-ai', { providers: ... }), which merges per provider — your existing superacme / ollama / anthropic sections stay untouched.

  • openai-codex: keyless profile, so pi-ai uses its native openai-codex-responses transport with the synchronized access token.
  • grok-build: api: openai-responses, baseURL: https://api.x.ai/v1, apiKeyEnv: GROK_BUILD_ACCESS_TOKEN, with grok-4.6 declared including xhigh → high reasoning dispatch.

Before any openai-codex / grok-build stream, the plugin resolves the current OAuth token (refreshing an expired one under the store lock) and synchronizes it into the credential reference. A 10-minute background timer keeps the credential warm.

Search

The plugin registers one WebSearchProvider id subscription-search and switches the web row's searchProvider to it. The provider internally tries, in order:

1. ChatGPT — Codex Responses (chatgpt.com/backend-api/codex/responses) with native web_search, OAuth bearer + account selector; 2. Grok — xAI Responses (api.x.ai/v1/responses) with native web_search, OAuth bearer; 3. Exaapi.exa.ai/search with highlights, via EXA_API_KEY; 4. DeepSeek — Anthropic-compatible Messages (api.deepseek.com/anthropic/v1/messages) with the web_search server tool, via DEEPSEEK_API_KEY (shared with the DeepSeek model route).

An unavailable provider is skipped, a failure or 60s timeout continues to the next, caller cancellation stops immediately, and an empty result counts as success. Exhaustion raises a bounded error containing only provider ids, statuses, and safe codes.

tool-web is patched to fetch: false and searchTimeoutMs: 250000 (four 60s attempts plus switching overhead).

Weekly usage

When a subscription is connected, the host asks ChatGPT and Grok for the current weekly allowance (Codex also reports its 5-hour window) and returns only percentages and reset times. The Settings → Search cards show the detail; a compact readout sits under the composer next to the shipped stats line. Failures stay on that row and never include tokens, account ids, or upstream error bodies.

Environment overrides

VariableDefaultPurpose
DSH_SUBSCRIPTION_SEARCH_SOURCEgithub:shaomingbo/dsh-subscription-search#v0.1.4Installer package source
DSH_HOME~/.dshHarness home; .oauth.json lives here

Security notes

  • Tokens stay in $DSH_HOME/.oauth.json (0600); only short-lived access tokens are copied into $DSH_HOME/.credentials.yaml through the normal credential service.
  • The loopback-only subscription channel rejects non-loopback clients; responses never include token values, account ids, or upstream error bodies.
  • Redirects are rejected on every credential-bearing search request.
  • If OPENAI_CODEX_ACCESS_TOKEN / GROK_BUILD_ACCESS_TOKEN are exported in the parent environment, they shadow the writable credential store. Unset them before starting DSH.

Migrating from the CLI-auth bridges

If you previously installed dsh-codex-auth-bridge or dsh-grok-build-auth-bridge, the installer removes them from the bundle stack. The old CLI auth.json files are no longer read; sign in again under Settings → Search. Remove the now-unused dependencies:

dsh plugin --profile web remove dsh-codex-auth-bridge dsh-grok-build-auth-bridge

Development

npm install
npm test
npm run check

License

MIT