Introduction¶
When using DeepSeek in the DSH web client, the current session’s cost, the current billing tier, and how long until the next tier are not automatically displayed in the interaction area.
@dshworks/dsh-meter is a DSH web client plugin designed to add a line of billing information below the composer. It expands to show more details when hovered or focused, including session costs, billing status, cache, and balance-related data.
Plugin Positioning¶
- Package name:
@dshworks/dsh-meter - Maintainer:
dshworks - License: MIT
- Runtime Location: Runs as a DSH web client plugin
- Core Purpose: Display DeepSeek billing status in the session interface, including session cost, current billing tier, billing switch time, account balance, and related rate information
Core Features¶
One Line Below Composer¶
The plugin adds a line of information below the composer displaying:
- Current session cost
- Current billing tier
- Time until tier switch
This line allows for a quick check of the current session’s billing status without needing to open an additional panel.
Open Card on Hover or Focus¶
When hovering or focusing on the meter line below the composer, a card opens displaying:
- Total session cost
- Request count
- Model
- 24-hour billing tier bar
- Token count and amount for cache hits, fresh input, and output
- Account balance and gifted credit
- Same token prices under other billing tiers
- Cache savings
This part is better suited for viewing the composition of a single session: which tokens hit the cache, which are fresh input, what the output is, and what the price would be if another tier were used.
Settings → Meter for Cold Start View¶
If there is no session, or if the session has not yet generated billing requests, the meter line below the composer may not appear.
Verified documentation states:
- The meter appears only after a session exists and billing requests have been made
Settings → Meteris used for cold start viewing
After opening Settings → Meter, you can view:
- Current billing tier
- Countdown
- 7-day rate grid
- Public rate card
- Account balance
Two Rate Cards, No Currency Conversion¶
DeepSeek publishes two independent rate cards: USD and CNY. The account is billed based on one of them.
The plugin reads the account currency and displays the funded line using DeepSeek’s independent USD/CNY rate cards, without performing currency conversion.
Installation and Enablement¶
-
Confirm that
pnpmis in the PATH.dsh pluginforwards topnpm, sopnpmmust be available. -
Add the plugin:
dsh plugin --profile web add @dshworks/dsh-meter
- Start the web profile:
dsh --profile web
- Enter a session. The meter appears only after a session exists and billing requests have been made; if you need to view the tier, rate cards, and balance for a cold start, open
Settings → Meter.
Typical Usage¶
- Install and start:
dsh plugin --profile web add @dshworks/dsh-meter
dsh --profile web
- Cold start view of billing information:
Open Settings → Meter to view the current billing tier, countdown, 7-day rate grid, public rate card, and account balance.
- View session details:
Hover or focus on the meter line below the session to open the card and view billing, cache, and balance details.
An example line from verified documentation is as follows:
2 turns · 2 steps | LLM 3.1s | TTFT avg 1.3s · 41 tok/s | Cache hit 50% | Input 44.3K tok ¥0.0672 | peak | off-peak in 48m
Applicable Scenarios and Notes¶
Suitable for the following scenarios:
- Using the DSH web client to call DeepSeek
- Wanting to see the current session cost directly below the composer
- Needing to view the current billing tier, time until tier switch, 7-day rate grid, and public rate card
- Needing to view cache hits, fresh input, output, account balance, and gifted credit
- Needing to view the independent USD or CNY rate cards based on account currency without the plugin performing currency conversion
Notes before use:
- The plugin runs with the permissions of the current DSH process; check the source code and MIT license before installing.
- The plugin requires
pnpmto be in the PATH. - The meter line appears only after a session exists and billing requests have been made;
Settings → Meteris for cold start viewing. - Verified documentation only states that two configuration items are located within the plugin’s own configuration; it does not provide specific configuration item names.
- Balance is read via a host route; verified documentation mentions that
/dsh-meter/balancereturnscurrencyinformation, but credential and permission details are not fully confirmed. - Verified documentation does not provide the full DSH compatible version range, so specific version requirements cannot be determined from this.
Links¶
- GitHub: https://github.com/dshworks/dsh-meter