Preface¶
DeepSeek Harness (DSH) adopts a modular plugin architecture. When integrating pi-ai models, the authentication flow typically requires OAuth support. The existing base integration only registers protocols and credential records, lacking an intuitive interactive interface and command-line management methods. The dsh-bundle-pi-ai-auth plugin adds Provider-card UI controls to the Models settings page for pi-ai providers and retains /auth-* commands as a fallback to manage OAuth capabilities, enablement status, and login status.
Core Features¶
This plugin provides the following capabilities on the DSH Web or Desktop side:
- Provider-card OAuth Control: Displays authorization status and action buttons on the Models settings page for each pi-ai provider that supports OAuth.
- Models Settings UI Integration: Provides “Sign in” and “Sign out” buttons. Clicking Sign in initiates the provider flow, opening the system browser to display a device code or follow-up questions.
- Command-Line Fallback: Provides a set of
/auth-*commands for manually managing providers. - Status Management: Separately manages OAuth capabilities, enablement status, and login status, without automatically creating temporary token environment variables.
- Credential Cleanup: The logout operation only deletes local credential records and does not revoke remote authorizations.
Installation and Activation¶
Ensure the environment meets dependency requirements before installation. This plugin depends on @deepseek-ai/dsh-llm-pi-ai and requires DeepSeek Harness 0.1.7-rc.2 or a compatible 0.1.x version. Additionally, the Web/Desktop bundle needs to include the authorization, credentials, settings, llm-pi-ai, Remote gateway, and Models settings UI components.
To install the plugin on the Web side:
dsh plugin --profile web add github:dingyiliao/dsh-bundle-pi-ai-auth
After installation, restart the application, add a provider in Settings → Models, and then use the Sign in action on the provider card.
Typical Usage¶
Command-Line Operations¶
The plugin provides the following commands for status checks and operations:
- List Status:
/auth-list- View all OAuth-supported providers and their enablement and login status. - Add and Sign In:
/auth-add [provider]- Add a provider and sign in immediately. Omitting the provider parameter triggers a selection prompt. - Sign In Enabled Provider:
/auth-login [provider]- Perform login only for enabled providers. - Check Status:
/auth-status [provider]- Check the detailed status of a specific provider. If no provider is specified, it is equivalent to/auth-list. - Sign Out:
/auth-logout [provider]- Remove local credentials but retain the provider’s enabled status. - Remove Provider:
/auth-remove [provider]- Remove user-added providers and their local credentials.
UI Operations¶
On the Models settings page, locate the provider card that supports OAuth:
1. Click Sign in. The system will initiate the authorization flow, popping up a modal to display a device code or follow-up questions.
2. After completing login in the system browser, credentials will be saved locally.
3. Click Sign out to delete local credentials.
Use Cases and Notes¶
- Dependencies: This plugin does not implement the OAuth protocol, nor does it store or refresh tokens. It acts only as an interaction layer, relying on
@deepseek-ai/dsh-llm-pi-aito handle underlying logic. - Manual Enablement: Installing the plugin does not automatically enable any providers. Users must first add a provider in Models settings before they can sign in.
- UI Limitations: For pure OAuth providers, the core Models UI may still display a generic API Key editor because this plugin does not mask the core UI via CSS.
- Logout Behavior: Logging out only removes local records and does not revoke remote authorization grants.
- Required Components: A complete DSH environment containing
authorization,credentials,settings,llm-pi-ai, Remote gateway, and Models settings UI must be installed for proper functioning. - Provider Conflicts: If a provider is enabled by the base configuration of another bundle, it cannot be removed via
/auth-remove; that bundle must be updated instead.
Summary¶
dsh-bundle-pi-ai-auth completes the interaction gap in the pi-ai integration within DSH. Through UI cards and command-line tools, it allows developers to more conveniently manage the enablement, login, and logout status of OAuth providers without directly manipulating the underlying protocol.
- Directory Page: dingyiliao/dsh-bundle-pi-ai-auth
- GitHub: dingyiliao/dsh-bundle-pi-ai-auth