Skip to content

fix(zcode): show personal gift plans for team seats - #371

Merged
yetone merged 1 commit into
magpie-community:mainfrom
location-txl:codex/fix-zcode-team-gifts
Oct 25, 2026
Merged

yetone merged 1 commit into
magpie-community:mainfrom
location-txl:codex/fix-zcode-team-gifts

Conversation

@location-txl

@location-txl location-txl commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Team-seat accounts do not show personal ZCode gift plans or their -Trial models.

Fix

Read personal gifts through the ZCode session and show them alongside the team allowance. Plain models use team quota; -Trial models use personal gift quota. Show a sign-in hint when the ZCode session is missing or expired.

Validation

  • 2462 tests pass with Bun 1.4.4; all plugin checks pass.
  • Verified model discovery and both allowances with a real BigModel team-seat account. A Flash Trial request returned HTTP 200 with OK.

Closes #359

@location-txl
location-txl force-pushed the codex/fix-zcode-team-gifts branch from 25485a6 to da8724b Compare October 24, 2026 16:17
Read a team member's personal ZCode gifts without consulting the personal coding subscription list, and merge their trial allowances into the team card. Keep plain models on the team plan and explain missing ZCode sessions.

Add regression coverage for team model discovery, usage, retry timing and request routing.

Closes: magpie-community#359
@location-txl
location-txl force-pushed the codex/fix-zcode-team-gifts branch from da8724b to 4778e0d Compare October 24, 2026 16:19
@yetone
yetone merged commit 935ddb5 into magpie-community:main Oct 25, 2026
yetone added a commit that referenced this pull request Oct 25, 2026
…a Start Plan refusal, and a minute after one list without its plan (#369, #379)

Also publishes #371 (a team seat lists the person's gift plans and their
-Trial models, 935ddb5), which landed without a version bump.

#369: a BigModel GLM Coding Plan account got the Start Plan's 405 for about
seven minutes on plain models, then recovered with nothing changed. A plain
model goes to the Start Plan only when plansOf says start, i.e. the key's
/api/biz/subscription/list read with no VALID plan, and that answer was
kept for ten minutes. Now:
- a key whose list reads no plan where the last read found one keeps that
  for a minute, not ten (read the same way again, it is known: ten);
- a Start Plan refusal (405 / 3012 / block page) on a key account that
  wasn't a -Trial pick drops the route, so the next request reads the
  plans again.
Not known: what the list answered during the reporter's window; this is
the one path in the plugin that sends a plan-holding key's plain model to
zcode.z.ai, and it matches the window's length.

#379: the card's numbers are read fresh on every usage call already; what
lagged was the route (which plan, which gift) for up to ten minutes. Each
usage read now reads the route again, so routing follows what the card
shows.

Run: packages/zcode, Bun 1.4.2, sandbox HOME and TMPDIR: 110 pass, 0 fail.
The three new dual.test.mjs cases are red on 0.1.27+935ddb5's index.mjs
(3 fail). bun scripts/check.mjs zcode ok. Loaded through magpie's plugin
host (origin/main 4dfd88206, scripts/try.sh, sandbox HOME): zcode listed
with 4 models.
Not tried: against a real account; no account was in the sandbox.
@location-txl
location-txl deleted the codex/fix-zcode-team-gifts branch October 25, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

zcode: a team seat lists no -Trial models and its card doesn't say why

2 participants