dsh-balance-guard
Run the following command in DeepSeek Harness:
dsh plugin install bunipai/dsh-balance-guard
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install bunipai/dsh-balance-guard in the DeepSeek Harness terminal to install; the project is open-sourced at https://github.com/bunipai/dsh-balance-guard
About this plugin
One of the most annoying surprises when building on the DeepSeek API is hitting a 402 mid-session because the balance quietly hit zero. dsh-balance-guard solves that by surfacing your account balance right in the browser: a compact pill in the top-right corner of the conversation header keeps the number visible at all times, so you never have to guess whether you can still afford the next request.
The plugin stays deliberately lean. On the host side it registers a same-origin endpoint that reads the same credentials as llm-deepseek, calls the official balance API, and applies a 15-second cache with single-flight deduplication so multiple tabs do not hammer the service. On the client side it polls every 30 seconds by default, refreshes instantly on tap, and re-pulls whenever the tab becomes visible; hovering reveals the full breakdown—total, bonus, top-up amount, and last-updated time. When the balance drops below a configurable threshold (five yuan by default), the pill turns orange with a warning glyph, the page title gains a warning prefix, and a single browser system notification fires; the reminder stays quiet until the balance recovers and dips again, so it will not nag you repeatedly.
It is built for anyone whose workflow depends on DeepSeek API credits: solo developers running long generation jobs who do not want to babysit a tab, small teams sharing a single key who need to spot who drained the quota, or simply anyone who would rather see a gentle heads-up than an abrupt auth error at the worst possible moment. Once installed, the pill appears in the header with zero changes to your existing proxy or routing setup.
Use Cases
- Monitor account balance during long-running jobs to avoid mid-session 402 errors
- Quickly identify low-balance events when multiple people share an API key
- Get instant browser-side awareness of quota depletion without manual API calls
Best For
- Solo developers who rely on DeepSeek API for daily development
- Small teams sharing API keys and needing collaborative quota monitoring
- Any API user who wants balance health integrated into their workflow
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.