Introduction¶
DeepSeek Harness (DSH) uses a plugin-based architecture that allows the community to extend its functionality. When developers want to reuse existing Claude Code or Codex CLI subscriptions without integrating them through API keys, the dsh-subscriptions plugin provides a direct solution. Through the OAuth login flow, it converts a user’s local subscriptions into model providers that DSH can recognize.
Plugin Introduction¶
Name: dsh-subscriptions
Author: DevViking-Persike
Category: Model Inference
License: MIT
The core problem this plugin solves is enabling direct access to users’ purchased Claude and ChatGPT/Codex subscription services within the DSH ecosystem, achieving model inference without API keys.
Core Features¶
- OAuth Login: Obtains credentials through the OAuth flow, eliminating the need to manually configure API keys.
- Dual Routing Support: Provides two routes,
/claudeand/codex, corresponding to different model providers. - Secure Storage: Credentials are atomically written to local files; file permissions are set to 0600, and a cross-process write lock prevents conflicts.
- Model Support: Includes built-in support for the GPT-6 Astra and Claude Fable 5.1 models.
- Security Design: Tokens do not appear in error messages, logs, or status endpoints; upstream error bodies are sanitized before being returned.
Installation and Activation¶
First, run the installation command. The installation process automatically handles dependencies and patch application:
dsh plugin --profile web add github:DevViking-Persike/dsh-subscriptions
After installation is complete, restart the dsh process to load the plugin.
Access the following addresses to perform OAuth login:
* Claude route: http://127.0.0.1:1458/claude/start
* Codex route: http://127.0.0.1:1458/codex/start
The browser will redirect to the official login pages of the respective vendors. After a successful login, credentials are automatically stored in the ~/.dsh/ directory.
Configuration and Usage¶
After installation and restart, the plugin listens on 127.0.0.1:1458 by default. You can adjust the following parameters in the DSH configuration file:
Basic Configuration Items:
| Field | Default Value | Description |
|---|---|---|
routes |
['claude', 'codex'] |
List of routes to enable |
controlPort |
1458 |
Local listening port |
streamIdleTimeoutMs |
300000 |
Transport-layer idle timeout |
YAML Configuration Example:
- id: dsh-subscriptions
name: 'dsh-subscriptions'
config:
routes: ['claude']
controlPort: 1458
Endpoint Usage:
- Check Status:
GET /<route>/status(returns connection status and token expiry time) - Log Out:
POST /<route>/logout(clears local credentials)
Notes and Limitations¶
- Version Compatibility: The plugin is sensitive to the Harness version and must be compatible with the current DSH version. During loading, it validates the chunk vocabulary; if there is a mismatch, it refuses to mount.
- Callback Address Binding: The OAuth callback address is fixed to
127.0.0.1. If your host resolveslocalhostto::1(IPv6), the browser callback may not reach the plugin, causing login to fail. - Static Model Catalog: The model list is statically configured and does not support automatic discovery. If your subscription includes models that are not listed in the catalog, you must explicitly specify their names in the configuration.
- Image Input Dependency: Image input functionality depends on the Harness attachment service (
ctx.attachments). If that service is not running, image requests will be rejected. - Codex Limitation: Configuring
stop sequencesis not supported through the/codexroute. - Credential Management: If credential refresh fails, the plugin does not delete locally stored credentials; you must manually clean them up via
POST /logout.
Summary¶
The dsh-subscriptions plugin provides DeepSeek Harness users with the ability to directly reuse their existing Claude and ChatGPT/Codex subscriptions. Through OAuth, it simplifies API key management and emphasizes the security of credential storage.
- GitHub Repository: https://github.com/DevViking-Persike/dsh-subscriptions
- Plugin Directory: https://www.skillhub.cn/plugins/DevViking-Persike/dsh-subscriptions