From 4a87c4476dc9de584cf01c801c7909e37e9310a4 Mon Sep 17 00:00:00 2001 From: yetone Date: Thu, 22 Oct 2026 10:05:26 +0800 Subject: [PATCH] provider: Zed's mover min is 0.1.11, where a system message inside an Anthropic request reaches Zed as user text Roy on Discord: Claude Code through a Zed subscription failed with "400 Zed: failed to parse Anthropic request: unknown variant system, expected user or assistant". Claude Code puts {role: "system"} messages inside messages[] (a turn's effort, hook notices after tool results); Zed's cloud takes only user and assistant there. Plugin 0.1.11 (magpie-community/plugins 3d355d3) sends their text in a user turn where it was said, and leaves an effort-only one out. Raising the min lets keepMovedCurrent bring every moved Zed user up to it. npm: `npm view @magpie-community/opencode-zed-auth version --prefer-online --registry https://registry.npmjs.org` answered 0.1.11 before this change. Run at 7dd965ed2 (origin/main, just fetched) + this change: gofmt -l internal/provider (nothing); go vet ./internal/provider/ on darwin, GOOS=linux -tags nogui and GOOS=windows: ok; `set -o pipefail; go test -timeout 45m ./internal/provider/...`: ok (88.7s), 0 FAIL. The mover guard tests (TestMovedBuiltinsSayTheirPlugin and the migrate_*_test.go files) are in internal/provider; no test outside it names movers. Not run: the full suite (a one-line min change). --- internal/provider/migrate_zed.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/provider/migrate_zed.go b/internal/provider/migrate_zed.go index 9f5b15e31..fe0dfaf1d 100644 --- a/internal/provider/migrate_zed.go +++ b/internal/provider/migrate_zed.go @@ -13,7 +13,7 @@ import ( func init() { movers["zed"] = &mover{ pkg: "@magpie-community/opencode-zed-auth", - min: "0.1.10", // the organization with a plan is picked, and a 402 for the saved one moves the account (plugins#232); 0.1.9: a signed-in account whose model list was never read says why; 0.1.8: a free account's plan reads "No plan", as the built-in's; 0.1.6: a failure's status and its sign-in mark as the built-in's; a model token refused while listing marks the account + min: "0.1.11", // a {role: "system"} message inside an Anthropic request goes to Zed as user text in place, not a role Zed refuses (Roy on Discord); 0.1.10: the organization with a plan is picked, and a 402 for the saved one moves the account (plugins#232); 0.1.9: a signed-in account whose model list was never read says why; 0.1.8: a free account's plan reads "No plan", as the built-in's; 0.1.6: a failure's status and its sign-in mark as the built-in's; a model token refused while listing marks the account agents: []string{"zed"}, out: func() ([]Moving, error) { var out []Moving