DeepSeek Harness plugin

dsh-balance-plugin-lucaslus

Show account balance for DeepSeek / Kimi / Qwen under the composer

Jump to install

Source facts

Repository
lucaslus/dsh-balance-plugin
Latest update
Aug 17, 2026
Category
Models & Providers
GitHub stars
1
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/lucaslus/dsh-balance-plugin
Plugin: dsh-balance-plugin-lucaslus
Author: lucaslus

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only
README language

dsh-balance-plugin

English | 中文

Shows your model provider's account balance in a persistent readout line under the composer in the DeepSeek Harness web client.

  • DeepSeek: total / topped-up / granted balance + account availability
  • Kimi (Moonshot): available / cash / voucher balance (a negative cash balance is flagged ⚠ overdue)
  • Qwen (Alibaba Cloud Bailian): mode is detected with a console-only note (the Bailian API key exposes no balance endpoint)

The readout matches the built-in stats line (tok/s · cache hit %) typography, sits on its own second line, and is left-aligned against the same content column. The official data-freshness note renders as trailing text; the UI language (zh/en) follows the client.

Preview

<img src="docs/dsh-balance.png" alt="Balance readout preview" width="720">

Install

One-liner (curl)

curl -fsSL https://raw.githubusercontent.com/lucaslus/dsh-balance-plugin/main/install.sh | bash

Installs into the web profile by default; pick a profile:

DSH_PROFILE=web curl -fsSL https://raw.githubusercontent.com/lucaslus/dsh-balance-plugin/main/install.sh | bash

Manual

dsh plugin --profile web add github:lucaslus/dsh-balance-plugin

Restart required after install

This plugin ships a browser half (dsh.client), which is scanned into the browser plugin table when the dsh process starts; Web HMR is currently disabled. So restart the client after installing before the readout loads:

dsh --profile web

Configuration

The plugin detects the provider from the current model route and reuses each model adapter's own credential configuration — nothing to fill in:

ProviderAPI key env (default)
DeepSeekDEEPSEEK_API_KEY
KimiKIMI_API_KEY (or MOONSHOT_API_KEY)
QwenDASHSCOPE_API_KEY

If you configured a custom apiKeyEnv or baseURL for a model in settings, the plugin follows it.

Data freshness (official)

ProviderOfficial delay
DeepSeekData may be delayed up to 5 minutes (GMT+8)
KimiBalance and today's consumption may be delayed ~10 minutes

The note renders at the end of the readout line. The plugin polls the balance endpoint every 5 seconds, but the numbers themselves are subject to the official delays above, so no change within a short window is expected.

Companion client

This plugin is an extension of DeepSeek Harness — use it together with the client:

  • DeepSeek Harness client: <https://github.com/lucaslus/deepseek-harness-desktop>

Known limitations

  • Qwen / Bailian Token Plan: Bailian has no usable API-key balance endpoint (official queries require the console), so the plugin only detects the mode and shows a note.
  • "Used this run": the DeepSeek / Kimi balance APIs return remaining amounts only, not historical consumption. The plugin takes the first balance read after startup as its baseline; the delta is the run's consumption, and the baseline resets on restart.
  • The balance query relies on local curl (bundled with macOS / Linux).

Development

  • index.js — node half: registers the /dsh-balance HTTP route, queries the balance, returns JSON. The FAMILIES array is the extension point — add a provider by appending one entry.
  • client.js — browser half: a hand-written window.__ModuleLoader__.load client bundle that renders the conversation.composer.dock readout.
  • cordis.patch.yml — the bundle patch layer inserting the plugin row.

License

MIT