dsh-quota-pill: View remaining subscription quotas at a glance beside the DSH input area.

Introduction

When switching models or running long sessions in DeepSeek Harness (DSH), what truly holds you back is often not “whether you can connect,” but “how much quota is left on this subscription.” Quota windows vary across vendors (daily / weekly / monthly); some use API Keys, others use OAuth, and DeepSeek official accounts use a platform wallet rather than a simple percentage. Opening consoles one by one or digging through documentation interrupts the rhythm of “writing code continuously in the composer.”

Below is the community plugin dsh-quota-pill: it places a collapsible “pill” control next to the composer toolbar in the DSH Web interface, summarizing the remaining quota for your configured multi-channel LLM subscriptions. The maintainer is GitHub user 598934321, the npm package name is @hystudio/dsh-quota-pill (the same author as the repository 598934321/dsh-quota-pill under a different account name), the category is admin-security, and the license is MIT (see package.json).

What This Is

dsh-quota-pill is a quota display plugin for the DeepSeek Harness Web GUI: it displays the tightest quota window next to the input area. When expanded, it allows you to view breakdowns and reset times by service provider. When switching sessions or models, the control follows the provider routed to by the current request, initially showing the last reading for that provider and refreshing in the background, then transitioning to real-time values.

The plugin itself does not run OAuth nor send credentials into the browser; quota queries are performed by a local sidecar process (see architecture below).

Core Features

Display and Interaction

  • The pill is located in the composer toolbar, defaulting to highlighting the remaining percentage or equivalent information for the “tightest” window.
  • When expanded, it lists details by service provider, including the window type and resetAt.
  • It only lists providers that are actually routable in DSH’s session/modelCatalog; after removing a provider from DSH, the pill list disappears accordingly. Providers that appear but have no credentials are skipped rather than showing empty rows.

Supported Providers and Credential Sources

Provider Credential
DeepSeek (Official) DSH saved Platform login state, no additional configuration required
Kimi Coding refs.KIMI_CODING_API_KEY (~/.dsh/.credentials.yaml)
OpenCode Go refs.OPENCODE_GO_API_KEY
Command Code refs.COMMANDCODE_API_KEY
xAI (Grok) OAuth token in CLIProxyAPI
Codex (ChatGPT Plus) Same as above; and CLIProxyAPI must be running
Antigravity Same as above
Open Design (Optional) refs.OPENDESIGN_SESSION_COOKIE (Cloud console session cookie)

If you have already logged into the DeepSeek Platform in DSH, the DeepSeek row works immediately. The three API Key providers only require writing a key. The three OAuth-based providers depend on CLIProxyAPI installation and login; the plugin only reads tokens and does not initiate OAuth itself.

Local Sidecar and HTTP Interface

The architecture is divided into two parts: client.js in the browser is only responsible for rendering; credential reading and upstream calls are completed in a sidecar on 127.0.0.1, with results cached for approximately 60 seconds.

Path Function
GET /health Liveness check and provider list
GET /quota?model=<id> Select a provider reading based on model prefix
GET /quota/all Concurrently query all configured providers
GET /setup What configuration is still missing for each provider

The query parameter ?fresh=1 bypasses the 60-second cache. Response fields include kind (e.g., subscription-quota, payg, none, probe-failed), remainingPct, window, resetAt, windows, etc., facilitating the UI in distinguishing between “subscription with cap,” “pay-as-you-go,” “not configured,” and “probe failed” situations.

Implementation Notes for Certain Providers (Excerpted from Upstream Docs)

  • DeepSeek: Prepaid CNY wallet; the pill displays balance and gifted credit rather than percentage; the balance is read via DSH’s own account/getBalance RPC, the plugin does not directly hold the Platform token.
  • Codex: Prioritizes reading X-Codex-* headers observed in proxy traffic via the CLIProxyAPI management API; CLIProxyAPI must remain running.
  • Antigravity: Multiple Gemini models share the same quota pool, so only one summary is reported.
  • Open Design: Requires obtaining the HttpOnly session cookie from browser developer tools and writing it to refs.OPENDESIGN_SESSION_COOKIE.

Installation and Activation

The plugin runs with the current DSH process permissions; please check the GitHub repository source code and the MIT license before installing. Running the sidecar requires Node.js >= 18.

1. Install DSH Plugin

dsh plugin add @hystudio/dsh-quota-pill

2. Start Sidecar

npx @hystudio/dsh-quota-pill

If the sidecar is not running, the pill will display “quota service is not running” and prompt the command above. npx terminates when the terminal exits; for long-term usage, it is recommended to configure it as a background service according to the README (macOS launchd or Linux systemd user unit, executing the absolute path of bin/quota-pill-server.js).

3. Write API Keys as Needed

# ~/.dsh/.credentials.yaml
refs:
  KIMI_CODING_API_KEY: sk-...
  OPENCODE_GO_API_KEY: sk-...
  COMMANDCODE_API_KEY: sk-...

For OAuth-based providers, configure CLIProxyAPI according to the README; for Open Design, add OPENDESIGN_SESSION_COOKIE as needed.

4. Reload DSH Window

After saving credentials and confirming the sidecar is listening locally, simply reload the DSH Web window.

Typical Usage

Daily Routine After Manual Installation

  1. Keep npx @hystudio/dsh-quota-pill (or equivalent systemd / launchd service) running in the background.
  2. Check the “tightest” window on the pill next to the composer; expand the list when breakdowns are needed.
  3. Observe whether the corresponding provider reading updates via GET /quota?model=... when switching models or sessions; rely on the sidecar’s ?fresh=1 behavior when an immediate refresh is needed (initiated by the client when required).

Let an Agent Install via Documentation

The repository provides AGENTS.md for AI agents to detect the existing environment step-by-step, only ask for keys that cannot be inferred, write credentials, and verify provider by provider. You can send the following to an agent:

Read AGENTS.md in this repo and set up dsh-quota-pill for me.

Use Cases and Notes

Who it is for: Users who connect multiple subscriptions or APIs in DSH simultaneously (Official DeepSeek, Kimi Coding, OpenCode Go, Codex / xAI / Antigravity via CLIProxyAPI, etc.) and want to see remaining quota and reset times in the same interface where they write prompts, rather than repeatedly opening vendor consoles.

Privacy and Boundaries (According to README “Privacy”): Credentials are read from disk, used only for upstream queries, and not written to logs; the sidecar binds only to 127.0.0.1; no data is sent to third parties except for the quota interfaces of the respective service providers.

Ecosystem Note: DSH advocates “everything is a plugin”; the SkillHub directory page is a community collection site and has no official affiliation with DeepSeek / High-Flyer. Please make it a habit to verify source code, permissions, and licenses before installing community plugins.

Conclusion

Through the steps above, you can use a pill next to the DSH composer to summarize “how much is left in each subscription” and keep credentials in the local sidecar. For further details on installation, provider special cases, and background persistence, see GitHub: 598934321/dsh-quota-pill and the SkillHub Plugin Page.

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

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

Xiaoye