dsh-deepseek-balance: A Real-time API Balance Sidebar Indicator for DeepSeek Harness
kyya/dsh-deepseek-balance
DSH plugin: real-time DeepSeek API balance in the sidebar with status indicators.
Display real-time API balance at the bottom of the DeepSeek Harness web sidebar, with status dot colors at a glance, hover for details, and click to force refresh.
dsh plugin --profile web add github:kyya/dsh-deepseek-balance- Category
- Models & Reasoning
- Platform
- DSH Plugin
- Author
- kyya
- Distribution
- Plugin
dsh-deepseek-balance Key Features
dsh-deepseek-balance Repo Summary
dsh-deepseek-balance is a model/inference plugin (DSH plugin) for DeepSeek Harness that displays real-time DeepSeek API account balance at the bottom of the web sidebar (above the settings button). It solves the problem of developers needing to manually query API balance frequently and lacking intuitive monitoring of consumption. Core capabilities include: status dot color indicators (green=available, yellow=account unavailable, red=fetch failed, blue=loading), hover to show full details (total/granted/topped-up/update time), click to force refresh, and secure API key handling (resolved via credentials service on each fetch, never sent to the browser). The plugin is maintained by kyya, licensed under MIT, and last updated in 2026-08.
What core features does the dsh-deepseek-balance DSH plugin support?
The plugin periodically fetches balance via GET <baseUrl><endpoint> on the Node side (host) with Bearer authentication, caches the snapshot, and exposes a /deepseek-balance endpoint via webServer.register; the browser side (client) registers a React indicator to the sidebar.footer.action slot, polls every 30 seconds, and forces a refresh with ?refresh=1 on click. The balance endpoint returns JSON data containing is_available and balance_infos array (with currency, total, granted, topped-up fields).
How to install dsh-deepseek-balance?
Installation commands (support local directory or git), and restart dsh web after installation for changes to take effect:
dsh plugin --profile web add /absolute/path/dsh-deepseek-balance
# or
dsh plugin --profile web add github:kyya/dsh-deepseek-balance
# restart
dsh web
Open http://127.0.0.1:3080 and you'll see the balance indicator at the bottom left of the sidebar.
How to configure dsh-deepseek-balance?
By default it reads the credential DEEPSEEK_API_KEY (from ~/.dsh/.credentials.yaml, environment variable, or the key saved in Settings → Models). You can override the configuration in ~/.dsh/profiles/web/cordis.patch.yml, writing all fields:
- id: deepseek-balance
config:
refreshMs: 60000 # background refresh interval (ms)
apiKeyEnv: DEEPSEEK_API_KEY # credential reference name
baseUrl: https://api.deepseek.com
endpoint: /user/balance
How to uninstall dsh-deepseek-balance?
Uninstall command:
dsh plugin --profile web remove dsh-deepseek-balance
