agent test: OpenHanako's magpie provider names relay/glm-4.6 GLM-4.6, as the catalog names it — e0bf3e61 names a model its provider's list gives only by id as the other providers name it, and the sandbox catalog has zai's glm-4.6 as "GLM-4.6", so TestHanakoFiles and TestHanakoLive (macOS and ubuntu CI on 85fd35ab) still expected "glm-4.6 · Relay". Their expectation and the plugin fixture of a current provider now say "GLM-4.6 · Relay". No app change. go test ./internal/agent/ passes.

This commit is contained in:
yetone committed 2026-10-06 13:48:18 +08:00
1 parent 85fd35abcb
commit c0c3b20b95
1 file changed
+2 -2
+2 -2
View File
@@ -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 {