Introduction

After configuring multiple Providers in DeepSeek Harness (DSH), several recurring issues appear: whether a Provider is currently available often only becomes known after a request fails; account balance or plan quota requires opening a separate console page to check; and there is a lack of a unified view for how many tokens were consumed locally over a period of time and on which models.

dsh-llm-guardian addresses exactly these issues. It consolidates health checks, quota control, usage queries, and local statistics into the DSH Settings page, while not saving API keys in the plugin settings. Below, we introduce what it can do, how to install it, and what to watch out for when using it.

What is this

dsh-llm-guardian is a DeepSeek Harness community plugin maintained by ice-kele, licensed under MIT. One-sentence positioning: Provides Provider health status, quota, account usage, and local model usage statistics for DSH.

DSH’s philosophy is “everything is a plugin”; this project is implemented as a standard composable plugin without using Electron-specific APIs. The author also hopes it will enter the plugin market in the future and maintain machine-readable discoverability of the ecosystem via the dsh-plugin topic on the repository.

Core Features

The following capabilities come from the README and package.json, divided into four categories based on their purpose.

Provider Health Checks and Local Quotas

  • Supports periodic and on-demand Provider health checks; health checks call the configured Provider’s model discovery endpoint.
  • Local token counting, with an optional option to block requests after reaching the configured quota.

Usage Queries by Provider

  • Account or plan usage queries within a Provider scope, with explicit timeout and refresh controls.
  • Includes two built-in query adapters: DeepSeek balance query and Z.AI Coding Plan quota query.

Local Usage Dashboard

  • Optional local usage dashboard supporting 7/30/90-day views, summary metrics, activity heatmaps, responsive daily token charts, and model share; hovering over charts shows detailed values.
  • Supports filtering by model; statistics are calculated locally based on DSH session logs; the plugin does not upload them.

Settings Page Integration and Security Constraints

  • Adds health test actions, model usage actions, and compact status summaries to each configured Provider card (Settings → Models).
  • Provides key masking, response size limits, and same-origin restrictions for custom usage queries.

Installation and Activation

Installation command:

dsh plugin add github:ice-kele/dsh-llm-guardian

After installation, restart DeepSeek Harness or DSH Desktop; the Provider controls will appear under Settings → Models.

Environment requirements: package.json requires Node >= 22.19.0; peer dependencies for the @deepseek-ai/dsh-* series (0.1.1-rc.2) are all marked as optional.

Compatibility note: The plugin prioritizes the two typed slots settings.models.provider.action and settings.models.provider.summary; for current DSH versions that haven’t exposed these slots, a built-in DOM compatibility adapter is provided. The upstream slot patch is tracked separately, and this adapter can be removed once the extension points are available.

Typical Usage

After installing and restarting, you can do the following things first:

  1. Open Settings → Models, execute health tests on each configured Provider card to view model usage and compact status summaries.
  2. When checking balance or quota, use the built-in adapter to query DeepSeek balance or Z.AI Coding Plan quota; timeout and refresh are explicitly controlled.
  3. Open the local usage dashboard, switch between 7/30/90-day views, filter by model, and view summary metrics, activity heatmaps, daily token trends, and model share.
  4. After configuring local quota, let the plugin block subsequent requests when the token count reaches the threshold.

If you want to participate in development, the workflow is first npm install, then npm run check, and finally npm pack --dry-run:

npm install
npm run check
npm pack --dry-run

Privacy and Network Behavior

This section is listed separately for easy evaluation before installation:

  • API keys are parsed through the DSH credential service; the plugin does not persist API keys in the plugin settings.
  • Health checks call the configured Provider’s model discovery endpoint.
  • Usage queries are limited to HTTPS endpoints on the same origin as the Provider; local Providers allow loopback HTTP.
  • Local counters and query results are stored in the llm-guardian settings namespace.
  • Dashboard statistics are calculated locally from DSH session logs; the plugin does not upload them.

Suitable Scenarios and Notes

Suitable scenarios: Users who have configured multiple Providers simultaneously and need to periodically confirm availability; users who want to query DeepSeek balance or Z.AI Coding Plan quota without leaving DSH; and users who want to locally track token usage and do not want data to leave the local machine.

Notes:

  1. The plugin runs with the permissions of the current DSH process. Before installation, it is recommended to check the repository source code and license (MIT) to confirm acceptability before installing.
  2. Usage queries have same-origin restrictions, only accessing HTTPS endpoints on the same origin as the Provider; local Providers are an exception allowing loopback HTTP.
  3. Current DSH versions have not yet exposed the settings.models.provider.action and settings.models.provider.summary slots, so the plugin relies on the DOM compatibility adapter at this time; this will improve once the upstream slots are merged.

After completing the above steps, health checks, quota control, and usage statistics can form a closed loop within DSH.

Conclusion

The value of dsh-llm-guardian lies in bringing originally scattered information—Provider health status, account or plan usage, and local token statistics—into the DSH Settings page, while keys are not persisted by the plugin and statistics do not leave the local machine. Repository address: https://github.com/ice-kele/dsh-llm-guardian.