fix: change default model to ollama/llama3 and trim config to 5 models
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.
This commit is contained in:
parent
989954e9d4
commit
56c441e760
2 changed files with 20 additions and 121 deletions
|
|
@ -13,7 +13,7 @@ func DefaultConfig() *Config {
|
||||||
Workspace: "~/.picoclaw/workspace",
|
Workspace: "~/.picoclaw/workspace",
|
||||||
RestrictToWorkspace: true,
|
RestrictToWorkspace: true,
|
||||||
Provider: "",
|
Provider: "",
|
||||||
Model: "glm-4.7",
|
Model: "llama3",
|
||||||
MaxTokens: 8192,
|
MaxTokens: 8192,
|
||||||
Temperature: nil, // nil means use provider default
|
Temperature: nil, // nil means use provider default
|
||||||
MaxToolIterations: 20,
|
MaxToolIterations: 20,
|
||||||
|
|
@ -122,19 +122,19 @@ func DefaultConfig() *Config {
|
||||||
// Add your API key to the model you want to use
|
// 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",
|
ModelName: "llama3",
|
||||||
Model: "zhipu/glm-4.7",
|
Model: "ollama/llama3",
|
||||||
APIBase: "https://open.bigmodel.cn/api/paas/v4",
|
APIBase: "http://localhost:11434/v1",
|
||||||
APIKey: "",
|
APIKey: "ollama",
|
||||||
},
|
},
|
||||||
|
|
||||||
// OpenAI - https://platform.openai.com/api-keys
|
// OpenRouter (100+ models) - https://openrouter.ai/keys
|
||||||
{
|
{
|
||||||
ModelName: "gpt-5.2",
|
ModelName: "openrouter-auto",
|
||||||
Model: "openai/gpt-5.2",
|
Model: "openrouter/auto",
|
||||||
APIBase: "https://api.openai.com/v1",
|
APIBase: "https://openrouter.ai/api/v1",
|
||||||
APIKey: "",
|
APIKey: "",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -146,6 +146,14 @@ func DefaultConfig() *Config {
|
||||||
APIKey: "",
|
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/
|
// DeepSeek - https://platform.deepseek.com/
|
||||||
{
|
{
|
||||||
ModelName: "deepseek-chat",
|
ModelName: "deepseek-chat",
|
||||||
|
|
@ -153,115 +161,6 @@ func DefaultConfig() *Config {
|
||||||
APIBase: "https://api.deepseek.com/v1",
|
APIBase: "https://api.deepseek.com/v1",
|
||||||
APIKey: "",
|
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{
|
Gateway: GatewayConfig{
|
||||||
Host: "0.0.0.0",
|
Host: "0.0.0.0",
|
||||||
|
|
|
||||||
|
|
@ -296,8 +296,8 @@ func TestConvertConfig(t *testing.T) {
|
||||||
if len(warnings) != 0 {
|
if len(warnings) != 0 {
|
||||||
t.Errorf("expected no warnings, got %v", warnings)
|
t.Errorf("expected no warnings, got %v", warnings)
|
||||||
}
|
}
|
||||||
if cfg.Agents.Defaults.Model != "glm-4.7" {
|
if cfg.Agents.Defaults.Model != "llama3" {
|
||||||
t.Errorf("default model should be glm-4.7, got %q", cfg.Agents.Defaults.Model)
|
t.Errorf("default model should be llama3, got %q", cfg.Agents.Defaults.Model)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue