Introduction¶
After integrating Z.AI as a model provider in DeepSeek Harness (DSH), checking the usage and remaining quota for the Coding Plan typically requires opening a separate page or checking the console. When developing or debugging agents, if you just want to confirm “how much quota the current key has left,” switching interfaces breaks the flow.
dsh-zai-usage is a community-maintained DSH client plugin that embeds the Z.AI coding-plan quota panel into the Harness sidebar. It aligns with the same credential resolution path used when you configure Z.AI in Harness, so there is no need to write separate configuration items for the plugin.
What is this¶
- Repository: bosenok/dsh-zai-usage
- Maintainer: bosenok
- Category: Client (
dsh.client.platform: web, frontend provided bylib/client.js) - Positioning: Z.AI coding-plan quota panel in the DSH sidebar (from the README)
The plugin is packaged as a DSH bundle: package.json declares dsh.bundle.patch, and cordis.patch.yml inserts the zai-usage line into the current profile. The host side resolves the key via the Harness credential service; the browser side only renders the quota snapshot and does not touch the plaintext key.
Runtime Environment (from package.json): dsh version must satisfy >=0.2.1-rc.2 <0.3.0.
Core Features¶
The following introduces the capabilities explicitly described in the materials.
- Sidebar Quota Panel: Displays views related to Z.AI coding-plan quotas in the DSH sidebar (specific charts and fields are implemented by the client; the build chain uses Vue 3 and ECharts, see the repository’s
devDependencies). - Shared Credentials with Z.AI Provider: The host declares
inject: ['credentials']and resolves viactx.credentials.resolve('ZAI_API_KEY'), which is consistent with the canonical seam used by the Z.AI provider; there are no plugin-specific configuration fields. - Local Snapshots and Troubleshooting: The quota snapshot is written to
~/.dsh/usage/zai-usage.json; if no key is configured, the panel promptsZAI_API_KEY is not set in the credential store, and thedebugfield in the snapshot reflects the resolution status (e.g.,{"credsService":"ok","resolve":"value(49) source=file"}).
Installation and Activation¶
The plugin is indexed by the community directory entry skillhub.cn/plugins/bosenok/dsh-zai-usage; installation commands follow the GitHub README.
Desktop App: Open Plugins, install github:bosenok/dsh-zai-usage (if the repository is private, ensure your machine has git access permissions first), then enable the bundle.
CLI (specifying a profile):
dsh plugin --profile <profile> add github:bosenok/dsh-zai-usage
Local Directory:
dsh plugin --profile <profile> add file:/path/to/dsh-zai-usage
After enabling the bundle, the plugin mounts to Harness; Hot Module Replacement (HMR) can apply to the running application, and a restart ensures the client half is rebuilt.
Desktop Profile Note: The README explains that under the application-managed desktop profile, dsh plugin --profile desktop add only installs dependencies and copies the package; it does not automatically enable the bundle like a normal profile. You need to add the package name to dsh.profile.bundles in ~/.dsh/profiles/desktop/package.json, or enable it on the Plugins page.
Where the Key Comes From¶
There is no need to fill in an API key separately for dsh-zai-usage. The resolution order is consistent with the Harness credential service, and common sources include:
- The credential store written when configuring the Z.AI provider (
~/.dsh/.credentials.yaml→refs) - Environment layers:
~/.dsh/.env, inherited environment variables, project root.env
When the key is missing, the sidebar displays the English prompt mentioned above; you can combine the debug information in ~/.dsh/usage/zai-usage.json to determine the credsService and resolve status.
Typical Usage¶
- Configure the Z.AI provider in Harness following the existing process, ensuring
ZAI_API_KEYcan be resolved by the credential service. - Install and enable the
dsh-zai-usagebundle using the commands in the previous section. - Open the quota panel in the DSH sidebar to view the current coding-plan quota snapshot; if abnormal, first check the credentials and environment variables, then look at the
debugfield inzai-usage.json.
The repository does not provide additional CLI subcommands; the interaction entry point is in the desktop/Web client sidebar.
Scenarios and Notes¶
Suitable for: Developers who are already using Z.AI Coding Plan in DSH and want to quickly view quotas within the same interface, reducing jumps to the console.
Permissions and Security: The plugin runs under the permissions of the current dsh process and can access the credential service and usage snapshots under local ~/.dsh. It is recommended to read the source code and the MIT License before installation. Third-party packaged code can be found in THIRD_PARTY_NOTICES.md.
The community plugin directory (SkillHub) has no official affiliation with DeepSeek / High-Flyer and is not equivalent to an official app store.
Conclusion¶
dsh-zai-usage brings Z.AI coding-plan quotas into the DSH sidebar and shares the ZAI_API_KEY resolution path with the Z.AI provider. For installation instructions and implementation details, please refer to the directory page https://www.skillhub.cn/plugins/bosenok/dsh-zai-usage and the GitHub repository https://github.com/bosenok/dsh-zai-usage.