The core philosophy of DeepSeek Harness (DSH) is “Everything is a plugin.” When developing or having conversations using the DeepSeek API, it’s essential to have real-time visibility into the current model’s output pricing and account balance. The dsh-pricing-badge plugin is designed for this purpose, embedding pricing tables and balance information directly below the input box in the DSH Web UI, providing intuitive monitoring.
Core Features¶
This is a DeepSeek Harness Web UI plugin maintained by ZhangBo-cmd (MIT License). It primarily addresses the following issues:
- Real-time Status Indicator: Displays a plain text pill below the input box indicating whether the current period is “peak” or “off-peak,” along with holiday reasons.
- Cost Monitoring: Displays the output price of the currently selected model in the session, as well as the DeepSeek account balance.
- Quick Price Reference: Clicking the pill expands a pricing table that supports comparing prices across different time periods (peak/off-peak) and different scenarios (cache hit/miss).
How It Works¶
- Pure Tool, Pure Frontend: The plugin itself does not initiate any model requests, so it won’t incur additional token costs. Balance readings are retrieved by the server.
- Auto Refresh: Determines peak/off-peak in real-time based on Beijing time, refreshing the status every 30 seconds.
- Price Source: Pricing and time period rules come from DeepSeek’s official pricing page, with all 2026 statutory holidays built-in.
Installation & Activation¶
The installation command essentially forwards parameters to pnpm in the profile directory, so --profile is required. For the default web interface, use --profile web.
- Install the plugin:
dsh plugin --profile web add dsh-pricing-badge
- Start Web UI:
dsh web
-
Verify Installation:
After installation, refresh the page to see the indicator light below the input box. You can verify the configuration is working with the following command:
dsh --profile web --dump-config
The output should show a configuration layer named `dsh-pricing-badge`.
Customization & Maintenance¶
If you need to adjust prices or holiday rules, you can directly edit lib/client.js.
- Modify Prices: Edit the
DEEPSEEK_MODELS(DeepSeek time-based models) andTHIRD_PARTY_MODELS(third-party fixed-price models) arrays at the top. Unit is per 1 million tokens. - Holiday Configuration: All 2026 statutory holidays are built-in. If official pricing changes, simply update the
HOLIDAYSarray.
Notes¶
- Official Pricing as Reference: Price data comes from DeepSeek’s official page. Official prices may change, so please refer to the official page.
- Build Authorization: If installing from GitHub source code, you need to configure the profile’s
pnpm-workspace.yamlto allow build authorization (allowBuilds).
Conclusion¶
dsh-pricing-badge is a lightweight cost monitoring tool suitable for users who need to frequently switch models in DSH and are concerned about peak hour costs. It does not alter DSH’s core logic, only providing intuitive visual feedback.
- Directory Page: zhangbo-cmd/dsh-pricing-badge
- GitHub Repository: zhangbo-cmd/dsh-pricing-badge