Preface¶
When switching models or routing in DeepSeek Harness, quotas and balances are often scattered across various provider consoles or OAuth pages, and the Composer itself does not provide a unified display. If you simultaneously use ChatGPT Codex, Grok, the official DeepSeek API, or Zhipu GLM, you need to repeatedly confirm “is it still available and how much is left” before starting a conversation, which breaks the flow. The following introduces the community plugin dsh-edu (Maintainer: yueyexiayu, Category: Web Tools), which displays the quota or balance corresponding to the current session model below the input box. Credentials are read only on the Host side via DSH credentials, and the browser only requests /api/dsh-edu; the response contains no keys.
What is this¶
dsh-edu is a plugin for the official DeepSeek Harness desktop (depends on connection.fetch). It displays the usage or balance corresponding to the current model route in the Composer dock area, does not store tokens separately, and does not display or request the official quota interface for unsupported providers. The project description states: it is currently deeply adapted for personal use as a reference for ideas; please do not copy it directly.
Directory Page: https://www.skillhub.cn/plugins/yueyexiayu/dsh-edu
Source Code: https://github.com/yueyexiayu/dsh-edu
Current package version: 0.1.2.
Supported Providers and Display Content¶
| Provider | Display Content |
|---|---|
| ChatGPT Codex | 5-hour / 7-day limits |
| Grok / SuperGrok | Weekly limits |
| Official DeepSeek API | Account balance |
| Zhipu GLM (bigmodel / z.ai) | Cash balance; hover to see active Token resource packs |
Note: The official deepseek-account login account balance is still provided by the official interface; the DeepSeek balance in this plugin targets API Key routing. The plugin does not read ~/.grok/auth.json / ~/.codex/auth.json.
Query and Display Logic (Summary)¶
The session model prioritizes the official modelSelection.next projection, followed by historically requested models; new sessions use the default model when there is no selection and no history. If the projection is unavailable or reading fails, it will explicitly report an error and will not mistakenly query unrelated default accounts. The client responds to model switching via the session slot’s useProjection and clears old readings.
Successful results are cached for 3 minutes based on the provider and actual credentials; changing accounts, logging out, renewing, or changing credentials will invalidate old results. Zhipu cash and resource packs are cached separately; if the resource pack query fails, the confirmed cash is retained, and “Resource pack query failed” is displayed inline, with the failed item retried after approximately 30 seconds. The foreground polling interval is 2 seconds (30 seconds for unsupported providers), pausing in the background; a single browser request has a 20-second timeout. Unknown usage will not be displayed as 0%, and illegal values will not be treated as zero.
Installation and Activation¶
The installation method comes from the repository README, not from commands like dsh plugin add.
-
Copy the plugin directory to
$DSH_HOME/plugins/dsh-edu(default$DSH_HOMEis~/.dsh). -
Write the following to
$DSH_HOME/profiles/desktop/cordis.patch.yml:
- insert:
- id: dsh-edu
name: ../../plugins/dsh-edu/lib/index.js
- Fully exit DeepSeek Harness (macOS: ⌘Q) and then reopen it. Simply refreshing the page will not fully reload the Host and Client plugins.
Credentials and Routing¶
Credentials follow the current model routing and are read via official llm metadata and settings.describe():
- GPT / Grok: Uses OAuth credentials from
llm-pi-ai/openai-codex/llm-pi-ai/xai; if the route explicitly specifies an API Key, limits for other OAuth accounts are not displayed. - Official DeepSeek API: The route’s
apiKeyEnv, defaulting toDEEPSEEK_API_KEY. - pi-ai DeepSeek and Zhipu routes: Uses explicit
apiKeyEnv, the API Key stored for that route, and native credential references (DEEPSEEK_API_KEY,ZAI_CODING_CN_API_KEY/ZAI_API_KEY) in order. If the explicit reference is missing, an error is displayed, and it will not switch to the default Key of other accounts. - Custom service addresses, overridden authentication headers, or old routes that cannot confirm credentials will display ownership errors and will not use the official account balance to impersonate the balance of that route.
Typical Usage¶
After installation and restarting the desktop, open any session in the official desktop: a reading corresponding to the current session model will appear below the input box. When switching models or routes, the reading should update following the projection; if the provider is not in the supported list, the area will not display, nor will it initiate quota requests.
Under Zhipu routes, hovering allows viewing active Token resource packs; if the resource pack query fails, the confirmed cash will still be displayed, along with a prompt that the resource pack query failed.
Development and local verification (does not read real credentials, does not call real quota interfaces):
for file in lib/*.js; do node --check "$file"; done
node --test
# or npm test
The README notes: The fix in 0.1.2 targets the public projection and session slot APIs of DSH 0.2.1-alpha.1; after the desktop updates, you still need to fully exit and reopen, and confirm the display on your own account.
Applicable Scenarios and Notes¶
Who it is for: Developers who use multiple models and routes in the DSH official desktop and want to see Codex / Grok limits or DeepSeek / Zhipu balances at a glance within the Composer.
Permissions and Security: The plugin runs with the permissions of the current DSH process. The Host side will read existing local credentials to query official interfaces. Before installation, you should read the GitHub Source Code and the license information in the repository yourself (if the license name is not listed separately in the materials, the repository prevails).
Ecosystem Note: The DeepSeek Harness community plugin directory (such as SkillHub) is an independent site with no official affiliation with DeepSeek / Highflyer; the installation steps in this article are based on the repository README.
Conclusion¶
dsh-edu consolidates GPT/Grok limits and DeepSeek, Zhipu balances below the input box and binds them to the session model projection, reducing the need to switch back and forth between the console and the Composer. For details or updates, please check the SkillHub Directory Page and the GitHub Repository.