DSH Balance Panel: Centralized View of Provider Balances and Key Status in DSH

Foreword

In DSH, when multiple model Providers are configured, the balance, key status, and model scopes need to be checked separately. Below is an introduction to a DSH plugin: dsh-balance-panel. It provides a balance entry point at the bottom of the Web UI sidebar, which can be opened to view the models, key status, and balance details of the Providers in the current DSH configuration.

What This Is

dsh-balance-panel is a DeepSeek Harness (DSH) plugin maintained by wycto, with the npm package name @wycto/dsh-balance-panel. It is used to centrally display the Providers actually configured in the current DSH, as well as the models actually configured under those Providers. The license is MIT. The old unprefixed name dsh-balance-panel is deprecated; use the package name with the @wycto/ prefix when installing.

Core Features

  • Only displays Providers that are actually configured and models that are actually configured. Dormant declarations and the full default model list from the schema will not appear in the panel.
  • Built-in DeepSeek official /user/balance endpoint.
  • Supports custom balance endpoints for other Providers.
  • Displays per-Provider whether the apiKeyEnv credential is configured; the keys themselves never enter the frontend.
  • Shows a balance summary pill at the bottom of the sidebar, auto-refreshing every 5 minutes.
  • Clicking the pill opens a full-screen balance panel, displaying model chips, balance details, and status badges per Provider.
  • Provides clear messages when keys are missing, the endpoint is unsupported, or the query fails, without affecting other Providers.

Installation and Enablement

Install for the profile user:

dsh plugin --profile web add @wycto/dsh-balance-panel

After installation, restart the Web UI, or refresh:

http://127.0.0.1:3080

Run from source:

pnpm dsh web --patch ./dsh-balance-panel/cordis.patch.yml

Typical Usage

  1. Start the DSH Web UI.
  2. Check the balance pill at the bottom of the sidebar.
  3. Click the pill to open the balance panel.
  4. Use the manual refresh button in the top-right corner of the panel.

For DeepSeek, the plugin queries the official /user/balance endpoint. For other Providers, if there is no standard balance endpoint, the panel will display “unsupported”; alternatively, you can add a balance field to the Provider profile in settings, containing endpoint and auth:

balance
endpoint
auth

These fields describe the custom balance endpoint for the Provider.

Security and Runtime Boundaries

Keys are only resolved and used within the Host process via credentials.resolve. Balance requests are made by the Host, and only the balance results reach the browser; keys never enter the frontend or logs.

Related routes and endpoints:

/dsh-balance-panel
/user/balance

The /dsh-balance-panel route is only registered on the loopback webServer, so DSH Web UI must be accessed via localhost loopback.

Applicable Scenarios and Notes

Suitable for users who configure multiple Providers in DSH and need to confirm balance, key status, and model scopes.

Notes:

  • The plugin runs with the permissions of the current dsh process; review the source code and MIT license before installing.
  • Use the npm package name @wycto/dsh-balance-panel when installing.
  • There are inconsistencies in the repository path across materials: plugin clues and the README source point to https://github.com/wycto/dsh-balance-panel, while the package.json repository is https://github.com/wycto/dsh-model-balance.git. Using the npm package name as the basis for installation is more reliable.

Conclusion

dsh-balance-panel centralizes Provider balances, key statuses, and model configurations into the DSH Web UI sidebar.

Community directory page:

https://www.skillhub.cn/plugins/wycto/dsh-balance-panel

GitHub link:

https://github.com/wycto/dsh-balance-panel
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye