Preface¶
Developers who use DeepSeek, GPT (Codex), and Gemini simultaneously in DSH usually have to switch between multiple platform account pages to check their remaining quotas; with multiple accounts and different window rules, checking them one by one interrupts the workflow and makes it easy to miss a platform’s reset time. The existing practice is to keep multiple web pages open or rely on each platform’s own quota text.
dsh-quota-ring incorporates this action into the DSH Web UI: it displays a floating ring in the bottom right corner, and clicking it shows the quota status of the three accounts. The plugin is maintained by j352201657-debug, falls under the client category, and has a star rating of 1 in the community directory. Below is an introduction to its capabilities, installation methods, and configuration.
What is it¶
dsh-quota-ring is a DSH Web UI plugin that aggregates and displays the quota status of DeepSeek / GPT (Codex) / Gemini accounts. The current version is 3.1.1, the license is MIT, and the runtime requirements declared in package.json are Node.js >=18 and DSH >=0.2.0-rc.1 <0.3.0-0.
It solves a very focused problem: instead of replacing the query entry points of each platform, it provides a unified view within the DSH interface, making remaining quotas visible, rather than opening multiple windows.
Core Functionality¶
The ring itself only displays the “minimum remaining quota within known percentage windows,” i.e., the minimum amount each platform can currently determine; detailed information is only visible after clicking to expand.
The DeepSeek side displays balance, cumulative consumption, today’s consumption estimate, and peak/valley period tips. GPT (Codex) displays the rate window and reset time reported by the account. Gemini displays quota groups as returned by Antigravity; available groups and windows may vary with the account and upstream interface.
Three design constraints are worth noting:
- Queries for the three platforms are independent; if one platform fails, the others continue to display.
- Amounts and percentages are displayed separately; the plugin does not add different currencies together or perform currency conversion.
- Data not reported is not treated as zero quota or full quota, avoiding mistakenly displaying “not available” as “exhausted”.
The refresh strategy defaults to once every 10 minutes; the interface supports manual refresh. It reduces frequency on idleMultiplier when the window loses focus, pauses when the page is hidden, and there is a server-side cache layer used to merge concurrent quota queries.
Installation & Enablement¶
The plugin requires DSH with Web UI and webServer services, as well as Node.js 18 or higher. Installation is divided into two profiles.
The desktop version is installed via the plugin installation entry provided by the desktop application; the repository address is:
https://github.com/j352201657-debug/dsh-quota-ring
It is worth noting that desktop in the desktop application is a reserved profile managed by the desktop installer, and the ordinary standalone CLI does not accept installation commands for this profile.
The standalone Web version is executed in a terminal that provides the dsh command:
dsh plugin --profile web add https://github.com/j352201657-debug/dsh-quota-ring
Restart the corresponding DSH instance after installation.
Login and component requirements for the three platforms differ:
| Platform | Login and Component Requirements |
|---|---|
| DeepSeek | Log in within the built-in DeepSeek account component in DSH |
| GPT (Codex) | Install dsh-codex-subscription and log in to the subscription account |
| Gemini | Install dsh-agy-cli and complete Antigravity authorization |
Two additional dependency limitations: The original quota reading for Gemini relies on the Windows Credential Manager; other platforms use the AGY status interface as a fallback, which may lack some windows. Quota is only displayed when the corresponding platform has a valid login state.
When uninstalling, remove the plugin’s dependencies and registration entries in the corresponding profile, then restart DSH. The statistics state is located at dsh-quota-ring/usage-state.json under the DSH data directory and can be kept as needed.
Configuration¶
Configuration is written in the config field of the plugin’s registration entry in the corresponding profile. The fields provided by this plugin are as follows.
| Field | Default | Description |
|---|---|---|
refreshIntervalMs |
600000 |
Frontend refresh interval in milliseconds, minimum 5000 |
idleMultiplier |
3 |
Refresh interval multiplier when the window loses focus |
pauseWhenHidden |
false |
Whether to pause refresh when the page is hidden |
dshHome |
'' |
DSH data directory; leave empty to auto-detect |
dshWebPort |
0 |
AGY status interface port; 0 means inferred from request Host |
proxy |
'' |
HTTP or HTTPS proxy address; leave empty to auto-detect |
serverCacheTtlMs |
60000 |
Server-side cache duration in milliseconds; 0 disables cache |
requestTimeoutMs |
15000 |
Timeout for a single upstream request in milliseconds |
corsOrigins |
Loopback origins | Allowed cross-origin origins; additionally allows any port of the loopback host |
deepseekPeakWindows |
null |
UTC peak period list, e.g., [{start:1,end:4},{start:6,end:10}] |
deepseekPeakHolidays |
null |
UTC+8 holiday date list, e.g., ['2026-10-01'] |
Credentials directory is searched in the following order: config.dshHome; environment variables DSH_HOME, DSH_DATA_DIR; searching upward from the plugin installation directory; .dsh under the user home directory.
Proxy is detected in the order of configuration, HTTPS_PROXY / HTTP_PROXY / ALL_PROXY environment variables, and Windows system proxy; direct connection is used when no proxy is available; loopback requests are always direct. The server will merge concurrent quota queries; manual refresh bypasses the cache of completed results and reuses requests still in progress. After logging in or switching accounts, the next actual query will re-read credentials.
The default peak/valley windows for the interface are UTC 01:00–04:00, 06:00–10:00 (corresponding to Beijing time 09:00–12:00, 14:00–18:00), with weekends and the built-in 2026 holiday table participating in the calculation. Periods and holidays can be overridden via configuration.
HTTP API¶
The plugin exposes HTTP interfaces within the host. The route prefix is /api/quota-hub, and access must follow the host’s authentication and network access settings.
| Method | Path | Purpose |
|---|---|---|
| GET | /summary |
Query aggregated quota, supports cache |
| GET | /summary?force=1 |
Bypass cache of completed results |
| POST | /refresh |
Manual refresh |
| GET | /config |
Get configuration needed by the interface; proxy returns only configuration status |
| GET | /diag |
Query local diagnostic information, does not request upstream quota interfaces |
Quota results include providers, fetchedAt, and health. The status of platform entries is ok, missing_key, unavailable, or error. Details include windows, and Gemini may also include groups. DeepSeek is accompanied by peak and usage.
Detailed results for /diag are in the diag field, including credential file path, parsing status, plugin version, and handling suggestions. Diagnostic results may contain local paths and should be checked before sharing.
Typical Usage¶
After installing according to the installation steps and restarting DSH, enter the Web UI and you will see the ring in the bottom right corner. If a platform shows “Not logged in”, first confirm whether the login component for that platform has saved credentials, then manually refresh once.
For troubleshooting, refer to the official comparison table:
| Phenomenon | Check Item |
|---|---|
| Ring not displayed | Check the plugin’s installed profile, registration entry, and DSH startup logs |
| Shows “Not logged in” | Check the corresponding account login status and parsing results in /diag |
| Still shows old status after login | Manually refresh; check if the DSH login component has saved new credentials |
| Gemini data unavailable | Check AGY authorization, component enablement status, and DSH Web port |
| Gemini missing some windows | Check if using AGY status interface fallback |
| Query timeout | Check network and proxy configuration |
| Peak/valley tips do not match current rules | Update period and holiday configuration |
Setting the environment variable QH_DEBUG=1 enables server-side debug logging; check account information and local paths in the logs before publishing.
Developers who want to verify the implementation themselves can run the offline test; it uses a temporary directory and a local test server, does not read real login credentials, and does not request platform quota interfaces:
npm test
node --check client.js
node --check index.js
When a local account is needed to generate a preview, execute node preview/build-preview.cjs, then open the generated preview/preview.html. This command actually queries quotas and updates local consumption statistics; the preview page uses a static snapshot, and generated files should not be disclosed directly; de-identification cannot replace manual inspection.
The source code uses CommonJS, the client uses native DOM, and there is no build step. The division of responsibilities is as follows: index.js handles routing and host lifecycle, client.js handles the ring, cards, and refresh interactions, src/aggregator.js handles request merging, caching, and platform isolation, src/adapters/ contains platform request and response parsing, src/credentials.js and src/keyring.js read credentials, src/http.js handles HTTP, proxy, timeout, and response parsing, src/peak.js and src/usage.js handle period tips and consumption estimation.
Applicable Scenarios & Notes¶
Suitable for developers using DeepSeek, Codex, and Gemini simultaneously in DSH Web UI and wishing to keep fewer pages open. Its value lies in compressing the multi-platform remainder into a permanent view, rather than providing new billing or reconciliation capabilities.
Points to note before use:
- The plugin runs with the permissions of the current DSH process and can read credentials, data directories, and network egress accessible by that process. It is recommended to read the source code before installation and confirm that the MIT license meets your requirements.
- The DeepSeek, Codex, and Gemini interfaces listed in the text are not stable public protocols defined by this plugin; changes in upstream fields or authentication may cause query failures.
- Today’s consumption is estimated based on balance changes, not the official bill; peak/valley tips are also not used to calculate the official bill, and actual billing is subject to the rules and bills published by the platform.
- The original quota reading for Gemini relies on the Windows Credential Manager; other platforms use the AGY status interface as a fallback, which may lack some windows.
- The project has no telemetry reporting logic, and dynamic text in the interface is written using
textContent; however, when generating a preview, the quota snapshot is written to the local machine.
Conclusion¶
This plugin does a single thing: aggregates the quota status of DeepSeek, GPT (Codex), and Gemini into the floating ring in the bottom right corner of the DSH Web UI, while maintaining query isolation between platforms. For developers already running multi-model workflows in DSH, it saves the action of repeatedly switching back to each platform’s account page.
- Community Directory Page: https://www.skillhub.cn/plugins/j352201657-debug/dsh-quota-ring
- GitHub: https://github.com/j352201657-debug/dsh-quota-ring