zcode 0.1.27: the Start Plan's 405 code 3012 says ZCode's risk control blocked the account, not a network block (#348)

zcode.z.ai answers {"code":3012,"msg":"request has been blocked due to
unusual activity."} with 405. Since 10-24 many accounts get it on every
request, and on several of them ZCode's own app (3.16.3) gets the same 405;
ZCode's support bot calls 3012 platform risk control on the account. The
plugin used to put "though magpie sends it as the ZCode app does; it can
be a network block of this IP" after it, and read that JSON as the edge
firewall's page (EDGE_BLOCKED matched "request has been blocked"), so
ZCode's own words and code were dropped.

Now: ZCode's words with the status and code, then provider
ZCodeRestrictedHint word for word ("ZCode's risk control blocked this
account for unusual activity (code 3012); it rests, and the group's other
providers are used. ..."), which magpie's gateway reads as the account
restricted (2h rest, next member asked) from the next magpie release on.
Only an HTML / errors.aliyun.com block page says the network's address
(provider.BlockedHint's words).

Compared with ZCode 3.16.3's glm/zcode.cjs (downloaded from
cdn-zcode.z.ai, the latest on zcode.z.ai): the Start Plan is sent
unsigned there too (requiresClientRequestSigning is false for
zhipu-account start-plan, off-peak and highspeed; X-Client-Sig/Pow apply
to coding-plan keys on the paas origin), and the headers plugins#348's
curl shows are the plugin's set. No request difference was found that
explains 3012; not tried against a real blocked account.

Run: packages/zcode, Bun 1.4.2, sandbox HOME: 102 pass, 0 fail. The new
start.test.mjs case is red on 0.1.26's index.mjs (1 fail, the 3012
message). bun scripts/check.mjs ok.
This commit is contained in:
yetone
2026-10-24 23:28:48 +08:00
parent c9a0215f31
commit 28f9cbb3b2
4 changed files with 62 additions and 36 deletions
+8 -6
View File
@@ -25,12 +25,14 @@ over Anthropic's Messages API. Provider id: `zcode`.
agent's system prompt at the end of the third (a fourth block is
refused, #343), the day in a `<system-reminder>` turn before the agent's
turns, and the sign-in's device id in `metadata.user_id`. GLM Coding
Plan and team requests go as the agent sent them. One it still turns
away (a 405, the block page or code 3012) comes back with what to do
about it, as magpie's built-in said: "ZCode's Start Plan still turned
this request away, though magpie sends it as the ZCode app does; …
Use an account with a GLM Coding Plan, or add another provider to this
group".
Plan and team requests go as the agent sent them. zcode.z.ai also
answers 405 code 3012 to every request of an account its risk control
blocked, ZCode's own app's included (plugins#348). That answer comes
back as ZCode's words, then "ZCode's risk control blocked this account
for unusual activity (code 3012); …", which magpie reads as the account
restricted: it rests, and the group's other providers are used. Only
ZCode support lifts such a block. A block page from ZCode's edge
firewall says this network's address was blocked instead.
- The Start Plan's token can't be refreshed. When it runs out, sign in
again.
- **ZCode: a team's GLM Coding Plan**