dsh-llm-quota: View Remaining Quota of Model Providers in the DSH Status Line

Introduction

When switching models or running long sessions in DeepSeek Harness (dsh), checking the remaining balance, Coding Plan, or reset quotas often requires opening a separate console or billing page. dsh focuses on inference and plugin extensions, so the default interface does not continuously display remaining resources from each provider. The community plugin dsh-llm-quota (npm: @cs-qyzhang/dsh-llm-quota) directly overlays the quota of the currently used provider onto the status bar, model menu, and current model tag, and optionally records change trends locally for easy comparison of usage and reset times.

What is this

dsh-llm-quota is published by the maintainer cs-qyzhang and is categorized as “Model Inference” in the SkillHub Plugin Directory. The plugin automatically queries quotas based on the provider of the currently selected model and displays them in multiple places on the dsh Web interface. Clicking a quota item in the status bar opens a details popup to view metrics and historical trends. Source code and documentation can be found in the GitHub repository, and the license is MIT (current version in package.json is 1.2.0).

Core Features

The following list outlines capabilities already documented in the README and consistent with the implementation documentation.

Real-time Quota

  • Displays remaining percentage and reset time for balance, monthly usage, or 5-hour / weekly quota metrics (specific fields vary by provider).
  • The query logic follows the provider of the current model, and no separate configuration entry is required for each model.

Multi-place Display

  • Covers the dsh status bar, model selection menu, and “Current Model” tab.
  • Clicking a quota item in the status bar opens details (README provides previews for docs/ui.png and docs/popup.png).
  • The Host collects data in the background at the configured interval; quota changes are displayed in the details popup, so the session page does not need to remain open.
  • Writes to local SQLite only when quota metrics declared by the provider change. Disabling history-related features stops collection and removes the history query route (details can be found in the architecture document in the repository).

Multi-provider & Extensions

  • Built-in adapters for common services like DeepSeek, GLM, Kimi, MiniMax, OpenAI, OpenRouter, and others. See the repository Provider Documentation and DSH Provider List for complete provider IDs, supported scopes, and credential requirements.
  • Supports custom provider routing and loading trusted Host ESM Providers via providerModules for proxying, private deployment, or new quota systems.

Installation & Activation

Environment requirements: Node.js >=22.13.0; the dsh version must satisfy the range declared in engines.dsh in package.json.

Install via terminal (Web profile):

dsh plugin --profile web add @cs-qyzhang/dsh-llm-quota@latest

Alternatively, enter Plugins → Add Plugin in the dsh interface, fill in @cs-qyzhang/dsh-llm-quota, and install and enable it.

Uninstall:

dsh plugin --profile web remove @cs-qyzhang/dsh-llm-quota

A restart of dsh or a page refresh is required after uninstalling.

Usage & Configuration

Credentials

By default, it reuses existing reasoning credentials in dsh. If a provider requires additional console credentials, configure them in Plugins → Installed plugins → Model Quota → Provider Extra Credentials; requirements for each provider can be found in providers.md.

Plugin Configuration Items

You can adjust the following in “Plugin Config” under Plugins → Installed plugins → Model Quota:

Configuration Item Description (from README)
queryIntervalSeconds Query interval; history collection also follows this interval (default 30 seconds)
history Enable or disable history collection and persistence
historyDefaultRange Default time range in details, defaults to the last 1 hour; options include last 1/4/12/24 hours, 7 days, or 30 days (takes effect when reopening details)
providers JSON edit for custom provider-related configurations
providerModules JSON edit for trusted Host ESM Provider modules

Saving the configuration will rebuild the Host’s routes, cache, and collectors. If you modify the display, copywriting, or credential fields of a custom Provider, you need to refresh the open pages to re-fetch the manifest. Custom modules and YAML examples can be found in Integrating New Quota Systems.

For the history data storage path, retention policy, and trend chart explanations, see Architecture Document · History Collection & Persistence.

HTTP Interface

The plugin registers the following routes on the dsh Host side (all require dsh login authentication):

GET /api/llm-quota?provider=<provider id>
GET /api/llm-quota/history?provider=<provider id>&days=7
GET /api/llm-quota/i18n
GET /api/llm-quota/views

Note that /history is only registered when history is enabled; /i18n and /views are mainly used for Client initialization. For query parameters, response shapes, and failure reasons, see Architecture Document.

Use Cases & Notes

Who is it for: Users who frequently switch multi-provider models on the dsh Web interface and need to check Coding Plans or balances without repeatedly opening various platform consoles; developers who need to observe quota trends over time in the same interface.

How it runs: The plugin runs with the permissions of the current dsh process. It accesses provider quota interfaces according to the configuration and uses local SQLite to store history. Before installing, you should read the repository source code and the MIT license to ensure that credentials are only passed through dsh and the plugin configuration interface; SkillHub is a community directory and has no official affiliation with DeepSeek / Huanshan.

Troubleshooting: Common errors can be found in Failure Reasons. Contributors can use npm run check and npm test for local verification (the README notes that tests do not access real providers).

Conclusion

dsh-llm-quota brings “how much is left for the current provider” to the status bar and model UI, and keeps local history curves for quota changes. If you have already configured reasoning credentials in dsh, you can install the Web plugin using the commands above and start using it directly. When extending to new providers, refer to the providers and architecture documents in the repository.

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

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

Xiaoye