Ghost011118/dsh-balance-meter
DeepSeek account balance and session cost readout for the DeepSeek Harness Web GUI
dsh-balance-meter adds a DeepSeek account-balance and session-cost readout to the DSH Web GUI. A chip in the composer dock shows the account total balance and current session's estimated spend (Balance CNY 4.16 · This session CNY 2.57); clicking reveals per-currency balance breakdown (granted + top-up) and per-bucket cost breakdown (input / cache read / output). It supports explicit balance sources — official API, proxy-compatible endpoint, or manual balance persisted locally — and per-model pricing that reads the model actually driving each session from its request header (flash vs pro), so cost tracks the model used instead of a fixed default. It auto-fetches the official pricing page every 6h, so the 2026-08-17 peak/off-peak pricing rollout needs no plugin update, and applies the peak-hour band (Beijing 09:00-12:00 / 14:00-18:00) automatically once peak pricing goes live.
Install
dsh plugin --profile web add https://github.com/Ghost011118/dsh-balance-meterInstall from a git URL with dsh plugin --profile web add https://github.com/Ghost011118/dsh-balance-meter (no npm account needed), or clone the repo and add the local checkout with dsh plugin --profile web add link:$(pwd)/dsh-balance-meter. Restart dsh web and refresh; the balance chip appears in the composer dock. Zero-config by default — it uses DEEPSEEK_API_KEY and the official pricing page.
Compatibility
DeepSeek Harness 0.1.0-rc.6 or newer (web profile), a DeepSeek API key stored through the DSH credentials seam (DEEPSEEK_API_KEY — the web Models page writes it). Zero-config: uses the official pricing page, auto-refreshed every 6h.
Details
- Repo: Ghost011118/dsh-balance-meter
- Category: Other
- Stars: 18
- Version: npm-published; BSD-3-Clause (README tracks no release tag; install via git URL)
- Last push: 2026-08-20
- First seen: 2026-08-13
Recent updates
The current README documents the balance sources (official/proxy/manual), per-model auto-detection, 6h pricing refresh, peak/off-peak banding, and the fix where an error snapshot is never served from cache (chip auto-recovers on next poll).
FAQ
- Do I need to configure anything?
- No — zero-config by default: it uses DEEPSEEK_API_KEY from the DSH credentials store and the official pricing page (auto-refreshed every 6 hours).
- How does it know which model priced the session?
- In auto mode (default) it reads the model actually driving each session from its request header (deepseek-v4-flash vs deepseek-v4-pro); explicit model: flash|pro pins a preset.
- How does manual mode work?
- Manual mode keeps a hidden ledger inside the existing balance settings namespace (never a plaintext file, never in the browser response) and charges only positive token deltas after the last persisted checkpoint.
Alternatives
Miyazawai/dsh-client-pricing · crazywoola/dsh-balance · Aik358/dsh-auto-memory