feat: upgrade default model from glm-4.7 to glm-5
GLM-5 (744B MoE, released 2026-02-11) is Z.ai's latest flagship model with improved coding, reasoning and agent capabilities. https://claude.ai/code/session_01MYemTMPtHrcgidWs8UdjcG
This commit is contained in:
parent
b5491d4cbd
commit
5862b5b210
9 changed files with 15 additions and 15 deletions
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
|
|
@ -20,7 +20,7 @@
|
|||
## 🧪 Test Environment & Hardware
|
||||
- **Hardware:** [e.g. Raspberry Pi 5, Orange Pi, PC]
|
||||
- **OS:** [e.g. Debian 12, Ubuntu 22.04]
|
||||
- **Model/Provider:** [e.g. OpenAI GPT-4o, Z.ai GLM-4.7, DeepSeek-V3]
|
||||
- **Model/Provider:** [e.g. OpenAI GPT-4o, Z.ai GLM-5, DeepSeek-V3]
|
||||
- **Channels:** [e.g. Discord, Telegram, Feishu, ...]
|
||||
|
||||
|
||||
|
|
|
|||
8
.github/workflows/deploy-hostinger.yml
vendored
8
.github/workflows/deploy-hostinger.yml
vendored
|
|
@ -112,7 +112,7 @@ jobs:
|
|||
set_env_var "PICOCLAW_ZAI_API_KEY" "\$ZAI_KEY"
|
||||
set_env_var "PICOCLAW_ZAI_API_BASE" "https://api.z.ai/api/paas/v4"
|
||||
set_env_var "PICOCLAW_AGENTS_DEFAULTS_PROVIDER" "zai"
|
||||
set_env_var "PICOCLAW_AGENTS_DEFAULTS_MODEL" "glm-4.7"
|
||||
set_env_var "PICOCLAW_AGENTS_DEFAULTS_MODEL" "glm-5"
|
||||
echo "Z.ai: API key and default model configured"
|
||||
else
|
||||
echo "WARNING: PICOCLAW_ZAI_API_KEY secret is empty"
|
||||
|
|
@ -140,9 +140,9 @@ jobs:
|
|||
if [ -f "\$CONFIG_FILE" ]; then
|
||||
# Update model if it still references kimi/moonshot
|
||||
if grep -q '"model".*kimi\|"model".*moonshot' "\$CONFIG_FILE" 2>/dev/null; then
|
||||
sed -i 's/"model"[[:space:]]*:[[:space:]]*"[^"]*kimi[^"]*"/"model": "glm-4.7"/' "\$CONFIG_FILE"
|
||||
sed -i 's/"model"[[:space:]]*:[[:space:]]*"[^"]*moonshot[^"]*"/"model": "glm-4.7"/' "\$CONFIG_FILE"
|
||||
echo "Updated config.json: replaced kimi/moonshot model with glm-4.7"
|
||||
sed -i 's/"model"[[:space:]]*:[[:space:]]*"[^"]*kimi[^"]*"/"model": "glm-5"/' "\$CONFIG_FILE"
|
||||
sed -i 's/"model"[[:space:]]*:[[:space:]]*"[^"]*moonshot[^"]*"/"model": "glm-5"/' "\$CONFIG_FILE"
|
||||
echo "Updated config.json: replaced kimi/moonshot model with glm-5"
|
||||
fi
|
||||
# Update provider if it still references zhipu/moonshot
|
||||
if grep -q '"provider".*zhipu\|"provider".*moonshot' "\$CONFIG_FILE" 2>/dev/null; then
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
"defaults": {
|
||||
"workspace": "~/.picoclaw/workspace",
|
||||
"restrict_to_workspace": true,
|
||||
"model": "glm-4.7",
|
||||
"model": "glm-5",
|
||||
"max_tokens": 8192,
|
||||
"temperature": 0.7,
|
||||
"max_tool_iterations": 20
|
||||
|
|
|
|||
|
|
@ -434,7 +434,7 @@ if [ "${SKIP_CONFIG}" = false ]; then
|
|||
openai) DEFAULT_MODEL="gpt-4o" ;;
|
||||
openrouter) DEFAULT_MODEL="anthropic/claude-sonnet-4" ;;
|
||||
gemini) DEFAULT_MODEL="gemini-2.0-flash" ;;
|
||||
zai|zhipu) DEFAULT_MODEL="glm-4.7" ;;
|
||||
zai|zhipu) DEFAULT_MODEL="glm-5" ;;
|
||||
groq) DEFAULT_MODEL="llama-3.3-70b-versatile" ;;
|
||||
ollama) DEFAULT_MODEL="llama3.2" ;;
|
||||
*) DEFAULT_MODEL="claude-sonnet-4-20250514" ;;
|
||||
|
|
|
|||
|
|
@ -1017,7 +1017,7 @@ func (al *AgentLoop) handleCommand(ctx context.Context, msg bus.InboundMessage)
|
|||
switch args[0] {
|
||||
case "models":
|
||||
// TODO: Fetch available models dynamically if possible
|
||||
return "Available models: glm-4.7, claude-3-5-sonnet, gpt-4o (configured in config.json/env)", true
|
||||
return "Available models: glm-5, claude-3-5-sonnet, gpt-4o (configured in config.json/env)", true
|
||||
case "channels":
|
||||
if al.channelManager == nil {
|
||||
return "Channel manager not initialized", true
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ func DefaultConfig() *Config {
|
|||
Workspace: "~/.picoclaw/workspace",
|
||||
RestrictToWorkspace: true,
|
||||
Provider: "",
|
||||
Model: "glm-4.7",
|
||||
Model: "glm-5",
|
||||
MaxTokens: 8192,
|
||||
Temperature: 0.7,
|
||||
MaxToolIterations: 20,
|
||||
|
|
|
|||
|
|
@ -293,8 +293,8 @@ func TestConvertConfig(t *testing.T) {
|
|||
if len(warnings) != 0 {
|
||||
t.Errorf("expected no warnings, got %v", warnings)
|
||||
}
|
||||
if cfg.Agents.Defaults.Model != "glm-4.7" {
|
||||
t.Errorf("default model should be glm-4.7, got %q", cfg.Agents.Defaults.Model)
|
||||
if cfg.Agents.Defaults.Model != "glm-5" {
|
||||
t.Errorf("default model should be glm-5, got %q", cfg.Agents.Defaults.Model)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -472,7 +472,7 @@ func TestResolveCodexModel(t *testing.T) {
|
|||
}{
|
||||
{name: "empty", input: "", wantModel: codexDefaultModel, wantFallback: true},
|
||||
{name: "unsupported namespace", input: "anthropic/claude-3.5", wantModel: codexDefaultModel, wantFallback: true},
|
||||
{name: "non-openai prefixed", input: "glm-4.7", wantModel: codexDefaultModel, wantFallback: true},
|
||||
{name: "non-openai prefixed", input: "glm-5", wantModel: codexDefaultModel, wantFallback: true},
|
||||
{name: "openai prefix", input: "openai/gpt-5.2", wantModel: "gpt-5.2", wantFallback: false},
|
||||
{name: "direct gpt", input: "gpt-4o", wantModel: "gpt-4o", wantFallback: false},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ func (p *HTTPProvider) Chat(ctx context.Context, messages []Message, tools []Too
|
|||
return nil, fmt.Errorf("API base not configured")
|
||||
}
|
||||
|
||||
// Strip provider prefix from model name (e.g., zai/glm-4.7 -> glm-4.7, groq/openai/gpt-oss-120b -> openai/gpt-oss-120b, ollama/qwen2.5:14b -> qwen2.5:14b)
|
||||
// Strip provider prefix from model name (e.g., zai/glm-5 -> glm-5, groq/openai/gpt-oss-120b -> openai/gpt-oss-120b, ollama/qwen2.5:14b -> qwen2.5:14b)
|
||||
if idx := strings.Index(model, "/"); idx != -1 {
|
||||
prefix := model[:idx]
|
||||
if prefix == "zai" || prefix == "moonshot" || prefix == "nvidia" || prefix == "groq" || prefix == "ollama" {
|
||||
|
|
@ -337,7 +337,7 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) {
|
|||
}
|
||||
// Swap incompatible kimi model names when routing to Z.ai
|
||||
if strings.Contains(lowerModel, "kimi") || strings.Contains(lowerModel, "moonshot") {
|
||||
model = "glm-4.7"
|
||||
model = "glm-5"
|
||||
}
|
||||
} else if cfg.Providers.Moonshot.APIKey != "" {
|
||||
apiKey = cfg.Providers.Moonshot.APIKey
|
||||
|
|
@ -384,7 +384,7 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) {
|
|||
apiKey = cfg.Providers.Zai.APIKey
|
||||
apiBase = cfg.Providers.Zai.APIBase
|
||||
proxy = cfg.Providers.Zai.Proxy
|
||||
model = "glm-4.7"
|
||||
model = "glm-5"
|
||||
if apiBase == "" {
|
||||
apiBase = "https://api.z.ai/api/paas/v4"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue