zcode 0.1.10: a gift-only account's spent bucket doesn't hold up a model another of its plans still has (ganlerk on Discord) — an account with both ZCode Trust Build (GLM-5.3-Flash 14.5% used) and the Start Plan (GLM-5.3-Flash all used) showed the Start Plan's spent bucket as counting GLM-5.3-Flash, so magpie read the model, and the account, as 100% used and sent Flash requests elsewhere. The server picks the bucket (ZCode sends no plan with a request), so a gift-only account's usage now counts each model on its live bucket, the least used, and sets spent siblings aside, as an account with a coding plan already did. bun scripts/check.mjs zcode and the zcode tests pass; the new gift test fails on 0.1.9.

This commit is contained in:
yetone
2026-10-05 19:50:37 +08:00
parent 42783f0033
commit 6b13dc05e4
5 changed files with 70 additions and 13 deletions
+8
View File
@@ -65,6 +65,14 @@ Magpie plugin contract. No new UI page or test framework is introduced.
- When the plugin maps gift model quotas.
- Then the exhausted sibling does not make that gift entry appear exhausted.
### Allow a live sibling bucket on a gift-only account
- Given an account with no coding plan and two live gift plans (ZCode Trust Build and ZCode Start Plan) whose buckets both serve GLM-5.3-Flash.
- And the Start Plan's bucket is spent while Trust Build's has quota.
- When the plugin reports the account's usage.
- Then GLM-5.3-Flash and its trial entry count on Trust Build's bucket alone.
- And the spent Start Plan bucket stays on the card, set aside, so it doesn't mark the model or the account as used up.
### Keep plain models on the coding plan
- Given a caller uses an existing model ID without the Trial suffix.