Repository navigation
fix(zcode): show personal gift plans for team seats - #371
Merged
yetone merged 1 commit intoOct 25, 2026
Merged
Conversation
location-txl
force-pushed
the
codex/fix-zcode-team-gifts
branch
from
October 24, 2026 16:17
25485a6 to
da8724b
Compare
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
force-pushed
the
codex/fix-zcode-team-gifts
branch
from
October 24, 2026 16:19
da8724b to
4778e0d
Compare
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Team-seat accounts do not show personal ZCode gift plans or their
-Trialmodels.Fix
Read personal gifts through the ZCode session and show them alongside the team allowance. Plain models use team quota;
-Trialmodels use personal gift quota. Show a sign-in hint when the ZCode session is missing or expired.Validation
OK.Closes #359