Preface¶
In DSH’s plugin-based environment, session-side information can extend along with the host without requiring a separate billing dashboard. dsh-billing is a DeepSeek Harness plugin designed to display your DeepSeek account balance and current session cost (in RMB) within the Web UI. It addresses the need to quickly check “how much balance remains” and “how much this turn cost” during an ongoing conversation. Instead of manually checking billing each time, it places the balance and current session cost in the session header and provides three access points: slash commands, a tool, and the UI.
What Is This¶
dsh-billing is maintained by TheTianzz and licensed under MIT. It is positioned as a DeepSeek Harness plugin that integrates the DeepSeek account balance and session cost into the current Web UI. It supports display in RMB and allows viewing token usage and cost breakdown by model.
Core Features¶
Session Header Display¶
- The Web UI session header features two persistent capsules showing the balance and current session cost.
- Click either capsule to instantly refresh the balance and session cost.
- Hover over the balance capsule to see details for recharges, bonuses, and USD equivalents.
- Hover over the cost capsule to see token usage and cost breakdown by model.
Command Access Points¶
Two slash commands are available for querying in the chat box:
/balance
/cost
/balance: Check account balance (RMB primary, with USD)./cost: View current session cost details.
Tool Access Point¶
If you interact directly with the model, you can use the tool:
deepseek_billing
query = balance / cost / both
deepseek_billing supports query = balance / cost / both. You can ask the model directly, such as “What’s my balance?” or “How much have I spent?”
Refresh and Price Synchronization¶
- Refresh is event-driven, with zero requests when idle and no background persistent tasks.
- Automatically fetches the official price page at startup + every 12 hours to parse the latest unit prices (including peak/off-peak rates and effective times).
- All configurations are optional.
- Price synchronization priority: User explicit configuration > Official online synchronization > Built-in defaults.
Optional configuration items:
config.pricing
config.priceSync
config.pricing: Override unit prices (RMB/million tokens) by model, with support for automatic peak/off-peak price switching.config.priceSync: Disable or adjust price synchronization.
Installation and Activation¶
The installation command is as follows:
dsh plugin --profile web add dsh-billing
After execution, follow these steps to activate:
- Restart
dsh web. - Refresh the browser page (F5) to apply the new boot graph.
- Save the
DEEPSEEK_API_KEYcredential reference on the Web model settings page.
Typical Usage¶
Once enabled, you can use the following access points:
- Enter
/balancein the chat box to check account balance (RMB primary, with USD). - Enter
/costin the chat box to view current session cost details. - Ask the model directly “How much balance?” or “How much spent?”, which will be handled by
deepseek_billing. - Click either capsule in the UI session header to instantly refresh balance and session cost.
- Hover over the balance capsule to view recharges, bonuses, and USD; hover over the cost capsule to view token usage and cost breakdown by model.
Use Cases and Notes¶
This plugin is suitable for users who want to check their balance, current session cost, and per-model breakdown within a DeepSeek Harness Web session. Please note:
- The plugin runs with the permissions of the current
dshprocess. Review the source code and license before installation. - Plugin outputs are estimates; actual charges are subject to the official DeepSeek billing.
- Sub-agents are separate sessions and are tracked individually.
- Failed retries are also counted towards costs.
config.pricingandconfig.priceSyncare both optional.
Conclusion¶
The value of dsh-billing lies in bringing the DeepSeek account balance and session costs close to the current Web UI session, providing persistent display, instant refresh, and query access via commands/tools.
- GitHub:
https://github.com/TheTianzz/dsh-billing - Directory Page:
https://www.skillhub.cn/plugins/TheTianzz/dsh-billing(URL derived from plugin clues)