The plugin mechanism of DeepSeek Harness (DSH) allows developers to extend functionality as needed. When handling multi-model routing, directly adding authentication capabilities for ChatGPT Codex sometimes requires an additional model adapter. The @sipi/dsh-openai-codex-auth plugin is designed to address this scenario. It adds device code login support to pi-ai routing without introducing additional model adapters by providing OAuth storage and an interactive authentication controller.

Plugin Introduction

The plugin is maintained by z331225718 and is an independently versioned install package. It is primarily responsible for storing OAuth credentials and registering the openai-codex interactive authentication controller, enabling users to directly use ChatGPT device code login on the Models page.

Core Features

The plugin provides the following capabilities:
* Provides OAuth storage.
* Provides an openai-codex interactive authentication controller.
* Supports ChatGPT device code login on the Models page.
* OAuth requests run in the DSH Node process.

Installation and Enablement

Use the following command to install:

dsh plugin --profile web add @sipi/dsh-openai-codex-auth

After successful installation, the plugin inserts an openai-codex-auth configuration line. To uninstall the plugin and its credential contributions without modifying the base adapter, run:

dsh plugin --profile web remove @sipi/dsh-openai-codex-auth

Typical Usage

After installation, the Models page provides an entry point for ChatGPT device code login. OAuth requests are executed in the DSH Node process.

In a Node 24 environment, if you need to use proxy environment variables, set the following environment variable:

NODE_USE_ENV_PROXY=1

To customize the OAuth storage location, you can configure path or dshHome. For example:

- id: openai-codex-auth
  name: '@sipi/dsh-openai-codex-auth'
  config:
    dshHome: ~/.dsh

Applicable Scenarios and Notes

This plugin supports only OpenAI’s device authorization method. It depends on the @deepseek-ai/dsh-llm-pi-ai directory exposing openai-codex OAuth; otherwise, activation will fail.

Please note the following during use:
* Node version dependency: In Node 24, OAuth proxy environment variables require NODE_USE_ENV_PROXY=1 (or --use-env-proxy).
* File permissions: POSIX files are atomically replaced using the 0600 mode; Windows users must protect the ACL of DSH_HOME.
* Data isolation: The browser RPC state does not contain tokens or raw provider responses.
* Startup dependency: When developing or using the plugin, ensure that the pi-ai directory exposes openai-codex OAuth.

Summary

This plugin provides DSH users with a complete OpenAI Codex device login solution without adding model adapters. For related source code and directory information, visit: