Introduction

When managing multiple models in DeepSeek Harness (DSH) Web, manually checking the balance and health status of different Providers consumes a lot of time. The dsh-balance-quota plugin integrates balance queries, quota monitoring, and external model health monitoring into the DSH Web interface, displaying status information directly below the chat interface.

What Is It?

This is a model inference plugin maintained by kongshan-zhuyu, designed to provide visualized Provider balance and health monitoring capabilities for DSH Web.

  • Core features: Supports official presets, custom HTTP endpoints, JSON data extraction and transformation, and model health status monitoring.
  • License: MIT
  • Use cases: Developers who need to manage multiple API Providers uniformly or monitor model availability and response time (TTFT/latency).

Core Features

The plugin provides the following capabilities through a status bar below the interface and a standalone configuration page:

Balance and Quota Management

  • Official presets: Built-in DeepSeek balance and OpenCode Go rolling/weekly/monthly quota queries.
  • Custom endpoints: Supports public HTTPS and POST requests without a body, with configurable custom headers, timeout, and refresh interval.
  • JSON extraction: Supports property paths, array indices, and optional chaining, and provides up to five ?? fallback values.
  • Amount handling: Supports static/dynamic currency and amount divisor configuration, and provides a “draft test without saving” feature.

Interface and Interaction

  • Status bar: Displays balance, update time, force refresh button, and health monitoring icons below the chat editor.
  • Provider selection: Supports default Provider settings, inline Provider switching, and remembers the context selection for each conversation.
  • Model settings: Manages model ID/display name, context window, text/image input capabilities, and reasoning level.
  • Visual binding: After selecting a preview slot, pick fields directly from the JSON tree, with real-time preview updates.
  • All-model preview: Preview up to 50 models’ current mappings without additional requests.

Health Monitoring

  • External monitoring: Monitors status, availability, TTFT (time to first token), response time, and history via external JSON APIs.
  • Transformation and formatting: Supports transformation of text, numbers, percentages, and status values. Supports custom status value mapping, numeric precision (0–2 decimal places), and unit display.
  • Custom metrics: Can monitor error rate, empty responses, common errors, or arbitrary model metrics.

Security and Performance

  • Caching mechanism: Shares host balance cache and health preview cache, and automatically pauses refresh when the plugin is hidden.
  • Credential security: Reuses DSH credential references; API keys are not directly entered into browser configuration.
  • Network protection: Supports public HTTPS, DNS pinning, DNS rebinding protection, and blocking access to private IPs and redirects.

Installation and Enablement

Environment Requirements

  • Node.js 22+
  • DSH CLI

Installation Steps

  1. Install the plugin using DSH CLI:
    dsh plugin --profile web add dsh-balance-quota
  1. After installation or upgrade, restart the dsh web process:
    dsh web
  1. Verify whether the installation was successful:
    dsh plugin --profile web list

Configuration and Usage

  1. Open Settings → Plugins → Plugin configuration → Provider status.
  2. Configure balance queries, Provider editing, advanced settings, default Provider, and the chat status bar here.
  3. Click Edit to configure a custom balance API, or use an official preset.
  4. Advanced settings include Model settings and Health monitoring.
  5. In health monitoring, enable monitoring, test the external JSON endpoint, and use Preview all models to verify all mappings.

Notes and Use Cases

  • Version compatibility:
    • The plugin development version is 0.3.5, and the NPM published version is 0.3.3.
    • If using DSH 0.3.4, pair it with DSH 0.1.5-rc.1 or a newer version (@deepseek-ai/dsh-settings ≥ 0.1.5-rc.2).
    • If using DSH 0.1.4 or earlier, use plugin version 0.3.3.
  • Source code review: The plugin runs with DSH process permissions. Please check the source code and license (MIT) before use.
  • Ecosystem note: This plugin is an independent project in the community catalog and has no official affiliation with DeepSeek / High-Flyer.

Summary

dsh-balance-quota addresses the problem of fragmented balance and model health monitoring in DSH Web. Through visualized bindings, transformations, and caching mechanisms, it provides developers with a secure and efficient backend monitoring solution.

  • Plugin directory: https://www.skillhub.cn/plugins/kongshan-zhuyu/dsh-balance-quota
  • Source repository: https://github.com/kongshan-zhuyu/dsh-balance-quota