From 56c441e760652900f7115baedbe893084e2d5ae9 Mon Sep 17 00:00:00 2001 From: Rahul Bansal Date: Sat, 21 Feb 2026 10:28:05 +0530 Subject: [PATCH] fix: change default model to ollama/llama3 and trim config to 5 models MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #563: default model changed from glm-4.7 (Zhipu AI) to llama3 (local Ollama — free, no API key needed). Fixes #567: model list trimmed from 18 to 5 essential entries (ollama, openrouter, anthropic, openai, deepseek). Removed 13 niche providers to reduce config from ~265 lines to ~80. --- pkg/config/defaults.go | 137 +++++------------------------------- pkg/migrate/migrate_test.go | 4 +- 2 files changed, 20 insertions(+), 121 deletions(-) diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 7654326e7..6dd80a018 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -13,7 +13,7 @@ func DefaultConfig() *Config { Workspace: "~/.picoclaw/workspace", RestrictToWorkspace: true, Provider: "", - Model: "glm-4.7", + Model: "llama3", MaxTokens: 8192, Temperature: nil, // nil means use provider default MaxToolIterations: 20, @@ -122,19 +122,19 @@ func DefaultConfig() *Config { // Add your API key to the model you want to use // ============================================ - // Zhipu AI (智谱) - https://open.bigmodel.cn/usercenter/apikeys + // Ollama (local) - https://ollama.com { - ModelName: "glm-4.7", - Model: "zhipu/glm-4.7", - APIBase: "https://open.bigmodel.cn/api/paas/v4", - APIKey: "", + ModelName: "llama3", + Model: "ollama/llama3", + APIBase: "http://localhost:11434/v1", + APIKey: "ollama", }, - // OpenAI - https://platform.openai.com/api-keys + // OpenRouter (100+ models) - https://openrouter.ai/keys { - ModelName: "gpt-5.2", - Model: "openai/gpt-5.2", - APIBase: "https://api.openai.com/v1", + ModelName: "openrouter-auto", + Model: "openrouter/auto", + APIBase: "https://openrouter.ai/api/v1", APIKey: "", }, @@ -146,6 +146,14 @@ func DefaultConfig() *Config { APIKey: "", }, + // OpenAI - https://platform.openai.com/api-keys + { + ModelName: "gpt-5.2", + Model: "openai/gpt-5.2", + APIBase: "https://api.openai.com/v1", + APIKey: "", + }, + // DeepSeek - https://platform.deepseek.com/ { ModelName: "deepseek-chat", @@ -153,115 +161,6 @@ func DefaultConfig() *Config { APIBase: "https://api.deepseek.com/v1", APIKey: "", }, - - // Google Gemini - https://ai.google.dev/ - { - ModelName: "gemini-2.0-flash", - Model: "gemini/gemini-2.0-flash-exp", - APIBase: "https://generativelanguage.googleapis.com/v1beta", - APIKey: "", - }, - - // Qwen (通义千问) - https://dashscope.console.aliyun.com/apiKey - { - ModelName: "qwen-plus", - Model: "qwen/qwen-plus", - APIBase: "https://dashscope.aliyuncs.com/compatible-mode/v1", - APIKey: "", - }, - - // Moonshot (月之暗面) - https://platform.moonshot.cn/console/api-keys - { - ModelName: "moonshot-v1-8k", - Model: "moonshot/moonshot-v1-8k", - APIBase: "https://api.moonshot.cn/v1", - APIKey: "", - }, - - // Groq - https://console.groq.com/keys - { - ModelName: "llama-3.3-70b", - Model: "groq/llama-3.3-70b-versatile", - APIBase: "https://api.groq.com/openai/v1", - APIKey: "", - }, - - // OpenRouter (100+ models) - https://openrouter.ai/keys - { - ModelName: "openrouter-auto", - Model: "openrouter/auto", - APIBase: "https://openrouter.ai/api/v1", - APIKey: "", - }, - { - ModelName: "openrouter-gpt-5.2", - Model: "openrouter/openai/gpt-5.2", - APIBase: "https://openrouter.ai/api/v1", - APIKey: "", - }, - - // NVIDIA - https://build.nvidia.com/ - { - ModelName: "nemotron-4-340b", - Model: "nvidia/nemotron-4-340b-instruct", - APIBase: "https://integrate.api.nvidia.com/v1", - APIKey: "", - }, - - // Cerebras - https://inference.cerebras.ai/ - { - ModelName: "cerebras-llama-3.3-70b", - Model: "cerebras/llama-3.3-70b", - APIBase: "https://api.cerebras.ai/v1", - APIKey: "", - }, - - // Volcengine (火山引擎) - https://console.volcengine.com/ark - { - ModelName: "doubao-pro", - Model: "volcengine/doubao-pro-32k", - APIBase: "https://ark.cn-beijing.volces.com/api/v3", - APIKey: "", - }, - - // ShengsuanYun (神算云) - { - ModelName: "deepseek-v3", - Model: "shengsuanyun/deepseek-v3", - APIBase: "https://api.shengsuanyun.com/v1", - APIKey: "", - }, - - // Antigravity (Google Cloud Code Assist) - OAuth only - { - ModelName: "gemini-flash", - Model: "antigravity/gemini-3-flash", - AuthMethod: "oauth", - }, - - // GitHub Copilot - https://github.com/settings/tokens - { - ModelName: "copilot-gpt-5.2", - Model: "github-copilot/gpt-5.2", - APIBase: "http://localhost:4321", - AuthMethod: "oauth", - }, - - // Ollama (local) - https://ollama.com - { - ModelName: "llama3", - Model: "ollama/llama3", - APIBase: "http://localhost:11434/v1", - APIKey: "ollama", - }, - - // VLLM (local) - http://localhost:8000 - { - ModelName: "local-model", - Model: "vllm/custom-model", - APIBase: "http://localhost:8000/v1", - APIKey: "", - }, }, Gateway: GatewayConfig{ Host: "0.0.0.0", diff --git a/pkg/migrate/migrate_test.go b/pkg/migrate/migrate_test.go index b6b3d70aa..55b9dd20d 100644 --- a/pkg/migrate/migrate_test.go +++ b/pkg/migrate/migrate_test.go @@ -296,8 +296,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 != "llama3" { + t.Errorf("default model should be llama3, got %q", cfg.Agents.Defaults.Model) } }) }