dsh-zcode-persona
Manifest validMake the model believe it is inside the Z.ai Code (Zhipu ZCode) agent environment. DSH system-prompt waterfall plugin.
dsh-zcode-persona
Provisions a ZCode-identity GLM Coding Plan channel for DeepSeek Harness so the Zhipu gateway recognizes the DSH client as ZCode, activating the official limited-time perk: equivalent model calls deduct only 67% of quota (i.e. 1.5× usable quota). No prompt/persona changes (the server-side check only looks at request characteristics, not the system prompt).
Mechanism & evidence
Zhipu's docs (docs.bigmodel.cn → GLM Coding Plan → ZCode) state that GLM Coding Plan users signed in via ZCode enjoy an all-day 1.5× usage allowance (67% deduction). The check happens server-side on HTTP request characteristics. Field-level evidence for the identity headers:
- TriDefender/zcode-api:
src/proxy/identity.tsmirrors the ZCode bundle'spiofield-for-field (refreshed 2026-08-07); the README says "it's all about the 1.5x usage on frontier models"; - LINUX DO t/2531858: reusing ZCode request headers in another client, the perk applied.
After ready, this plugin idempotently writes one provider into the llm-pi-ai settings namespace via the ctx.settings seam (default key zai-coding-cn, pointing at the domestic endpoint https://open.bigmodel.cn/api/coding/paas/v4), with requests carrying the full ZCode identity header set: HTTP-Referer, X-ZCode-App-Version (default 3.11.2), X-Title: Z Code@cli, X-ZCode-Agent: glm, X-Platform, X-Release-Channel: production, X-Client-Language, X-Client-Timezone, X-Os-Category, X-Os-Version, X-Device-Mid (stable host-fingerprint-derived UUID). The write is a path-level mutate — only the provider key is added; existing providers (doubao, opencode-go, …) are never touched. The write passes through llm-pi-ai's own schema and serviceability validation; a refusal leaves existing routes untouched. pi-ai ships the zai-coding-cn catalog (thinkingFormat: zai wire compatibility is inherited); models missing from the catalog (glm-5.3, glm-5.3-flash) are declared with full specs.
Known boundary: DSH enforces product-attribution User-Agent (dsh-llm attributionHeaders); llm-pi-ai strips user-agent from profile headers and substitutes the harness UA. So User-Agent: ZCode/… cannot be delivered via configuration; every other ZCode-specific header passes through. Whether the gateway fingerprint accepts this needs a live check; if not, a local reverse proxy restoring the UA is required (not built into this plugin).
Configuration (reload the plugin after changing)
| Key | Default | Meaning |
|---|---|---|
codingPlan.enabled | true | Provisioning master switch. |
codingPlan.providerKey | zai-coding-cn | llm-pi-ai providers dict key (route id). |
codingPlan.apiKeyEnv | GLM_CODING_API_KEY | Env-var reference for the Coding Plan API key. |
codingPlan.displayName | GLM Coding Plan (ZCode) | Name shown in the model settings UI. |
codingPlan.appVersion | 3.11.2 | X-ZCode-App-Version; update to the real client after upgrading ZCode. |
codingPlan.sourceTitle | cli | X-Title: Z Code@{sourceTitle}. |
codingPlan.deviceMid | '' | X-Device-Mid; empty derives a stable host-fingerprint UUID. |
codingPlan.baseURL | https://open.bigmodel.cn/api/coding/paas/v4 | Domestic Zhipu Coding Plan OpenAI-compatible endpoint. |
codingPlan.models | DEFAULT_MODELS in source | Model list served by this route (replaces the catalog). |
Usage & verification
⚠️ If the plan is currently at its 5-hour cycle quota limit, wait for the cycle to reset before firing observable billing requests (official: quota refreshes 5 hours after consumption).
- After provisioning, pick
glm-5.3/glm-5.2etc. under theGLM Coding Plan (ZCode)provider in Settings → Models; - Set the env var
GLM_CODING_API_KEY=<your Coding Plan API key>(generated on the Zhipu open platform Coding Plan page; requires an active GLM Coding Plan / bigmodel subscription); - After the quota resets, fire some real requests and check usage: quota should be deducted at 67% (equivalent 1.5×). If it deducts at 100%, the gateway fingerprint checks more than these headers (e.g. User-Agent), and a local reverse proxy restoring the full UA is required.
⚠️ Zhipu enforces risk controls on plan usage (shared accounts and abnormal clients may trigger verification, throttling, or bans — see LINUX DO discussions). Personal use, low concurrency, and a genuine Coding Plan subscription are the baseline.
Compliance
Intended for behavior customization of your own subscription, research, and testing. Impersonating ZCode or any other brand to serve others or to bypass upstream service restrictions is at your own risk; please honor Zhipu's terms of service.
Build
DSH_CHECKOUT=<checkout> bash scripts/build.sh
Comments
Loading…
Similar plugins
by MichaelShii
dsh plugin teamflow
★ 9
↓ 1.1k/wk
MIT
TypeScript
Sep 29, 2026
dsh plugin --profile web add dsh-plugin-teamflowby R-LEI2536
More Agent Presets for DSH derived from other coding agents (e.g. qwen code, iflow)
★ 3
MIT
JavaScript
Sep 12, 2026
dsh plugin --profile web add dsh-more-agent-presetsby x5427876
Use OpenCode Zen free models in DeepSeek Harness with anonymous access or an optional API key
★ 0
MIT
TypeScript
Sep 28, 2026
dsh plugin --profile web add dsh-opencode-freeby ZSeven-W
DeepSeek Harness (DSH) plugin: dispatch work to DSH agents from Claude Code / Codex — native subagent progress, in-host worker sessions with per-tier presets, and a multimodal bridge that lends the te
★ 153
MIT
JavaScript
Sep 24, 2026
dsh plugin --profile web add @zseven-w/dsh-crewby BaronCyrus
DeepSeek Harness 联盟模式:自由组合 DSH、Claude Code、Codex 与全部已配置模型,保留原生 Agent 生命周期与实时执行过程。
★ 3
MIT
JavaScript
Aug 24, 2026
dsh plugin --profile web add dsh-allyby openma-ai
Bridge your pi extension, codex plugin or claude code plugin to dsh (DeepSeek Harness)
★ 3
↓ 167/wk
MIT
TypeScript
Aug 25, 2026
dsh plugin --profile web add @openma/dsh-agents-plugins-bridge