Introduction

When using models in DSH Web, balance and local token usage are scattered across different sources. dsh-usage-lite provides a sidebar panel for the DeepSeek Harness Web interface to centrally view DeepSeek balance, vendor accounts, and local usage over the past six months. Below is an introduction to its capabilities, installation method, and limitations.

What is it

dsh-usage-lite is a DSH client plugin maintained by ericw0315 and licensed under the MIT license. It targets the DeepSeek Harness Web interface, aggregating DeepSeek balance queries and local token usage into a single entry point.

Core Features

  • Quick balance viewing in the sidebar.
  • Expand to view vendor accounts and usage over the past six months.
  • Automatically discovers configured model vendors in DSH and displays them line by line.
  • Query DeepSeek’s current balance, bonus quota, and top-up quota.
  • Supports refreshing, hiding balance, and selecting the default collapsed account.
  • Aggregates input, output, cache read, and cache write tokens.
  • Display tokens and estimated costs by vendor and model.
  • Display a daily usage heatmap for the last 27 weeks.
  • Click on a date to view daily tokens and estimated costs.
  • Follows the Chinese/English interface of DSH Web.

Installation and Enablement

A DeepSeek Harness environment with dsh web installed and running is required.

dsh plugin --profile web add dsh-usage-lite

Execute the installation command above first, then restart the running dsh web, and finally hard refresh in your browser.

Update the plugin:

dsh plugin --profile web update dsh-usage-lite

Uninstall the plugin:

dsh plugin --profile web remove dsh-usage-lite

Configuration and Common Status

The plugin automatically discovers configured model vendors in DSH and uses them for balance and usage display. To make the DeepSeek balance available, you can configure it in the DSH credentials file:

# ~/.dsh/.credentials.yaml
DEEPSEEK_API_KEY: sk-your-key-here

Confirm that the apiKeyEnv of llm-deepseek matches the key in ~/.dsh/.credentials.yaml, then restart dsh web.

Notes during use:

  • Currently only DeepSeek supports balance queries; other vendors do not yet support quota queries but still appear in usage aggregation.
  • Usage relies on data.usage and model source fields in DSH session events; corresponding details may be empty if there are no corresponding events.
  • Costs are estimated by a built-in price list; unknown models are currently estimated using the deepseek-chat price; please refer to the vendor’s actual bill.
  • Do not submit real API keys to Git, public Issues, or logs.

Privacy and Operational Boundaries

  • API keys are parsed server-side via DSH credentials and are not sent to the plugin client.
  • The plugin’s server interface only accepts GET requests initiated from the local loopback address.
  • The project does not include telemetry, user tracking, or remote analytics services.
  • The plugin runs with the permissions of the current dsh process; it is recommended to check the source code and MIT license before installing.

Applicable Scenarios

dsh-usage-lite is suitable for developers already using dsh web, especially those needing to view DeepSeek balance, vendor token usage, and trends over the past six months in the browser sidebar. If the requirement is to query balances across multiple vendors, it currently only covers DeepSeek balance queries; other vendors still primarily rely on DSH’s own usage event aggregation.

Links

  • Directory page: https://www.skillhub.cn/plugins/ericw0315/dsh-usage-lite
  • GitHub: https://github.com/ericw0315/dsh-usage-lite