From c0c3b20b9576f30b38bcfd08f923335b4a287fbf Mon Sep 17 00:00:00 2001 From: yetone Date: Tue, 6 Oct 2026 13:48:18 +0800 Subject: [PATCH] =?UTF-8?q?agent=20test:=20OpenHanako's=20magpie=20provide?= =?UTF-8?q?r=20names=20relay/glm-4.6=20GLM-4.6,=20as=20the=20catalog=20nam?= =?UTF-8?q?es=20it=20=E2=80=94=20e0bf3e61=20names=20a=20model=20its=20prov?= =?UTF-8?q?ider's=20list=20gives=20only=20by=20id=20as=20the=20other=20pro?= =?UTF-8?q?viders=20name=20it,=20and=20the=20sandbox=20catalog=20has=20zai?= =?UTF-8?q?'s=20glm-4.6=20as=20"GLM-4.6",=20so=20TestHanakoFiles=20and=20T?= =?UTF-8?q?estHanakoLive=20(macOS=20and=20ubuntu=20CI=20on=2085fd35ab)=20s?= =?UTF-8?q?till=20expected=20"glm-4.6=20=C2=B7=20Relay".=20Their=20expecta?= =?UTF-8?q?tion=20and=20the=20plugin=20fixture=20of=20a=20current=20provid?= =?UTF-8?q?er=20now=20say=20"GLM-4.6=20=C2=B7=20Relay".=20No=20app=20chang?= =?UTF-8?q?e.=20go=20test=20./internal/agent/=20passes.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- internal/agent/hanako_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/agent/hanako_test.go b/internal/agent/hanako_test.go index 75767df46..7a723a132 100644 --- a/internal/agent/hanako_test.go +++ b/internal/agent/hanako_test.go @@ -67,7 +67,7 @@ func hanakoChatOf(t *testing.T, path string) (map[string]any, string) { func hanakoWant(t *testing.T) string { t.Helper() return `{"display_name":"magpie","base_url":"` + gatewayV1() + `","api":"openai-completions","api_key":"magpie-hanako",` + - `"models":[{"id":"relay/glm-4.6","name":"glm-4.6 · Relay","context":204800,"maxOutput":131072,"image":true,"reasoning":true,"xhigh":true}]}` + `"models":[{"id":"relay/glm-4.6","name":"GLM-4.6 · Relay","context":204800,"maxOutput":131072,"image":true,"reasoning":true,"xhigh":true}]}` } func TestHanakoHome(t *testing.T) { @@ -176,7 +176,7 @@ func TestHanakoFiles(t *testing.T) { // what magpie wrote is still read from there hanakoWrite(t, filepath.Join(dir, "provider-plugins", "magpie", "providers", "magpie.json"), `{"id":"magpie","displayName":"magpie","authType":"api-key","defaultBaseUrl":"`+gatewayV1()+`","defaultApi":"openai-completions",`+ - `"models":[{"id":"relay/glm-4.6","name":"glm-4.6 · Relay","context":204800,"maxOutput":131072,"image":true,"reasoning":true,"xhigh":true}]}`, 0o600) + `"models":[{"id":"relay/glm-4.6","name":"GLM-4.6 · Relay","context":204800,"maxOutput":131072,"image":true,"reasoning":true,"xhigh":true}]}`, 0o600) hanakoWrite(t, catalogPath, `{"catalogVersion":2,"providers":{"openai":{"api_key":"sk-x"},"magpie":{"api_key":"magpie-hanako"}}}`, 0o600) before, _ := os.ReadFile(catalogPath) if err := a.Sync(); err != nil {