Repository navigation
[Feature request]: support the free Start Plan "ZCode Trust Build" (GLM-5.3-Flash) #6673
Description
Area
Provider adapters
What are you trying to accomplish?
I use ZCode (the Z.ai coding agent) and OpenCodex on the same machine. ZCode has two separate plans (endpoints/models):
- the paid Z.ai "GLM Coding" plan
- the free Start Plan "ZCode Trust Build", which almost always includes free quota for the GLM-5.3-Flash model
The outcome I need: be able to route OpenCodex requests to that free plan too, so I always have a free model available to finish projects when all my other providers are out of quota.
What prevents this today?
OpenCodex currently has no way to connect to the free "ZCode Trust Build" plan — only paid providers can be configured. The free GLM-5.3-Flash quota granted on that plan is therefore unusable from OpenCodex.
The only workaround is leaving OpenCodex and using the ZCode app directly, which means I lose the ability to use it from other harnesses like Codex and Claude Code.
What should OpenCodex do?
Treat the free "ZCode Trust Build" plan as a regular provider:
- I can log in to it from OpenCodex (OAuth or whatever auth ZCode uses for the free plan);
- GLM-5.3-Flash (and any other models the plan exposes) shows up in the model catalog and the dashboard;
- I can route prompts to it directly and/or use it as a fallback in combo routing when other providers return quota/rate-limit errors.
Observable result: when the paid plan's quota is exhausted, I can switch the provider/model to the free Z.AI plan and requests keep working instead of failing with 429 errors on the main paid plan. Even better: OpenCodex could do this automatically via combo fallback, without manual intervention.
Example usage or interface
CLI sketch (illustrative — exact names don't matter):
ocx login zai-trust-build # one-time login to the free plan
ocx provider list # shows zai-trust-build / glm-5.3-flash with free-quota info
ocx combo set --fallback zai-trust-build/glm-5.3-flash
Or a config fragment:
{
"providers": {
"zai-trust-build": { "plan": "trust-build", "models": ["glm-5.3-flash"] }
}
}Before: paid providers exhausted → request fails, free quota sits unused.
After: same failure → OpenCodex falls back to glm-5.3-flash on the free plan, the turn completes.
Alternatives or workarounds
No response
Additional context
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
Activity
[-]Feature request: support the free "ZCode Trust Build" plan (GLM-5.3-Flash)[/-][+]Feature request: support the free Start Plan "ZCode Trust Build" plan (GLM-5.3-Flash)[/+][-]Feature request: support the free Start Plan "ZCode Trust Build" plan (GLM-5.3-Flash)[/-][+]Feature request: support the free Start Plan "ZCode Trust Build" (GLM-5.3-Flash)[/+][-]Feature request: support the free Start Plan "ZCode Trust Build" (GLM-5.3-Flash)[/-][+][Feature request]: support the free Start Plan "ZCode Trust Build" (GLM-5.3-Flash)[/+]chelaxian commentedon Oct 6, 2026
I did a deep dive into how ZCode's two plans work under the hood — here are the technical details that should make this feature implementable.
How the plans actually differ
A "plan" is not a model property — it's a specific backend + auth chain. The ZCode client's built-in provider config ships these:
https://api.z.ai/api/anthropichttps://zcode.z.ai/api/v1/zcode-plan/anthropichttps://zcode.z.ai/api/v1/off-peak/anthropicx-off-peak-ticket-idThere is also an OpenAI-compatible surface for the free plan at
https://zcode.z.ai/api/v1/zcode-plan.This also explains the "switching the model to GLM-5.3-Flash doesn't help" part: the request still goes to the paid
api.z.aibackend and burns coding-plan quota. The free quota is only reachable through thezcode.z.aibackend, with app-level auth.Why the free endpoint is not a normal API
Verified empirically (raw JWT, OAuth token and API key all → 401) and by inspecting the ZCode client bundle (
resources/glm/zcode.cjs, visible in any ZCode install):chat.z.ai(public client idclient_P8X5CMWmlaRO9gyO-KSqtg); the client keeps JWT access tokens.zcode.z.aimust be signed by the client: headersX-Client-Ts,X-Client-Version,X-Client-Sig,X-Client-Nonce,X-Client-Pow(proof-of-work),X-App-Id,X-Session-Id, established via a server signing handshake. Client-side error codes:VERIFY_SIGNATURE_INVALID,VERIFY_APIKEY_EXPIRED.X-Aliyun-Captcha-Verify-Param.coding_plan_not_entitledas a status).So the actual gap: there is no public API key for the free plan — access is deliberately locked to the official client.
Reference implementations (working code)
app/agent.pycaptcha_node/solver.js+ orchestration/caching inapp/captcha.pyapp/oauth.py; quota probing:app/quota.py; design notes:docs/ARCHITECTURE.mdhttps://api.z.ai/api/anthropicwith a regular API key.What I'd suggest for OpenCodex
base_url = http://localhost:3000, modelglm-5.3-flash). That alone unlocks free-quota fallback via combo routing. A built-in preset/alias for it would be a nice touch.zcodeaccount provider implementing thezcode.z.aichain (OAuth login → request signing → captcha), using zcode2api as the protocol reference. It's admittedly fragile (Aliyun fingerprint changes break solvers) and ToS-gray, so opt-in with a clear warning would make sense.Happy to help test if you take this on.
Ingwannu commentedon Oct 7, 2026
Thanks for separating the paid API lane from the reported app-entitlement/authentication lane. The client-bundle observations and third-party gateway are compatibility leads, not evidence of a supported third-party API or authorization to reproduce client signing/captcha behavior. I have not tested those implementations or the free-plan entitlement, and this triage does not endorse a gateway or guarantee free quota.
Before a built-in preset/native login can be considered, please provide primary Z.AI documentation or written confirmation for third-party access, the intended authentication flow and model discovery, relevant terms/operating entity, and a maintenance owner/verification date. The canonical-preset evidence requirements in MAINTAINERS.md still apply. A generic user-managed custom endpoint is a separate interoperability surface; adding a named built-in alias would itself advertise a supported destination. @lidge-jun an owner decision on that support boundary is needed before implementing either native auth or a promoted preset. No login, signing handshake, captcha automation or provider call was attempted.
lidge-jun commentedon Oct 9, 2026
Closing as not planned. ZCode free/Start Plan login falls under the same policy as #4647 (no first-party-app plan reuse or captcha solving).