Introduction

When developing or using agents in DeepSeek Harness (DSH), checking the remaining quota of the current model provider is a common requirement. For DeepSeek, Moonshot, OpenRouter, and Alibaba Cloud Billing Center, public APIs can provide actual quota values. However, Alibaba Cloud / Qwen Token Plan has quota but no public quota API; only the console data gateway with a cookie session is available. This plugin builds that contract in and also connects providers with official APIs to their actual values.

What It Is

This is a Web UI plugin that displays the remaining quota of the current model provider in the input toolbar. The plugin is maintained by xinghe-1018 and mainly addresses the problem of “checking how much quota remains for the current model provider in DSH”, especially filling the gap for vendors such as Alibaba Cloud / Qwen Token Plan that only expose a console data gateway with a cookie session and have no public API.

Core Features

  1. Displays a quota badge in the input toolbar and follows model-provider switching
    The badge is a small pill and follows the provider of the current model. If an official API is available, it displays the percentage and remaining-bar; otherwise, it displays measured values.

  2. Supports official APIs from multiple vendors for actual values
    Supports obtaining actual values through the official APIs of DeepSeek, Moonshot, OpenRouter, and Alibaba Cloud Billing Center.

  3. Supports the Qwen Token Plan console data gateway
    Supports the Token Plan console data gateway with a cookie session.

  4. Zero-config auto-detection of the active route
    The plugin identifies the active route by confidence ranking and automatically completes the data source. Users do not need to write sources or manually fill in providers.

  5. No credit conversion and no estimated remaining quota
    It does not convert credits, does not estimate remaining quota, and does not extrapolate the remaining amount from history.

  6. Includes the token_plan_quota model tool
    Provides the model tool token_plan_quota.

Installation and Enablement

Use the following command to install it:

dsh plugin --profile web add github:xinghe-1018/dsh-token-plan-quota

After installation, restart dsh web once to make the changes take effect.

Configuration

The plugin supports the following configuration items (default values are in the code):

{
  "autoDetect": true,
  "refreshMinutes": 10,
  "pollSeconds": 10,
  "panelScope": "current",
  "debug": false
}
  • autoDetect: Defaults to true, automatically completing the data source based on the host’s active route. When set to false, the user-defined sources are treated as the single source of truth.
  • panelScope: Defaults to "current", listing only the card for the current model provider; set it to "all" to view all providers.
  • refreshMinutes and pollSeconds: Control the data refresh frequency.

UI and Usage

  • Quota badge: The badge in the input toolbar is a small pill and follows the provider of the current model. The tooltip includes information such as name, speed, and days.
  • Detail panel: Displays official remaining-quota cards (the bar and percentage are shown only when an official denominator is available) and the local measured ledger. The panel can be dragged into a floating window (drag the title bar, double-click to reset).
  • Model tool: Use the token_plan_quota model tool to query quota.

Use Cases and Notes

  • Suitable for users who need to check vendor remaining quota in real time and do not want to configure too many parameters manually.
  • The plugin runs with the permissions of the current dsh process; the source code should be checked before installation (license information is not explicitly provided in the materials).
  • For providers without an official quota API (such as MiniMax and regular API keys), the plugin only displays measured usage for the current instance.
  • The plugin does not perform billing-incurring health checks; it uses only read-only endpoints.

Permissions

When running, the plugin needs access to the following network endpoints:

  • https://api.deepseek.com
  • https://api.moonshot.cn
  • https://api.moonshot.ai
  • https://openrouter.ai
  • https://business.aliyuncs.com
  • https://cs-data.qianwenai.com
  • https://platform-home.qianwenai.com
  • https://cdn.jsdelivr.net

Summary

dsh-token-plan-quota solves the problem of checking the remaining quota of the current model provider in DSH, especially filling the gap for vendors such as Alibaba Cloud / Qwen Token Plan that only expose a console data gateway with a cookie session and have no public API. Its zero-config auto-detection and read-only endpoint design allow it to provide actual values or clearly measured data without converting credits or performing billing-incurring probes.

  • Plugin directory: https://www.skillhub.cn/plugins/xinghe-1018/dsh-token-plan-quota
  • GitHub repository: https://github.com/xinghe-1018/dsh-token-plan-quota