provider: moved ZCode users get plugin 0.1.9, where the gift's models are trial entries the user picks (plugins #21) — 0.1.8 spent a dual account's gift before its GLM Coding Plan for every model the gift served, so a user who meant to spend the plan had no say. 0.1.9 lists each live gift model again as <model>-Trial (GLM-5.3-Flash-Trial): that entry spends the gift and answers 429 locally when its bucket is spent or blocked, and a plain model always spends the coding plan. Reviewed line by line and run against a fake upstream (a coding-only account's trial entry is a local 400, a streamed trial request reaches zcode.z.ai with the raw model, a 1113 inside a 200 becomes 429 and keeps the entry off for a minute, a plain model still goes to api.z.ai); bun test (65 pass) and bun scripts/check.mjs zcode pass. go vet and go test -tags nogui ./internal/provider/ under a temp HOME pass.

This commit is contained in:
yetone
2026-10-05 14:29:35 +08:00
parent b06d8247b5
commit 2350ea7aa7
+1 -1
View File
@@ -21,7 +21,7 @@ import (
func init() {
movers["zcode"] = &mover{
pkg: "@magpie-community/opencode-zcode-auth",
min: "0.1.8", // an account's ZCode gift plans spent before its GLM Coding Plan (plugins #19)
min: "0.1.9", // the gift's models are trial entries (GLM-5.3-Flash-Trial) the user picks; a plain model spends the GLM Coding Plan (plugins #21)
agents: []string{"zcode"},
// a Start Plan account was never served GLM-5.3, by the built-in
// or by ZCode, and the plugin lists it no more than they do; its