zcode 0.1.43: a block page holds zcode.z.ai off three minutes, for every account (#649, frank6com)
frank6com's 405 ("the provider's network firewall blocked requests from
this IP") is Aliyun's edge firewall in front of zcode.z.ai answering
POST /api/v1/zcode-plan/anthropic/v1/messages (the Start Plan) with its
405 HTML page. It is the address, not the method nor the account: ZCode's
own app got the same 405. Two Start Plan accounts and three sessions with
subagents (up to 6 requests at once from one IP), and every request after
the block went on knocking on the firewall, from both accounts, since the
gateway falls back but rests nothing for an edge block.
Now a block page sets a process-wide hold (edge.until, EDGE_HOLD three
minutes): while it lasts, a Start Plan request and a picked -Trial entry
are answered here with the same 405, permission_error and
provider.BlockedHint word for word, plus until when, so magpie's
EdgeBlocked and retryable still send the request to the group's next
provider. Free first leaves the gift and keeps a dual account on its
coding plan (api.z.ai, another host). A 3012 or a bare 405 is the
account's and holds nothing. The first request after the hold asks again.
Run, at this head, on mote:
- packages/zcode: bun test, 189 pass, 0 fail.
- bun scripts/check.mjs zcode: ok.
- Broken by hand: without the line that sets the hold, both new tests
are red (65 pass, 2 fail in start + dual); without !edgeHeld() in free
first, the dual test is red (66 pass, 1 fail).
Not tried: a real zcode.z.ai request. Reproducing needs the address
blocked, and asking until it is would block the owner's network. The page
the tests use is the one plugins#425 recorded.
This commit is contained in:
@@ -38,7 +38,14 @@ over Anthropic's Messages API. Provider id: `zcode`.
|
||||
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.
|
||||
firewall says this network's address was blocked instead. Since 0.1.43
|
||||
(plugins#649) such a page also holds zcode.z.ai off for three minutes,
|
||||
for every account of the plugin, since they share the address: the
|
||||
Start Plan and a picked `-Trial` entry are answered at once with the
|
||||
same 405 and words, so magpie still uses the group's other providers,
|
||||
and free first keeps a dual account on its coding plan. The first
|
||||
request after the three minutes asks again. A GLM Coding Plan key, on
|
||||
api.z.ai, is never held.
|
||||
- The Start Plan's token can't be refreshed. When it runs out, sign in
|
||||
again.
|
||||
- Every request, on any plan, names its conversation in `x-session-id`,
|
||||
|
||||
Reference in New Issue
Block a user