Files
plugins/packages/zcode/package.json
T
yetone c96d04bb6b zcode 0.1.51: a gift-only account lists only the models its balance names (young02036)
young02036 on Discord: two ZCode accounts in magpie, one with no GLM
Coding Plan whose Start Plan holds glm-5.3-flash, one subscribed whose
gift shows as GLM-5.3-Flash-Trial. Picking per account the models each
can use worked; left to the plugin's lists, requests failed while the
ZCode app on the same accounts worked.

A gift-only account listed every model the Start Plan's provider config
names (GLM-5.3-Flash, GLM-5.2, GLM-5-Turbo), whatever its balance held,
so magpie's routing took it to serve models it has no bucket for. ZCode
3.17.2 offers such an account the balance's models alone
(resolveStartPlanBalanceAvailability / resolveZaiStartPlanBalanceModelIds).
The models hook now keeps, for a gift-only account, the config models
its balance names (plus the gift names the config lacks and the -Trial
entries, as before). A balance naming no model, or one that can't be
read, leaves the config's list as it was. Coding plan accounts are
unchanged.

Run (mote, bun 1.4.2, isolated HOME): bun test packages/zcode, 200 pass;
bun scripts/check.mjs zcode ok. The new gift.test.mjs case was red on the
old code (GLM-5-Turbo and GLM-5.2 listed) and green after.
Not tried: a real ZCode account (none available); whether the reported
3012 came from such a request is not proven.
2026-11-05 11:30:10 +08:00

21 lines
783 B
JSON

{
"name": "@magpie-community/opencode-zcode-auth",
"version": "0.1.51",
"description": "OpenCode provider plugin: signs in to Z.ai's or BigModel's (智谱) GLM Coding Plan as ZCode does, including team seats and ZCode's Start Plan, and claims its gift plans daily",
"type": "module",
"main": "./opencode.mjs",
"exports": { ".": "./opencode2.mjs" },
"files": ["index.mjs", "opencode.mjs", "opencode2.mjs", "prompt.mjs", "README.md"],
"keywords": ["opencode", "opencode-plugin", "magpie", "zcode", "z.ai", "bigmodel", "glm", "coding-plan"],
"license": "MIT",
"repository": {
"type": "git",
"url": "git+https://github.com/magpie-community/plugins.git",
"directory": "packages/zcode"
},
"magpie": {
"maxConcurrency": 3,
"maxAccounts": 2
}
}