DSH Connect: Connecting DeepSeek Harness to ChatGPT and Grok via OAuth

Introduction

When developing agents in DeepSeek Harness (DSH), model providers often require their own set of keys or adaptation methods. If you prefer to log in directly with a ChatGPT or Grok account instead of configuring an OpenAI API key or xAI API key within Harness, you need a connector that links the official client directly to the Harness model router. Below is an introduction to the community plugin DSH Connect (npm package name @canary-builds/dsh-connect): ChatGPT via the official Codex app-server, Grok via the official Grok CLI, and provides a Settings → DSH Connect configuration panel in the browser.

What is this

DSH Connect is a Cordis community plugin maintained by Canary Builds (GitHub: canarybuilds/dhs-connect), classified under model inference capabilities. It provides model provider adapters and a web settings interface: the ChatGPT provider ID is openai-codex, and the Grok provider ID is xai-grok; neither binds to a single fixed model. Harness remains responsible for tool execution and permissions; the connector disables Codex’s native tools, and Grok does not gain shell or file system access, with tool requests being handled by Harness.

Core Features

The capabilities listed in the documentation include:

  • Account-side model discovery and curated fallback list merging; models not in the list can still be requested.
  • Settings and model selector share a model directory, supporting refresh and connection diagnostics.
  • Text streaming output, reasoning summary, Harness dynamic tool calling, and token statistics.
  • Request cancellation, RPC timeout, process recovery, and independent auxiliary calls.
  • Session rebuilding after restart, compression, or tool definition changes.
  • No runtime npm dependencies, and no automatic binary download.

The plugin also provides CLI tools: dsh-connect-login, dsh-connect-grok-login, and dsh-connect-doctor, used for login and environment checks.

Installation and Enablement

DSH will not scan the user’s home directory for node_modules; it is only installed within the profile workspace (e.g., ~/.dsh/profiles/web corresponding to the browser UI), and the package name must be written in the profile’s package.json under dsh.profile.bundles, otherwise the plugin is invisible to DSH.

It is recommended to use the profile command for installation, which will execute the package manager within the profile and append the package to bundles:

dsh plugin --profile web add @canary-builds/dsh-connect

The CLI profile uses --profile headless. After release, you can pin a version, for example:

dsh plugin --profile web add @canary-builds/dsh-connect@0.4.0

If dsh plugin is unavailable, you can manually install in the profile directory and append @canary-builds/dsh-connect to bundles while preserving existing entries (e.g., @deepseek-ai/dsh-base, @deepseek-ai/dsh-web-app):

cd ~/.dsh/profiles/web
npm install @canary-builds/dsh-connect
"dsh": { "profile": { "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "@canary-builds/dsh-connect"] } }

After installation, restart the corresponding profile process (e.g., systemctl --user restart dsh-web), and refresh the browser. Only install for the profiles you actually use.

Note: This package does not bundle the model CLIs themselves. ChatGPT requires the official Codex executable to exist on the PATH (e.g., npm install -g @openai/codex); Grok requires the official Grok CLI named grok. You may install either one. You can check this using ~/.dsh/profiles/web/node_modules/.bin/dsh-connect-doctor under the profile; the absence of Codex does not mean the plugin installation failed, and Grok can still be logged in separately.

If there are still old adapters in the profile declaring the same openai-codex route (such as dsh-plugin-codex-astra or dsh-openai-oauth), they should be removed before installation to avoid routing conflicts; existing Codex login directories can be retained to preserve authentication.

The current public package version is 0.4.0 (MIT license), requiring Node >= 22.19.0. The README indicates testing was done on DSH 0.1.1-rc.2 and Codex 0.153.4 (Linux).

Typical Usage

  1. Complete the installation above and restart the DSH Web service.
  2. Open Settings → DSH Connect in the browser, and follow the prompts to complete Sign in with ChatGPT and/or Grok login.
  3. In the Harness regular model selector, select the model under the corresponding provider and start a conversation.

Grok device code login can be completed in Settings, or by running dsh-connect-grok-login on the server. dsh-connect-login also supports --device-auth for Codex when allowed by the account.

If you are forwarding the Web port via SSH on another machine, the ChatGPT OAuth callback will land on the machine running the browser at 127.0.0.1:1455; you need to forward both the DSH Web port (commonly 3080) and 1455 until the login is finished, for example:

ssh -N -o ExitOnForwardFailure=yes -L 3080:127.0.0.1:3080 -L 1455:127.0.0.1:1455 user@harness-host

Grok device login does not depend on port 1455.

Configuration and Environment Variables

It defaults to looking for codex on PATH, and the ChatGPT login directory defaults to ~/.deepseek-harness/codex. You can specify the binary and directory via environment variables or ~/.dsh/connect.json (you can also use DSH_CONNECT_CONFIG to override the path):

Variable Purpose
DSH_CODEX_BIN Absolute path to the Codex executable
DSH_CODEX_HOME Codex login and configuration directory
DSH_GROK_BIN Absolute path to the Grok executable
DSH_GROK_HOME Grok login directory (default ~/.grok)
DSH_CONNECT_CONFIG Configuration file path override
DSH_CONNECT_NO_PROXY Domain string appended to the subprocess NO_PROXY

Configuration file example:

{
  "codexBin": "/absolute/path/to/codex",
  "codexHome": "/absolute/path/to/codex-home",
  "grokBin": "/absolute/path/to/grok",
  "grokHome": "/absolute/path/to/grok-home"
}

The optional field noProxy is a comma-separated list of domains. Please do not store credentials in this file; authentication is managed by the official Codex / Grok executables. If you need to reuse an existing Codex login, you can point DSH_CODEX_HOME to the existing Codex home.

Suitable Scenarios and Notes

Suitable for: Developers who have already run agents or Web UIs on DSH and want to access models via ChatGPT or Grok account OAuth, and are willing to install the corresponding official CLI on the local machine or server.

Must Note:

  • The plugin runs with the current DSH process’s user and permissions; the CLI must be installed into the user-executable PATH with the same user, otherwise login will fail.
  • Before installation, please check the GitHub repository source code and MIT license yourself to confirm it meets your security and compliance requirements.
  • The DSH plugin ecosystem has an independent community directory site, with no official affiliation with DeepSeek / Hypersphere; this plugin is a community contribution, not a built-in item in the official app store.
  • Narrow-screen settings examples may be used in conjunction with the independent package @canary-builds/dsh-mobile-ui, which has no dependency on DSH Connect and needs to be installed via dsh plugin --profile web add as well.

Conclusion

DSH Connect connects ChatGPT (Codex app-server) and Grok (Grok CLI) to the Harness model router via OAuth, and completes connection and model directory management in the Web settings. For further understanding, you can check the community directory page canarybuilds/dhs-connect and the source code repository github.com/canarybuilds/dhs-connect.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye