Introduction¶
The core design philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When using third-party services such as New API, developers often face fragmented API Key management and tedious model routing configuration. The dsh-oauth-newapi plugin connects to New API sites through the OAuth protocol, resolving pain points in account authentication and automatic model routing registration, and integrates New API into DSH’s Model Center.
What Is It?¶
This is a Model Provider plugin maintained by hrhgit. It functions as an OAuth provider, responsible for managing New API accounts, groups, and tokens within DSH, while automatically discovering models and registering model routes.
Core Features¶
- New API OAuth Provider: Supports logging in to compatible New API sites via OAuth.
- Account and Permission Management: Supports account configuration, group management, and token selection.
- Model Discovery and Routing: Automatically discovers models on New API and registers model routing into DSH’s Model Center through the
modelEntryRegistryservice. - Secure Storage: Uses DSH’s host authorization service to manage the credential lifecycle. OAuth credentials and New API tokens are stored only in host-owned credential/state storage and are not written to
localStorage. - Interaction Flow Support: Supports protocol and model selection flows.
Installation and Enablement¶
The plugin is hosted on GitHub. Since no official installation command is provided, it is recommended to obtain it using the following method:
git clone https://github.com/hrhgit/dsh-oauth-newapi.git
or install it through the DSH ecosystem directory. After enabling it, configure it in DSH’s Model Center.
Typical Usage¶
The plugin registers entries into Model Center through the settings.modelCenter.entry slot. When using it, first log in to the New API site via OAuth, then select the target group and token in the interface. The plugin automatically discovers available models under that token and adds them as route entries in DSH’s Model Center, making them directly callable.
Note that the logged-in account exists as a “sibling entry” to direct Base URL/API Key providers, retaining its specific group, token, discovery mechanism, protocol, and model selection flow.
Applicable Scenarios and Notes¶
- Applicable Scenarios: Developers who need to manage New API instances uniformly and want to perform identity verification and model invocation in DSH via OAuth.
- Runtime Environment: The Node.js engine requirement is
^22.19.0 || >=24.0.0. - Security Notes: The plugin stores only non-sensitive browser drafts (such as site fields and model search) in scoped/versioned keys. Sensitive OAuth credentials and tokens are strictly stored in host storage.
- Open Source License: MIT License. Please review the source code before use.
Conclusion¶
This plugin provides a standardized OAuth solution for integrating New API into the DSH ecosystem, balancing security and usability. For more configuration details, refer to README.zh-CN.md in the GitHub repository.