dsh-zcode-start
English · 简体中文
Use your Z.ai / ZCode Start Plan quota directly inside DeepSeek Harness — GLM models as a normal provider, plus plan claiming, quota refresh and sign-in, all from a settings page.
One-line description: Bring ZCode's Z.ai / Start Plan quota into DeepSeek Harness as a native GLM model provider, and manage the quota from DSH.
Features
| Area | What it does |
|---|---|
| Model provider | Registers zcode-start-plan with GLM-5.3-Flash and GLM-5.3 (1M context, 128k output), tool calling, streaming reasoning |
| Reasoning levels | off / low / high / max, sent as output_config.effort exactly like the official client |
| Settings page | Account and JWT status, quota progress bars, model capability table (from the API, not hard-coded), expandable request log, device-code sign-in / sign-out |
| Claimable plans | Manual check plus a 30-minute background probe that raises a corner card when a gift plan is available |
| Tools | zcode_quota, zcode_claim, zcode_reset, zcode_chat, zcode_login |
| Reliability | Automatic retry with exponential backoff (10 attempts, 5-minute budget) for rate limits, gateway errors and empty streams |
| Error reporting | 28 gateway business codes plus HTTP fallbacks, each mapped to a readable message and a retry decision |
| Privacy | Outbound scrubbing keeps harness identity out of the upstream prompt; credentials never leave the machine |
Requirements
- A DSH installation with a profile.
- The ZCode desktop client installed and signed in at least once. The plugin reads
its local credential store (
~/.zcode/v2/credentials.json) and the device id from~/.zcode/v2/telemetry-state.json. - An account holding an active Z.ai / Start Plan entitlement.
Install
dsh plugin add github:AkutagawaKoyori/dsh-zcode-start
With the plugin_manager tool:
{ "action": "install_bundle", "target": "github:AkutagawaKoyori/dsh-zcode-start" }
Local checkout:
{ "action": "install_bundle", "target": "/absolute/path/to/dsh-zcode-start" }
The repository declares dsh.bundle.patch in package.json with cordis.patch.yml
beside it, which is what makes dsh plugin add work. Then open Settings → ZCode in
the Web UI; restart the harness if the provider does not appear in the model list.
Usage
- Settings → ZCode shows the account, JWT status, quota bars and the request log.
- Pick
ZCode (Z.ai Start Plan)as the provider, thenGLM-5.3-FlashorGLM-5.3and a reasoning level. - Use Check claimable to look for gift plans; the background probe also notifies you.
Privacy
- Credentials are read from the local ZCode store on demand and are never written to this repository, to logs, or to commit history.
- The request log lives in
~/.dsh/zcode-plan-logs/and is redacted before writing: everyauthorization/x-api-key/*token*header or body field becomes***. - Outbound text is scrubbed (
DeepSeek Harness→ZCode, harness package and command names neutralised) before it reaches the gateway. - This plugin adds no telemetry.
Notes
identity.jsonholds the official ZCode system-prompt envelope the gateway expects; a missing or malformed envelope makes it answercode 3012. It contains no user data — only role text with placeholders filled at runtime.claimneeds a live activity;resetneeds a paid Coding Plan. Otherwise the gateway's own message is surfaced unchanged.- Quota buckets appear only after the server provisions a granted plan. Until then the settings page shows the granted total with "用量待统计".
License
MIT — see LICENSE.
No comments yet. Be the first to write one.