Introduction¶
When using MiniMax token packages in DSH web, there is a common inconvenience: the current quota usage within the 5h window is not visible on the interface. To confirm it, one must open a separate upstream page to query and then switch back to arrange task rhythms.
mmx-quota-tool brings this number into the conversation input area: a drop-shaped icon plus the 5h usage percentage, which opens a detail panel upon clicking. Below is an introduction to its features, installation steps, and precautions.
What is it¶
mmx-quota-tool is a plugin for DSH web, maintained by mtty-ai. The README’s one-sentence positioning is:
MiniMax token-plan quota dock for DSH web — drop-shape 5h usage %, click for detail panel, auto-hides for non-MiniMax models.
It is essentially a quota dock attached to the conversation input area: displays the 5h usage percentage, opens a detail panel on click, and automatically hides when the current model is not MiniMax. Current version 0.1.0, license is MIT.
Core Features¶
-
Dock persistence. Mount point is
conversation.input.left, next to the model selector. The drop-shaped icon fills according to the 5h usage percentage (the lower the bar, the healthier the usage). -
Color grading:
< 50%Green,< 80%Yellow,≥ 80%Red. -
Detail panel. Click icon to expand, listing 5h and weekly usage, reset countdown, and absolute values for each model.
-
Auto-hide. Hides the entire dock when the active default model is not MiniMax. Matching rules are provider name
minimax / minimax-cn / minimax-global / MiniMax*, or model name prefixMiniMax- / minimax-. -
Interaction details. Shift+click forces immediate refresh to upstream; close panel when mouse leaves dock or panel.
-
Interface language follows DSH. Model name labels support both zh / en sets of copy (e.g., zh: 通用 / 视频 / 图像 / 音频 / 语音 / 音乐 / 视觉 / 向量 / 实时 / 长文本), default is zh; the dock still renders normally if the language service is unavailable.
How it Works¶
The plugin is split into two halves: Host and Client:
| Part | File | Responsibility |
|---|---|---|
| Host | src/index.js |
60s upstream polling + register two HTTP routes |
| Client | client/client.js |
5s polling host + mount dock UI at conversation.input.left |
The Host registers two routes on the profile’s webServer:
GET /api/mmx-quota-tool/quota # current snapshot
POST /api/mmx-quota-tool/refresh # force refresh
The quota interface returns an object containing rows, lastFetchedAt, lastError, lastStatus, model, isMmx, refreshIntervalMs.
The Client polls the host’s quota interface every 5 seconds; when isMmx === false, it renders null—so after switching to a non-MiniMax model, the dock will disappear within 5 seconds. The actual upstream fetch rhythm is controlled by MMX_REFRESH_MS.
Installation and Usage¶
Official installation command:
dsh plugin --profile web add github:mtty-ai/mmx-quota-tool
Restart dsh web once installation is complete.
For development scenarios, manual installation is also possible. First, copy the repository into the profile’s node_modules:
git clone https://github.com/mtty-ai/mmx-quota-tool
cd mmx-quota-tool
cp -R . ~/.dsh/profiles/web/node_modules/mmx-quota-tool/
Then add a line to register the plugin in ~/.dsh/profiles/web/cordis.patch.yml:
- insert:
- id: mmx-quota-tool
name: mmx-quota-tool
Configuration¶
The plugin must provide a MiniMax API key. Export it before starting dsh web:
export MMX_API_KEY='sk-cp-your-key-here'
dsh web
You can also write the export into ~/.zshrc or ~/.bashrc.
Optional environment variables are as follows:
| Variable | Default Value | Purpose |
|---|---|---|
MMX_API_KEY |
Required | Used for MiniMax Bearer + x-api-key |
MMX_REGION |
cn |
cn corresponds to api.minimaxi.com, global corresponds to api.minimax.io |
MMX_REFRESH_MS |
60000 |
Host polling interval to upstream |
MMX_POLL_INTERVAL_MS |
5000 |
Client bundle fetch interval |
Environment requirements: Node.js >= 20, peerDependency is @deepseek-ai/cordis ^4.0.1.
Typical Usage¶
-
Daily observation: After entering a session, check the percentage and color next to the model selector. A yellow light indicates 5h usage has exceeded 50%, and a red light indicates it has reached above 80%.
-
View details: Click the icon, the panel lists 5h and weekly usage, reset countdown, and absolute values model by model; close by moving the mouse away.
-
When data is in doubt: Shift+click the icon to force a refresh upstream immediately, without waiting for the 60s polling cycle.
-
Dual-region users: Accounts in the
cnregion don’t need to change anything; those using theglobalregion need to setMMX_REGION=globaland restartdsh web. -
Switching interface language: The dock labels, panel titles, and footer hints will switch along with DSH’s zh / en interface language, requiring no separate configuration.
Use Cases and Notes¶
Suitable for developers who have bound a MiniMax token package in DSH web and want to grasp the 5h and weekly usage at any time. Even if the plugin is installed, it will automatically hide on non-MiniMax models and not occupy the interface.
A few notes:
-
MMX_API_KEYis required; without it, quota data cannot be obtained; this key is used to request upstream in the form of MiniMax Bearer + x-api-key. -
The plugin runs with the permissions of the current dsh process and can read the environment variables you configured. It is recommended to review the repository source code and license (MIT) before installing to confirm it is acceptable.
-
Data has two layers of latency: host defaults to 60s to upstream, client defaults to 5s to host. To be more timely, Shift+click to manually refresh, or lower
MMX_REFRESH_MS.
Conclusion¶
mmx-quota-tool focuses on a specific task: changing the MiniMax token quota from “check in another open page” to a persistent icon in the conversation, combined with color grading and forced refresh, so quota management does not require leaving the current workflow.
- GitHub repository: https://github.com/mtty-ai/mmx-quota-tool
- Community plugin directory page: https://www.skillhub.cn/plugins/mtty-ai/mmx-quota-tool
The community directory is an independent site and has no official affiliation with DeepSeek or Hypothesis; information is based on the repository README.