Introduction

DeepSeek Harness (DSH) is a plugin-based development environment. During use, developers need to continuously monitor the API balance to avoid request interruptions or extra charges caused by insufficient balance. The existing Web interface lacks an intuitive entry point for displaying the balance. anonrttty/dsh-api-balance-displayer-plugin aims to address this issue. It is a lightweight, zero-build plugin that displays the balance directly in the upper-right corner of the session header.

Plugin Positioning

  • Name: anonrttty/dsh-api-balance-displayer-plugin
  • Positioning: DeepSeek Harness API balance display plugin
  • Maintainer: anonRTtty
  • License: MIT

Core Features

  • Location: Displays the balance in the upper-right corner of the session header, with styling consistent with the built-in “Session log” button.
  • Manual Refresh: Click the ↻ button to refresh the balance data immediately.
  • Automatic Refresh: Automatically refreshes only once when the page is loaded (F5). Switching sessions or views does not trigger a refresh.
  • Localized UI: Labels, loading states, and all error messages follow the DSH interface language (English/Simplified Chinese).
  • Error Messages: On network or credential errors, the capsule displays the specific error reason (for example, Balance: Invalid API key).
  • Free Query: The balance query endpoint is free and does not consume API tokens.
  • No Conflicts: It is registered in the add slot conversation.session.header.utilities and does not replace any built-in UI.

Installation and Activation

Use the official CLI to install the plugin; the configuration is applied automatically:

dsh plugin --profile web add github:anonRTtty/dsh-api-balance-displayer-plugin

After installation, restart DSH and force-refresh the browser (Ctrl+Shift+R) to activate it.

Typical Usage

  • Manual Check: Click the ↻ button in the upper-right corner to view the latest balance.
  • Automatic Check: Each time the page is refreshed with F5 in the browser, the balance is updated automatically.

Applicable Scenarios and Notes

  • The plugin reads the API key through DSH’s credential mechanism; the key does not leave the host process.
  • The balance query uses the https://api.deepseek.com/user/balance endpoint and is completely free.
  • The code is hosted on GitHub; it is recommended to review the source code and license (MIT) before use.
  • Links: GitHub Repository | Community Directory