Introduction¶
When using the DeepSeek API, checking account balances often requires switching to the official console. dsh-ds-balance integrates balance information directly into the DeepSeek Harness (DSH) sidebar, providing an intuitive viewing experience via a status ring and pop-up window.
Plugin Overview¶
dsh-ds-balance is a DSH plugin maintained by dsh-plugin-lab. It reads balances directly from the official DeepSeek API endpoint, displays the status at the bottom of the sidebar, and provides a configuration card on the plugin page.
Core Features¶
- Sidebar Status Ring: Persistently displays balance status at the bottom of the sidebar, using color and arc geometry to show the current balance and proximity to warning thresholds.
- Balance Pop-up: Click the status ring to expand and view the total amount, top-up/gift breakdown, and data freshness.
- Configuration Card: Provides settings for connection, display, thresholds, and refresh on the plugin page.
Installation & Enablement¶
- Prerequisites: DSH current RC line (specify
@nextduring installation), Node.js version >= 20. - Install DSH Host:
npm install -g @deepseek-ai/dsh@next
- Install Plugin:
dsh plugin --profile web add dsh-ds-balance
- Start DSH:
dsh --profile web
- Install from Source: Clone the repository and run
pnpm install && pnpm run build, then add the plugin path using the command above.
Typical Usage¶
After installing and starting DSH, a DeepSeek balance status ring will appear at the bottom of the sidebar. Clicking the ring expands a pop-up window showing detailed balance composition and update times.
Security & Architecture¶
- Credential Management: The plugin resolves credentials through DSH’s credential channel and does not store keys itself. The UI only displays masked head and tail segments (e.g.,
sk-cf08d*****3b84); full keys are never exposed in transit, logs, or files. - Network Access: Connects only to
api.deepseek.com; no other traffic is proxied. - Data Storage: Balance snapshots are stored by credential; switching credentials resets the records.
Configuration Guide¶
Click “Plugins” in the DSH sidebar, find the installed “DeepSeek Balance” card, and enter the details page. The configuration area includes:
* Connection: Read-only; displays the source of the currently used credential and provides a test button.
* Display: Sets the currency display format.
* Thresholds: Sets warning and critical thresholds (for the same currency, the critical value must be lower than the warning value).
* Refresh: Sets the server-side refresh interval, UI polling interval, and manual refresh cooldown.
Upgrade Notes¶
Plugin version 3.0 removed manually configured apiKey and baseUrl; credentials are now managed uniformly by DSH. After upgrading, old settings are not automatically migrated and must be re-entered in the configuration card.
Conclusion¶
This plugin provides balance monitoring via the official API, suitable for developers managing multiple DeepSeek accounts or requiring real-time monitoring of API consumption. For source code and updates, please visit GitHub.