Introduction¶
When running long conversations or sub-agents in DeepSeek Harness (DSH), aligning information regarding peak/off-peak pricing switches, local session costs, and account balances often requires switching to documentation or the console. Below is an introduction to the community plugin dsh-deepseek-status: it provides three persistent badges next to the composer, with automatic data refresh, ensuring the page side never touches API keys.
What is this¶
Published by maintainer XG221B, dsh-deepseek-status is categorized as a client-side plugin designed for DeepSeek Harness. It displays the following next to the input box:
- Billing Period (Peak/Off-peak pricing, time until next switch, current prices for each model)
- Conversation Cost (Including the sum of sub-agent sessions; expandable to break down by session, model, and peak/off-peak)
- Account Balance (Top-up + Bonus)
The official description emphasizes that the peak/off-peak indicator and balance badge are automatically updated, and no credentials need to be configured in the plugin (note that the balance still relies on a Harness account login, see below).
The current package version is 2.1.1, licensed under MIT, requiring Node >=18. It was developed and verified on DSH 0.2.0-rc.2; the 2.1.0 contract check passed on 0.2.1-rc.2.
UI Overview¶
A sample line (from README):
● Off-Peak · 5d 15h to Peak ● Cost ¥44.09* ● Balance ¥110.00
Interaction points:
- Click the Billing Badge: View the current period and next switch, price list, rule descriptions, and data verification time.
- Click the Cost Badge: View the total cost (including sub-agent sum), costs by model and token, unpriced prompts, and verification time.
- Click the Balance Badge: View top-up balance, bonus balance, total, as well as entries to top-up and check usage.
Detail cards contain only a few lines and do not push the conversation up when expanded; more granular numbers (precise tokens, holidays and make-up workdays, etc.) are in hover tooltips. A * indicates that some calls fall on models outside the price list (e.g., third-party routing); tokens for this part are listed but not included in the total. Colors follow the Harness theme, and language follows the interface language (Chinese/English).
Core Features¶
Peak/Off-Peak Billing Indicator¶
The Host periodically fetches the DeepSeek official pricing documentation and holiday data (holiday-cn, chinese-days; adopted only if both match). After cross-validation, it caches the data to the plugin directory cache/dataset.json and provides a read-only loopback route /dsh-deepseek-status/data.json for the page to read. Billing data refreshes approximately every 6 hours; only billing-related features access the network.
Conversation Cost¶
Costs are calculated by the Host from local session logs (~/.dsh/sessions). The route /dsh-deepseek-status/cost.json only accepts loopback addresses (127.0.0.1 / ::1), does not write to disk, does not access the network, and cannot access keys. The badge refreshes approximately every 20 seconds.
Calculation rules (README summary):
- Each
assistant/messageis billed based on the provider-reported usage, using the peak/off-peak price at the time of that specific call. - Reads sub-agent directories recursively from the current session log; sub-agent costs are included in the total, with a “Sub-agent Sum” in the details.
- Models outside the price list have their tokens listed separately, marked as unpriced, and not included in the total.
- If the official price list lacks a “Cache Write” item, it is marked as unbillable; internal calls without usage (e.g., title generation, automatic compaction summaries) are not counted.
- The amount is a local estimate based on the official price list, consistent with billing standards, but does not replace official bills.
Account Balance¶
Balance is read from the built-in account service of Harness; the token remains in the Host process, and the page only receives the amount. Balance is not written to disk, printed, or sent externally. Reading occurs at most once per minute, pausing when the page is moved to the background.
DeepSeek Account Login Required: If using only an API key without logging in, there is no wallet in the Harness account service, and the balance badge will not appear; the billing badge is unaffected.
Installation and Activation¶
The plugin runs with the permissions of the current DSH process; it is recommended to review the GitHub repository source code and MIT license before installation. The DSH community directory is at SkillHub; it has no official affiliation with DeepSeek or HFTC (High-Flyer).
Desktop Profile¶
The command line dsh plugin will directly refuse for the desktop profile:
error: profile "desktop" is managed exclusively by the Electron application
Choose one of the following:
- Sidebar Plugins → Add plugin, enter
github:XG221B/dsh-deepseek-status. - Use the repository installer (equivalent to
pnpm addin the profile directory and writing todsh.profile.bundles, but bypasses the refusal above). You need to clone this repository first and execute in the repository root:
node tools/install.mjs --profile desktop
If github.com is inaccessible, use the tarball of the same commit:
node tools/install.mjs --profile desktop \
--spec https://codeload.github.com/XG221B/dsh-deepseek-status/tar.gz/refs/heads/main
To uninstall: Change add to remove in the UI; or add --remove to the installer.
Other Profiles (web / tui / headless, etc.)¶
dsh plugin --profile <your_profile> add github:XG221B/dsh-deepseek-status
To uninstall, change add to remove.
Refresh the page once after installation. To overwrite an old version, restart Harness once (Host code is cached in the process). A restart of Harness is also required for the Cost Badge to appear for the first time; click the badge after startup to expand details. If the Host has no price data or session persistence yet, the badge will be hidden rather than displaying guessed numbers.
Things to Know Before Use¶
- LAN Exposure: If Harness binds to
0.0.0.0,/dsh-deepseek-status/data.json(public pricing and holiday cache only) is readable by the local network segment; the cost route remains restricted to loopback. - Sub-agents & Third-party Models: Sub-agent costs are summed; when routing to models outside the price list, the total cost carries a
*and the unpriced portion is not included in the sum. - Failover: If real issues occur, simply remove
dsh-deepseek-statusfromdsh.profile.bundlesin~/.dsh/profiles/<profile>/package.jsonand restart. - After DSH Updates: You can run a contract check before deciding whether to restart:
node tools/preflight.mjs --live
Use Cases¶
- Writing prompts or running multi-turn sub-agents in the DSH Desktop or web interface, wanting to see peak/off-peak switches and current prices without switching pages.
- Need real-time estimates for the current conversation (including sub-agents) and accept that amounts are derived from local logs, not official bills.
- Logged into a DeepSeek account, hoping to see top-up + bonus balance next to the composer.
This plugin is not suitable as the sole basis for billing: official bills still rely on the DeepSeek console; the balance badge is invisible with only an API key and no account login.
Conclusion¶
dsh-deepseek-status consolidates peak/off-peak prices, session costs (including sub-agents), and account balances into three badges next to the composer, refreshing automatically without touching keys on the page side. Installation varies by profile: use the UI or tools/install.mjs for desktop, and dsh plugin add for other profiles.
- Directory Page: https://www.skillhub.cn/plugins/XG221B/dsh-deepseek-status
- Source & Docs: https://github.com/XG221B/dsh-deepseek-status