Introduction¶
DeepSeek Harness (DSH) follows the design philosophy of “everything is a plugin.” When developing with the Web interface, monitoring API account balances usually requires switching tabs or checking command-line output, which can disrupt the workflow. The dsh-account-balance plugin integrates balance information directly into the chat interface, allowing developers to keep track of account status in real time.
Plugin Overview¶
This is a dashboard plugin running on the DSH Web client, maintained by user ls-cool-123. It displays the account balance for DeepSeek models above the chat window (in the session header utilities area), addressing the need to query the balance directly from the UI layer.
Core Features¶
This plugin works through two collaborating parts, the Host and the Client, to implement real-time balance querying and display:
- Real-time display: Displays a balance capsule above the chat window (in the session header utilities area).
- Data details: Hover with the mouse to view the breakdown of “total balance / bonus balance / top-up balance.”
- Automatic refresh: Supports manual refresh, and automatically refreshes every 60 seconds.
- Architecture implementation:
- Host half: Registers a local route
/api/account-balanceon the Web server. It parses the API Key from the credential service (ctx.credentials) and proxies DeepSeek’s officialGET /user/balanceendpoint. - Client half: Registers a component in the
conversation.session.header.utilitiesslot, responsible for polling the endpoint and rendering the UI.
- Host half: Registers a local route
- Security mechanism: The API Key remains only in the local process and is never exposed to the browser.
Installation and Enablement¶
- Go to the plugin directory.
- Run the installation command to add the plugin to the Web service dependencies:
dsh plugin --profile web add .
- Restart the Web service to load the plugin:
dsh web
Configuration¶
The plugin reuses the credential source from the official DeepSeek adapter and requires no additional configuration.
- Credential source: Uses the managed credentials written in the Web model settings page, the
DEEPSEEK_API_KEYin a.envfile, or theDEEPSEEK_API_KEYenvironment variable. - Optional configuration:
DEEPSEEK_BASE_URL, used to override the base address of the balance endpoint. The default ishttps://api.deepseek.com. - Endpoint format: The response format of the balance endpoint is subject to the DeepSeek official documentation.
Use Cases and Notes¶
- Target users: DSH Web users who need to frequently check DeepSeek API balances.
- Permission note: The plugin runs with the permissions of the current dsh process. Review the source code and license (MIT) before installation.
- Directory and source code: You can visit the SkillHub plugin directory or the GitHub repository for details.