DeepSeek Harness Usage tab for DeepSeek account balance, official peak/off-peak pricing, live countdown, platform usage link, and local balance warning light.
Install
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:Hann428/dsh-hann-usage-dashboard
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
DeepSeek usage and billing panel for DeepSeek Harness Desktop and Web.
It adds a compact Usage tab to the conversation view. The tab shows the DeepSeek account balance, current official peak/off-peak pricing, the next price-window countdown, and a direct link to the DeepSeek platform usage page.
Quick install from GitHub
In the desktop app's Add plugin dialog, enter the full repository URL:
https://github.com/Hann428/dsh-hann-usage-dashboard
The following command installs into the Web profile:
dsh plugin --profile web add github:Hann428/dsh-hann-usage-dashboard
Restart dsh web, then open any conversation and select the Usage tab.
For the desktop app, restart the app after installation. Use this GitHub repository as the install source. To pin this version with the CLI, append #v0.0.6 to the GitHub spec.
Upgrade from the old name
Version 0.0.3 renames the repository, package, client module, and Usage tab registration from dsh-usage-dashboard to dsh-hann-usage-dashboard. Uninstall the old plugin in the same Harness profile before installing this version, then restart Harness. Keeping both versions enabled creates duplicate Usage tabs and balance tools.
On the same browser origin, saved warning thresholds are copied from the old storage key when the new key is absent. Moving from the Web app to the desktop app may use a different origin, so enter those settings again if needed. API keys remain in Harness credentials and are not copied by this migration.
Requirements:
- DeepSeek Harness Desktop or Web with plugin support and the conversation view slot.
- A configured
DEEPSEEK_API_KEYcredential in Harness Settings -> Models. - Network access to
https://api.deepseek.comand DeepSeek's official pricing docs.
中文简述:这是一个 DeepSeek Harness 用量面板插件,会在会话页添加“用量”标签页,展示账户余额、官方峰谷价格、切换倒计时、平台用量页入口,并提供可本地保存的余额告警灯设置。
Features
- Account balance from DeepSeek's official
GET /user/balanceendpoint. - Official RMB prices for
deepseek-flashanddeepseek-v4-profrom the DeepSeek price table. - Peak pricing on non-holiday weekdays from 09:00–12:00 and 14:00–18:00 Beijing time. Weekends and Chinese statutory holidays are off-peak.
- The label, price and countdown switch together while the panel is open.
- Compact balance indicator in the conversation header on supported Harness versions. Green indicates an available balance, orange indicates the balance is below an enabled threshold, and a dim indicator means both warning checks are disabled or the balance is unavailable.
- Inline warning threshold switches and inputs for amount and percentage. Values are saved in browser localStorage and update the indicator immediately.
- Host-side API-key handling: the browser receives only the query result, never the key.
- Optional
dev_usage_balancetool for agents to inspect balance and pricing data.
Configuration
The plugin uses the standard DEEPSEEK_API_KEY credential reference by default.
- id: dsh-hann-usage-dashboard
name: dsh-hann-usage-dashboard
config:
keyRef: DEEPSEEK_API_KEY
baseURL: https://api.deepseek.com
platformUsageURL: https://platform.deepseek.com/usage
timeoutMs: 10000
healthCurrency: CNY
alertBalance: 50
alertBalancePercent: 20
balancePercentBase: 100
Configure the key in Harness Settings -> Models. The plugin reads the credential through the Harness credentials service.
alertBalance and alertBalancePercent are optional default warning thresholds. The Usage panel also exposes inline amount and percentage fields. Those browser-local values override the displayed indicator immediately. Set either threshold to 0 or leave the panel field blank to disable that check. balancePercentBase is the user-defined amount treated as 100% for percentage checks.
Notes
- Version 0.0.5 follows Harness light/dark theme colors and adds an actionable authentication error, including the credential source without exposing its value.
HTTP_401means DeepSeek rejected the key used for the balance request. UpdateDEEPSEEK_API_KEYin Harness Settings -> Models, then refresh Usage. An inherited environment key takes priority over the saved key; update that environment value and restart Harness if the source isenv. Keys for third-party gateways do not authenticate against DeepSeek's official balance endpoint.- DeepSeek's platform page login is separate from Harness. The "open usage page" link may require a browser login.
- Both tiers are fetched from DeepSeek's official docs when you open or refresh the Usage panel.
- The bundled holiday calendar covers 2026 statutory dates and 2027 holiday dates, using the national holiday rules. During weekday peak hours on additional days off, or in a year without a bundled calendar, the panel shows both rates and marks the period as unconfirmed.
- DeepSeek's 2026-09-10 pricing docs list
deepseek-flashas the recommended Flash model name. The olddeepseek-v4-flashanddeepseek-v4-flash-vision-expnames are routed to DeepSeek-V4.1-Flash during the documented transition window. - If the docs page cannot be reached or parsed, the balance still renders and the price row reports the pricing error.
Development
pnpm install
pnpm run typecheck
pnpm run build:client
node scripts/check-rename.mjs
node scripts/check-authentication.mjs
node scripts/check-pricing.mjs
Check host imports against an installed desktop profile, without legacy dependency aliases:
node scripts/check-installed-import.mjs "$env:USERPROFILE\.dsh\profiles\desktop"
The built lib/ files are committed so GitHub-source installs can run without a local build step.
Links
More in this category
bowenliang123/dsh-context★ 5607
DSH context insight panel: Context dashboard + /context command + Context browser — one-stop context lifecycle management with categorized composition, content details, evolution trends, compaction/injection events, and stats.
Han-1413141/dsh-cost-meter★ 771
Per-session and daily API cost, budget with usage %, official balance, history dashboard, and one-click official price sync with peak/off-peak pricing.
wssfk12138/dsh-damage-pulse★ 292
Tracks DeepSeek token usage, per-call and session costs, and account balance with cache-aware charge animations in the DSH Web UI.
zh667/TokenLedger★ 207
Sidebar usage panel that attributes tokens to the relay site that served each request, read from your existing provider config: today/month/all-time totals, per-site and per-model breakdowns, a year activity heatmap, and New API / Sub2API / DeepSeek balances.
Ychris12138/dsh-usage-stats★ 192
Multi-provider usage dashboard with provider/model token breakdowns, calendar drill-downs, account balances, and OpenCode Go / Z.ai subscription quota tracking.
PolinniZhong/dsh-personal-center★ 114
Personal center for DeepSeek Harness: cross-session usage statistics with per-provider and per-model breakdown (auto-discovers configured models), per-model cost estimation, global custom instructions, a data-driven desktop pet with bitmap & vector skins, and a conversation status overview, all local and offline.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.