diff --git a/CHANGELOG.md b/CHANGELOG.md index b8b585d..2ee94a4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Z.AI default model updated from `glm-4.7` to `glm-5.1` + ## [2.3.4] - 2026-03-26 ### Fixed diff --git a/cmd/default_test.go b/cmd/default_test.go index 67f0006..f856bff 100644 --- a/cmd/default_test.go +++ b/cmd/default_test.go @@ -23,7 +23,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` err := os.WriteFile(configPath, []byte(configContent), 0600) if err != nil { @@ -54,7 +54,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` err := os.WriteFile(configPath, []byte(configContent), 0600) if err != nil { @@ -120,7 +120,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` err := os.WriteFile(configPath, []byte(configContent), 0600) if err != nil { diff --git a/docs/architecture/README.md b/docs/architecture/README.md index 9324337..93a982f 100644 --- a/docs/architecture/README.md +++ b/docs/architecture/README.md @@ -137,12 +137,12 @@ kairo/ default_provider: zai default_harness: claude default_models: - zai: glm-4.7 + zai: glm-5.1 providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 env_vars: - ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.7-flash ``` @@ -157,7 +157,7 @@ Notes: | Provider | Base URL | Model | API Key Required | | ---------- | ------------------------------------ | ----------------- | ---------------- | -| `zai` | `https://api.z.ai/api/anthropic` | `glm-4.7` | Yes | +| `zai` | `https://api.z.ai/api/anthropic` | `glm-5.1` | Yes | | `minimax` | `https://api.minimax.io/anthropic` | `MiniMax-M2.7` | Yes | | `deepseek` | `https://api.deepseek.com/anthropic` | `deepseek-chat` | Yes | | `kimi` | `https://api.kimi.com/coding/` | `kimi-for-coding` | Yes | diff --git a/docs/guides/user-guide.md b/docs/guides/user-guide.md index 443f598..3e3491d 100644 --- a/docs/guides/user-guide.md +++ b/docs/guides/user-guide.md @@ -79,7 +79,7 @@ kairo -- "Quick question" | Provider | Default Model | API Key Required | | ---------- | ----------------- | ---------------- | -| `zai` | `glm-4.7` | Yes | +| `zai` | `glm-5.1` | Yes | | `minimax` | `MiniMax-M2.7` | Yes | | `kimi` | `kimi-for-coding` | Yes | | `deepseek` | `deepseek-chat` | Yes | diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md index c136213..3fa5166 100644 --- a/docs/reference/configuration.md +++ b/docs/reference/configuration.md @@ -51,13 +51,13 @@ Notes: default_provider: zai default_harness: claude default_models: - zai: glm-4.7 + zai: glm-5.1 minimax: MiniMax-M2.7 providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 env_vars: - ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.7-flash minimax: @@ -98,7 +98,7 @@ Generated on first setup. The file contains the private identity line followed b | Provider | API Key Required | Default Base URL | Default Model | | ---------- | ---------------- | ------------------------------------ | ----------------- | -| `zai` | Yes | `https://api.z.ai/api/anthropic` | `glm-4.7` | +| `zai` | Yes | `https://api.z.ai/api/anthropic` | `glm-5.1` | | `minimax` | Yes | `https://api.minimax.io/anthropic` | `MiniMax-M2.7` | | `kimi` | Yes | `https://api.kimi.com/coding/` | `kimi-for-coding` | | `deepseek` | Yes | `https://api.deepseek.com/anthropic` | `deepseek-chat` | diff --git a/docs/reference/providers.md b/docs/reference/providers.md index d9d1432..abb29b5 100644 --- a/docs/reference/providers.md +++ b/docs/reference/providers.md @@ -6,7 +6,7 @@ Built-in and custom provider configurations. | Provider | Base URL | Model | API Key | | ---------- | ------------------------------------ | ----------------- | ------- | -| `zai` | `https://api.z.ai/api/anthropic` | `glm-4.7` | Yes | +| `zai` | `https://api.z.ai/api/anthropic` | `glm-5.1` | Yes | | `minimax` | `https://api.minimax.io/anthropic` | `MiniMax-M2.7` | Yes | | `deepseek` | `https://api.deepseek.com/anthropic` | `deepseek-chat` | Yes | | `kimi` | `https://api.kimi.com/coding/` | `kimi-for-coding` | Yes | diff --git a/internal/README.md b/internal/README.md index 385a68b..05333e4 100644 --- a/internal/README.md +++ b/internal/README.md @@ -56,12 +56,12 @@ Example schema: default_provider: zai default_harness: claude default_models: - zai: glm-4.7 + zai: glm-5.1 providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ``` ### `crypto/` @@ -100,7 +100,7 @@ Built-in providers: | Provider | Base URL | Model | API Key | | ---------- | ------------------------------------ | ----------------- | ------- | -| `zai` | `https://api.z.ai/api/anthropic` | `glm-4.7` | Yes | +| `zai` | `https://api.z.ai/api/anthropic` | `glm-5.1` | Yes | | `minimax` | `https://api.minimax.io/anthropic` | `MiniMax-M2.7` | Yes | | `deepseek` | `https://api.deepseek.com/anthropic` | `deepseek-chat` | Yes | | `kimi` | `https://api.kimi.com/coding/` | `kimi-for-coding` | Yes | diff --git a/internal/config/config_test.go b/internal/config/config_test.go index 20c411b..ff05aa8 100644 --- a/internal/config/config_test.go +++ b/internal/config/config_test.go @@ -22,7 +22,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` err := os.WriteFile(configPath, []byte(configContent), 0600) if err != nil { @@ -89,7 +89,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` if err := os.WriteFile(configPath, []byte(configWithUnknownField), 0600); err != nil { t.Fatal(err) @@ -362,7 +362,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` if err := os.WriteFile(oldConfigPath, []byte(configContent), 0600); err != nil { t.Fatal(err) @@ -513,7 +513,7 @@ providers: zai: name: Z.AI base_url: https://api.z.ai/api/anthropic - model: glm-4.7 + model: glm-5.1 ` if err := os.WriteFile(oldConfigPath, []byte(configContent), 0600); err != nil { t.Fatal(err) diff --git a/internal/config/migration_test.go b/internal/config/migration_test.go index cf8462e..ba99c3c 100644 --- a/internal/config/migration_test.go +++ b/internal/config/migration_test.go @@ -260,7 +260,7 @@ func TestFormatMigrationChanges(t *testing.T) { t.Run("FormatsChangesCorrectly", func(t *testing.T) { changes := []MigrationChange{ {Provider: "minimax", Field: "model", Old: "MiniMax-M2", New: "MiniMax-M2.7"}, - {Provider: "zai", Field: "model", Old: "glm-4.5", New: "glm-4.7"}, + {Provider: "zai", Field: "model", Old: "glm-4.5", New: "glm-5.1"}, } result := FormatMigrationChanges(changes) diff --git a/internal/providers/registry.go b/internal/providers/registry.go index 491ed69..c6a5f5f 100644 --- a/internal/providers/registry.go +++ b/internal/providers/registry.go @@ -4,7 +4,7 @@ var BuiltInProviders = map[string]ProviderDefinition{ "zai": { Name: "Z.AI", BaseURL: "https://api.z.ai/api/anthropic", - Model: "glm-4.7", + Model: "glm-5.1", RequiresAPIKey: true, EnvVars: []string{"ANTHROPIC_DEFAULT_HAIKU_MODEL=glm-4.7-flash"}, }, diff --git a/internal/providers/registry_test.go b/internal/providers/registry_test.go index 91edcb4..d604dd5 100644 --- a/internal/providers/registry_test.go +++ b/internal/providers/registry_test.go @@ -122,7 +122,7 @@ func TestGetBuiltInProvider(t *testing.T) { wantExists: true, wantName: "Z.AI", wantBaseURL: "https://api.z.ai/api/anthropic", - wantModel: "glm-4.7", + wantModel: "glm-5.1", wantRequires: true, }, { diff --git a/tests/integration/full_workflow_test.go b/tests/integration/full_workflow_test.go index e19a692..698ec96 100644 --- a/tests/integration/full_workflow_test.go +++ b/tests/integration/full_workflow_test.go @@ -129,7 +129,7 @@ func TestFullWorkflowHarnessSwitching(t *testing.T) { DefaultHarness: "claude", Providers: map[string]config.Provider{ "anthropic": {Name: "Native Anthropic"}, - "zai": {Name: "Z.AI", BaseURL: "https://api.z.ai/api/anthropic", Model: "glm-4.7"}, + "zai": {Name: "Z.AI", BaseURL: "https://api.z.ai/api/anthropic", Model: "glm-5.1"}, }, } if err := config.SaveConfig(context.Background(), tmpDir, cfg); err != nil { @@ -183,7 +183,7 @@ func TestFullWorkflowListAndStatus(t *testing.T) { DefaultProvider: "zai", Providers: map[string]config.Provider{ "anthropic": {Name: "Native Anthropic"}, - "zai": {Name: "Z.AI", BaseURL: "https://api.z.ai/api/anthropic", Model: "glm-4.7"}, + "zai": {Name: "Z.AI", BaseURL: "https://api.z.ai/api/anthropic", Model: "glm-5.1"}, "minimax": {Name: "MiniMax", BaseURL: "https://api.minimax.chat/v1", Model: "minimax-abab6.5"}, "deepseek": {Name: "DeepSeek", BaseURL: "https://api.deepseek.com/v1", Model: "deepseek-chat"}, },