Preface¶
In a DeepSeek Harness (DSH) Web session, a common problem is: how much quota was used today, and how much is left in the account. Existing approaches usually involve opening the console, checking the balance API, or manually recording balance changes.
Below is a DSH Web plugin: arslan-jh/deepseek-harness-usage. It displays daily consumption and total balance below the chat input area, and clearly marks daily consumption as an estimated value.
What is it¶
This is a DeepSeek Harness Web plugin maintained by Arslan-jh, licensed under MIT. Current documentation indicates it targets the DeepSeek Harness 0.1.0-rc.6 Web profile and requires Node.js 22+.
It addresses account-level usage visibility: directly answering “How much DeepSeek quota did I use today, and how much is left in the account” within a DSH Web session. It does not show per-request consumption for each session, model, or tool, nor does it replace the Token analysis dashboard.
Core Features¶
- Daily Consumption: RMB consumption estimated from daily account balance changes, marked as
≈on the interface. - Total Balance: Account-level available balance from the DeepSeek official balance API.
- Recharge Recognition: When recharge or gifted quota increases, daily consumption will not be incorrectly reset to zero.
- Auto Refresh: Updates every 3 minutes for both the DSH host and the browser.
- Reuse DSH Credentials: Uses the
DEEPSEEK_API_KEYconfigured in DSH, eliminating the need to fill it in again on the webpage. - Daily Consumption Calibration: You can re-calibrate by entering the value displayed on the official website.
- Platform Token: Optional experimental feature that attempts to read the internal usage interface used by the DeepSeek official webpage.
- Delete Platform Token: Clear the saved platform token at any time to restore balance difference estimation.
- Balance Query: Directly call the DeepSeek public balance API to query account-level balance.
- Log Completion: Reads local DSH session Token records to supplement consumption that might have been missed between midnight and the first balance sampling.
Installation & Enablement¶
If the local machine uses the dsh command, execute:
dsh plugin --profile web add github:Arslan-jh/deepseek-harness-usage
dsh --profile web
If the computer only uses DSH via npx, execute:
npx @deepseek-ai/dsh plugin --profile web add github:Arslan-jh/deepseek-harness-usage
npx @deepseek-ai/dsh --profile web
After installation, refresh DSH Web. Open an existing session, or send the first message in a new session, and the usage row will appear below the chat input area.
Settings & Calibration¶
Go to:
Settings → General Settings → DeepSeek Usage Display
Configurable options include:
- Daily Consumption Calibration: If the daily consumption shown on the official website differs from the plugin’s estimate, you can re-calibrate by entering the official website value.
- Platform Token: Optional experimental feature. It attempts to read the internal usage interface used by the DeepSeek official webpage.
- Delete: Clear the saved platform token at any time to restore balance difference estimation.
The Platform Token is not required. Documentation states that the internal interface is not a public API and may become invalid with official website updates; if it fails, the plugin will show a warning but will not affect total balance queries.
How Daily Consumption is Estimated¶
The Total Balance is obtained by directly calling DeepSeek’s public balance API, so it is an account-level balance.
Daily Consumption can be understood by default as:
Daily Consumption ≈ Starting Balance of the Day + Daily Recharge/Gifts - Current Balance
The plugin writes to:
$DSH_HOME/storages/deepseek-usage-day.json
Used to save the day’s balance baseline. On the first run of the day, it also reads the local DSH session’s Token records to supplement consumption that might have been missed between midnight and the first balance sampling.
Built-in prices only use fixed unit prices with public basis; future prices or peak-valley rules without public documentation support will not be written into the code.
Usage Boundaries¶
≈is important: Daily consumption is an estimate, not the official bill details.- If the same DeepSeek account is also used by other computers or applications, the consumption caused by them will also be reflected in the balance changes.
- Local logs are only used to fill the gap before the first sampling of the day and will not pretend to know the per-request details of other clients.
- The package identifier for this project is
@arslan-jh/deepseek-harness-usage; currently, please use the GitHub install command in the README.
Privacy & Permissions¶
The plugin performs the following operations:
- Reads
DEEPSEEK_API_KEYvia the DSH credentials service. - Accesses
api.deepseek.comto query balance. - Reads local DSH session statistics, used for log replay on the first launch of the day.
- Writes to
$DSH_HOME/storages/deepseek-usage-day.jsonto save the day’s balance baseline. - Only saves and uses
DEEPSEEK_PLATFORM_TOKENwhen explicitly configured.
Documentation states the plugin does not return API Key or platform token to the browser, nor does it contain telemetry; the configuration interface only accepts same-origin JSON requests and limits request body size.
Pre-Installation Notes¶
This plugin reads local DSH session statistics and accesses DEEPSEEK_API_KEY via the DSH credentials service. It is loaded by the DSH host and can be considered a local extension running with the current dsh process permissions. Before installation, it is recommended to check the GitHub repository source code, package.json, dependencies, and MIT license to confirm they meet local usage requirements.
Uninstall¶
dsh plugin --profile web remove @arslan-jh/deepseek-harness-usage
Related Links¶
- GitHub Repository: https://github.com/Arslan-jh/deepseek-harness-usage
- Community Directory Clue: https://www.skillhub.cn/plugins/Arslan-jh/deepseek-harness-usage. This URL comes from the plugin clue and has not been confirmed as scraped data; the community directory does not represent the DeepSeek or Huanfang official app store.