Introduction

When running Web-based agents with DeepSeek Harness (DSH), account balance is an unavoidable issue: if the balance runs out, subsequent calls will fail. To check the balance, you usually have to switch out of the current environment, open the DeepSeek platform backend to log in and check, interrupting your workflow. dsh-balance-display moves this step into the Harness interface: the balance is displayed as a persistent panel, viewable on demand.

Below is an introduction to the plugin’s functionality, data source, installation method, and configuration.

What is this

dsh-balance-display is an installable bundle for DeepSeek Harness maintained by Liu-ty, version 0.1.0, under the MIT license. It displays the current DeepSeek API account balance in a collapsible shell.overlay panel; data comes from the official balance interface, and the plugin itself does not store any balance values.

Core Features

  • Displays the current DeepSeek API account balance in a collapsible shell.overlay panel;
  • CNY and USD lines, each containing total, granted, and topped-up balances;
  • Displays account availability and the last refresh time;
  • Supports collapsing the panel and manual refresh; auto-refresh offers manual, 1, 5, and 15-minute intervals;
  • Pauses periodic refresh when the page is hidden and resumes when visible;
  • Adapts to Harness light/dark theme tokens, built-in zh-CN and en-US language dictionaries;
  • Clear error states: missing-credential, 401, timeout, network, upstream, and invalid response each have corresponding displays.

Where does the data come from

Every time the Host refreshes via the Harness credentials service, it parses DEEPSEEK_API_KEY and then calls the official interface GET https://api.deepseek.com/user/balance. The API key is not sent to the browser, nor is it persisted, recorded, or written to snapshots by this plugin. The Host response uses Cache-Control: no-store; DeepSeek’s non-successful response bodies are not forwarded or recorded.

Installation and Activation

First, confirm the environment meets three conditions:

  1. DeepSeek Harness with a Web profile, and the current profile-bundle system;
  2. Node.js ^22.19.0 || >=24.0.0;
  3. Real-time balance reading requires a DEEPSEEK_API_KEY available in Harness credentials. If credentials are missing, the plugin will still load and display the missing-credential status.

Recommended installation from the fixed v0.1.0 source code tag:

dsh plugin --profile web add github:Liu-ty/dsh-balance-display#v0.1.0

Local checkout installation and pre-built release tarball installation are also supported:

dsh plugin --profile web add F:\path\to\dsh-balance-display
dsh plugin --profile web add .\dsh-balance-display-0.1.0.tgz

After installation, run the following commands to check the inserted configuration and then start for verification:

dsh --profile web --dump-config
dsh --profile web

Build Permissions for Git Installation

Git installation pulls the source code and runs the package’s prepare build. Pnpm may refuse to install until the profile’s pnpm-workspace.yaml explicitly includes:

allowBuilds:
  dsh-balance-display: true

This authorization allows the package code to execute locally during installation. Source code should be reviewed before granting this, and a tag or commit should be pinned. If you do not wish to grant build permissions, use a published tarball, which already contains pre-built files and does not require this permission.

Configuration

The bundle inserts a Host/Client entry in the configuration:

- id: balance-display
  name: dsh-balance-display
  inject: [credentials, webServer]
  config:
    requestTimeoutMs: 10000

To modify the timeout, override the entire line in the profile or home’s cordis.patch.yml, changing requestTimeoutMs to a positive integer. Auto-refresh interval and collapse state are browser local preferences; the plugin does not store any balance values.

Applicable Scenarios and Notes

Suitable for: Developers who use DSH with a Web profile daily and wish to monitor DeepSeek API balance without leaving the current interface.

Note a few points before use:

  1. The plugin runs with the current dsh process permissions; source code and license should be checked before installation (this project is MIT);
  2. Git installation requires pnpm build authorization; review source code and pin tag or commit before granting;
  3. The plugin has no model visible input and no token statistics integration; do not treat it as a cost accounting tool;
  4. It will not interrupt execution when credentials are missing; the panel will display a missing-credential status, and once credentials are configured, it will read normally.

Summary

dsh-balance-display solves a specific small problem: changing balance checking from switching pages and logging in to a glance in the interface. Implementation-wise, it uses the official interface, credentials do not enter the browser, it is MIT licensed, and can be enabled as needed.

Community plugin directory page: https://www.skillhub.cn/plugins/Liu-ty/dsh-balance-display (Independent site, no official affiliation with DeepSeek or Huafei/Fangfang)
Source code repository: https://github.com/Liu-ty/dsh-balance-display