DSH Usage Dashboard Plus: DSH Web Sidebar Balance and Today's Spending Plugin

Preface

Under DSH’s “everything is a plugin” extension model, the web client can add panels, statistics, and usage analysis capabilities through plugins. For DSH developers using the DeepSeek API, a specific question arises: where can I check the API balance, what is today’s token spend, and are external vision model calls included in the cost?

dsh-usage-dashboard-plus addresses these issues by displaying Balance ¥xx · Today ¥xx at the bottom of the DSH web sidebar, along with a full usage dashboard.

What This Is

dsh-usage-dashboard-plus is a DSH web plugin maintained by 1HelloMan1, licensed under MIT. The documentation notes it is a fork of dsh-usage-dashboard, and the original repository is also MIT-licensed.

Its main positioning:

  • Displays DeepSeek API balance and today’s spend at the bottom of the sidebar.
  • Supports external vision model call statistics and a full usage dashboard.
  • Inherits the Stats implementation, providing call logs, per-model statistics, and CSV export.
  • No build step required: provides host half (lib/index.js) and browser bundle (lib/client.js) via the dsh.client mechanism.

Core Features

The widget displays:

Balance ¥xx · Today ¥xx

Clicking it opens a detail card. The detail card shows call volume, tokens, per-model breakdown, and pricing information.

API Balance

The plugin resolves the DeepSeek key through the DSH credentials service and queries the balance endpoint. Queries are cached, with balanceCacheMs used to configure cache duration.

Today’s Spend (Estimated)

Today’s spend is an estimate. The plugin scans session logs and, optionally, an external usage log, estimating token costs based on the price table.

External Vision Model Call Statistics

The plugin includes external vision model calls in today’s spend through an optional JSONL usage log. It has a built-in mimo-v2.5 pricing entry for cost estimation and supports overrides via prices.

Peak/Off-Peak Pricing Plans

Supports date-gated DeepSeek rate tables. Documentation mentions a peak/off-peak rate table effective from 2026-08-17, configurable via priceSchedule.

Full Usage Dashboard

The full usage dashboard displays per provider/model:

  • Call volume
  • Latency
  • TTFT
  • Throughput
  • Input/output/cache tokens
  • Cache rate
  • Estimated cost

Call Log Analysis

The call log supports filtering and searching by session, provider, and model, viewing recent calls, and exporting the filtered results to CSV. The call log has a 500-line limit.

Inherited Stats Implementation

Plus includes the following inherited Stats implementations:

  • usageDashboard session projection
  • 500-line call log limit
  • Full-session model aggregation
  • Replay-safe historical statistics

Installation and Activation

Install in the web profile:

dsh plugin --profile web add dsh-usage-dashboard-plus

Restart dsh web after installation. This is because profile patch layers do not hot-reload.

Verify configuration:

dsh --profile web --dump-config

Expect a usage-dashboard-plus row in the output.

Then hard-refresh the GUI, e.g., Cmd+Shift+R. The bottom widget will appear next to Settings.

Migrating from dsh-stats-dashboard

The old dsh-stats-dashboard has been merged into Plus. For migration:

  1. Remove or disable the old dsh-stats-dashboard plugin in the web profile.
  2. Install dsh-usage-dashboard-plus.
  3. Restart dsh web and hard-refresh the Settings page.

Do not install/enable both statistics plugins in the same profile simultaneously.

Typical Usage

Configuring the usage-dashboard Namespace

Configuration is placed in the usage-dashboard namespace of ~/.dsh/settings.yaml. Documentation states that usage-dashboard configuration supports hot reload.

Example:

usage-dashboard:
  apiKeyRef: DEEPSEEK_API_KEY
  baseURL: ""
  prices:
    "mimo-v2.5": { input: 2, cacheRead: 0.05, output: 8 }
  priceSchedule: []
  balanceCacheMs: 60000
  sessionsRoot: ""
  scanWindowMs: 172800000
  externalUsageLog: ""

Configuration items:

  • apiKeyRef: The DeepSeek key credential ref used for balance queries.
  • baseURL: The base URL used for balance queries.
  • prices: Per-model price entries; can override the built-in mimo-v2.5 entry.
  • priceSchedule: Date-gated peak/off-peak rate table.
  • balanceCacheMs: Balance query cache duration.
  • sessionsRoot: Session log directory.
  • scanWindowMs: Session log scanning window.
  • externalUsageLog: Path to the external model call JSONL log.

Configuring an External Usage Log

externalUsageLog can be configured as a path to a JSONL log. The default path is <dsh home>/vision-fallback/usage.jsonl. If no external usage log is needed, set it to off to disable.

Example JSONL line:

{ "ts": 1755000000000, "model": "mimo-v2.5", "inputTokens": 1200, "outputTokens": 320, "cacheReadTokens": 0, "cacheWriteTokens": 0 }

Use Cases and Considerations

Suitable for those who want to view DeepSeek API balance, today’s spend, external vision model call statistics, a full usage dashboard, and CSV export in the DSH web client.

Points to note:

  • Today’s spend is an estimate based on session logs and external usage logs against the price table.
  • Balance queries use the DeepSeek key ref and balance endpoint, with caching.
  • The call log has a 500-line limit.
  • The peak/off-peak rate table is date-gated; documentation mentions it starts from 2026-08-17.
  • Profile patch layers do not hot-reload after installation; restart dsh web is required; usage-dashboard configuration supports hot reload.
  • The old dsh-stats-dashboard has been merged into Plus; do not enable two statistics plugins in the same profile.
  • The plugin runs with the permissions of the current dsh process. Review the source code and license before installation; this plugin is MIT-licensed, and documentation indicates the original repository it forked from is also MIT.

Links

The directory page above is a community plugin directory, not the official app store; there is no official affiliation with DeepSeek / High-Flyer.

羽毛球分组比赛记分
小程序二维码

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

Xiaoye