Preface¶
When using DeepSeek Harness (DSH) Web GUI to run Zhipu GLM (bigmodel.cn) Coding Plan, the context usage ring can reflect the current session, but checking whether the hourly quota or weekly quota is nearly exhausted usually requires opening a separate browser to visit the bigmodel.cn usage page. Frequently switching windows disrupts your workflow, and it is easy to notice only after the quota has already been reached.
Below is an introduction to the community plugin dsh-plugin-glm-balance (maintainer: HoodyHuo, category: Online Tools): it mounts a GLM plan quota bar near the context usage indicator beside the composer input box, and centrally configures authorization and auto-refresh in the settings. The facts in this article are all sourced from the GitHub repository README and package.json (current version 0.2.0, MIT license).
What Is This¶
dsh-plugin-glm-balance is a plugin for the DSH Web platform, designed for querying and displaying plan quotas on bigmodel.cn. The plugin accesses GET https://bigmodel.cn/api/monitor/usage/quota/limit via the host’s proxied same-origin route, avoiding browser CORS issues. The quota widget only displays when the current session’s model provider ID matches the configured one (default: zai-coding-cn).
- Directory page: https://www.skillhub.cn/plugins/HoodyHuo/dsh-plugin-glm-balance
- Source code: https://github.com/HoodyHuo/dsh-plugin-glm-balance
Core Features¶
Quota Display¶
- Two mini progress bars: corresponding to the hourly quota (
unitas3) and weekly quota (unitas6) under the API-measured mapping, displaying the percentage and next reset time. - The styling uses the harness’s
--dsw-*theme tokens and can adapt to light/dark modes and third-party themes (the README uses Dracula as an example).
Refresh and Interaction¶
- Automatic polling at a configurable interval (default: 30 minutes); click the widget to refresh immediately, and a loading animation is shown while the request is in progress.
- Right-click menu: open the bigmodel.cn usage page, or perform a refresh; clicking elsewhere closes the menu.
Authentication and Status¶
- States such as unconfigured token, authentication failure, and upstream request failure are distinguished with different prompts on the interface; clicking when authentication fails shows repair instructions.
- A separate section GLM Balance in the settings page (Settings → GLM Balance): fill in
authorization, provider ID (providerId), and auto-refresh interval (refreshMinutes).
Installation and Activation¶
The plugin is installed via dsh plugin --profile web add. After installation, you need to restart dsh web so that the host can semi-register the proxied routes (GET/POST /glm-balance/api/config, GET /glm-balance/api/usage).
Install from the plugin name (one of the methods provided in the README):
dsh plugin --profile web add dsh-plugin-glm-balance
Or install directly from GitHub (no npm release needed):
dsh plugin --profile web add https://github.com/HoodyHuo/dsh-plugin-glm-balance.git
Install from a local source code path (the example uses a Windows path; replace with the actual directory):
dsh plugin --profile web add E:\path\to\dsh-plugin-glm-balance
For updates, if you maintain the plugin via a cloned directory, you can run git pull in that directory and then re-execute the GitHub installation command; after that, restart dsh web as well. The update does not modify the saved token file ~/.dsh/glm-balance.json. Changes in each version can be found in the CHANGELOG.md within the repository.
Typical Usage: Configuring Authorization¶
The authorization value is the content of the same-named field in the bigmodel.cn request headers. The README recommends copying it from the network request headers in the browser’s developer tools.
Method 1: Settings Page¶
Open DSH Web → Settings → GLM Balance, paste the authorization, confirm the provider ID (default: zai-coding-cn), and set the auto-refresh minutes. No service restart is required after modification; it takes effect on the next poll or upon clicking refresh.
Method 2: Editing the Configuration File¶
Credentials and options are written by default to glm-balance.json in the harness home directory (default path: ~/.dsh/glm-balance.json):
{
"authorization": "the authorization value from bigmodel.cn request headers",
"providerId": "zai-coding-cn",
"refreshMinutes": 30
}
After completing the configuration, set the current session’s model provider in the Web GUI to match providerId (default is zai-coding-cn). The quota bar should appear beside the input box; if it shows unconfigured or authentication failure, follow the interface prompts to check whether the authorization is still valid.
Use Cases and Notes¶
Who it is for: Users who long-term use Zhipu GLM Coding Plan in DSH Web and need to arrange sessions against hourly/weekly quotas; scenarios where you want to view quota information alongside the composer context usage on the same screen and reduce the need to repeatedly open bigmodel.cn.
Runtime and trust boundary: The plugin runs inside the DSH process, and the token is stored in plaintext in the harness home directory, within the same trust domain as other harness configurations. Before installation, it is recommended to review the GitHub source code and the MIT license yourself to confirm that the proxy routes and storage method are acceptable.
Display conditions: The quota widget does not display for arbitrary providers; it is only mounted when the current session’s provider matches the configured providerId, avoiding unnecessary requests in sessions using irrelevant models.
Conclusion¶
dsh-plugin-glm-balance brings bigmodel.cn’s hourly/weekly plan quotas to the side of the DSH Web input box: configurable polling, click and right-click refresh, and credentials maintained in the GLM Balance settings section or ~/.dsh/glm-balance.json. If you are already using Zhipu GLM Coding Plan fixedly in the harness, you can install it via the commands above, restart dsh web, and configure authorization to try it out.
- SkillHub directory: https://www.skillhub.cn/plugins/HoodyHuo/dsh-plugin-glm-balance
- GitHub: https://github.com/HoodyHuo/dsh-plugin-glm-balance