From 42fc589a75258ec18b11e70cf5d84f5dd0b183e4 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Tue, 3 Mar 2026 23:49:49 -0800 Subject: [PATCH 1/7] add Vivgrid config example to README --- README.md | 4 +++- docs/migration/model-list-migration.md | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fc60343b..97eb47773 100644 --- a/README.md +++ b/README.md @@ -876,6 +876,7 @@ The subagent has access to tools (message, web_search, etc.) and can communicate | `qwen` | LLM (Qwen direct) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | | `groq` | LLM + **Voice transcription** (Whisper) | [console.groq.com](https://console.groq.com) | | `cerebras` | LLM (Cerebras direct) | [cerebras.ai](https://cerebras.ai) | +| `vivgrid` | LLM (Cerebras direct) | [vivgrid.com](https://vivgrid.com) | ### Model Configuration (model_list) @@ -906,7 +907,8 @@ This design also enables **multi-agent support** with flexible provider selectio | **VLLM** | `vllm/` | `http://localhost:8000/v1` | OpenAI | Local | | **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Get Key](https://cerebras.ai) | | **火山引擎** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Get Key](https://console.volcengine.com) | -| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - | +| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | | +| **Vivgrid** | `vivgrid/` | `https://api.vivgrid.com/v1` | OpenAI | [Get Key](https://vivgrid.com) | | **Antigravity** | `antigravity/` | Google Cloud | Custom | OAuth only | | **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - | diff --git a/docs/migration/model-list-migration.md b/docs/migration/model-list-migration.md index 0d4af719c..d88e5a32d 100644 --- a/docs/migration/model-list-migration.md +++ b/docs/migration/model-list-migration.md @@ -102,6 +102,7 @@ The `model` field uses a protocol prefix format: `[protocol/]model-identifier` | `shengsuanyun/` | ShengSuanYun | `shengsuanyun/deepseek-v3` | | `volcengine/` | Volcengine | `volcengine/doubao-pro-32k` | + **Note**: If no prefix is specified, `openai/` is used as the default. ## ModelConfig Fields From ea0b634b3b05681511bdfa4fc4bf7ba6886a0669 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Wed, 4 Mar 2026 09:19:03 -0800 Subject: [PATCH 2/7] add Vivgrid config --- pkg/config/config.go | 3 +++ pkg/config/defaults.go | 8 ++++++++ pkg/config/migration.go | 17 +++++++++++++++++ pkg/config/migration_test.go | 13 +++++++------ pkg/providers/factory.go | 16 ++++++++++++++++ pkg/providers/factory_provider.go | 4 +++- pkg/providers/factory_provider_test.go | 1 + pkg/providers/factory_test.go | 11 +++++++++++ pkg/providers/openai_compat/provider.go | 2 +- pkg/providers/openai_compat/provider_test.go | 13 ++++++++++++- 10 files changed, 79 insertions(+), 9 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 9f4769de4..779928574 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -397,6 +397,7 @@ type ProvidersConfig struct { ShengSuanYun ProviderConfig `json:"shengsuanyun"` DeepSeek ProviderConfig `json:"deepseek"` Cerebras ProviderConfig `json:"cerebras"` + Vivgrid ProviderConfig `json:"vivgrid"` VolcEngine ProviderConfig `json:"volcengine"` GitHubCopilot ProviderConfig `json:"github_copilot"` Antigravity ProviderConfig `json:"antigravity"` @@ -420,6 +421,7 @@ func (p ProvidersConfig) IsEmpty() bool { p.ShengSuanYun.APIKey == "" && p.ShengSuanYun.APIBase == "" && p.DeepSeek.APIKey == "" && p.DeepSeek.APIBase == "" && p.Cerebras.APIKey == "" && p.Cerebras.APIBase == "" && + p.Vivgrid.APIKey == "" && p.Vivgrid.APIBase == "" && p.VolcEngine.APIKey == "" && p.VolcEngine.APIBase == "" && p.GitHubCopilot.APIKey == "" && p.GitHubCopilot.APIBase == "" && p.Antigravity.APIKey == "" && p.Antigravity.APIBase == "" && @@ -761,6 +763,7 @@ func (c *Config) HasProvidersConfig() bool { v.ShengSuanYun.APIKey != "" || v.ShengSuanYun.APIBase != "" || v.DeepSeek.APIKey != "" || v.DeepSeek.APIBase != "" || v.Cerebras.APIKey != "" || v.Cerebras.APIBase != "" || + v.Vivgrid.APIKey != "" || v.Vivgrid.APIBase != "" || v.VolcEngine.APIKey != "" || v.VolcEngine.APIBase != "" || v.GitHubCopilot.APIKey != "" || v.GitHubCopilot.APIBase != "" || v.Antigravity.APIKey != "" || v.Antigravity.APIBase != "" || diff --git a/pkg/config/defaults.go b/pkg/config/defaults.go index 44f4de7e9..385c2f653 100644 --- a/pkg/config/defaults.go +++ b/pkg/config/defaults.go @@ -249,6 +249,14 @@ func DefaultConfig() *Config { APIKey: "", }, + // Vivgrid - https://vivgrid.com + { + ModelName: "vivgrid-auto", + Model: "vivgrid/auto", + APIBase: "https://api.vivgrid.com/v1", + APIKey: "", + }, + // Volcengine (火山引擎) - https://console.volcengine.com/ark { ModelName: "doubao-pro", diff --git a/pkg/config/migration.go b/pkg/config/migration.go index 5deb09270..e1e0fe0d5 100644 --- a/pkg/config/migration.go +++ b/pkg/config/migration.go @@ -275,6 +275,23 @@ func ConvertProvidersToModelList(cfg *Config) []ModelConfig { }, true }, }, + { + providerNames: []string{"vivgrid"}, + protocol: "vivgrid", + buildConfig: func(p ProvidersConfig) (ModelConfig, bool) { + if p.Vivgrid.APIKey == "" && p.Vivgrid.APIBase == "" { + return ModelConfig{}, false + } + return ModelConfig{ + ModelName: "vivgrid", + Model: "vivgrid/auto", + APIKey: p.Vivgrid.APIKey, + APIBase: p.Vivgrid.APIBase, + Proxy: p.Vivgrid.Proxy, + RequestTimeout: p.Vivgrid.RequestTimeout, + }, true + }, + }, { providerNames: []string{"volcengine", "doubao"}, protocol: "volcengine", diff --git a/pkg/config/migration_test.go b/pkg/config/migration_test.go index db8f4657d..7070db4be 100644 --- a/pkg/config/migration_test.go +++ b/pkg/config/migration_test.go @@ -127,19 +127,20 @@ func TestConvertProvidersToModelList_AllProviders(t *testing.T) { ShengSuanYun: ProviderConfig{APIKey: "key11"}, DeepSeek: ProviderConfig{APIKey: "key12"}, Cerebras: ProviderConfig{APIKey: "key13"}, - VolcEngine: ProviderConfig{APIKey: "key14"}, + Vivgrid: ProviderConfig{APIKey: "key14"}, + VolcEngine: ProviderConfig{APIKey: "key15"}, GitHubCopilot: ProviderConfig{ConnectMode: "grpc"}, Antigravity: ProviderConfig{AuthMethod: "oauth"}, - Qwen: ProviderConfig{APIKey: "key17"}, - Mistral: ProviderConfig{APIKey: "key18"}, + Qwen: ProviderConfig{APIKey: "key18"}, + Mistral: ProviderConfig{APIKey: "key19"}, }, } result := ConvertProvidersToModelList(cfg) - // All 18 providers should be converted - if len(result) != 18 { - t.Errorf("len(result) = %d, want 18", len(result)) + // All 19 providers should be converted + if len(result) != 19 { + t.Errorf("len(result) = %d, want 19", len(result)) } } diff --git a/pkg/providers/factory.go b/pkg/providers/factory.go index 11af14da4..20348dc27 100644 --- a/pkg/providers/factory.go +++ b/pkg/providers/factory.go @@ -144,6 +144,15 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) { sel.apiBase = "https://integrate.api.nvidia.com/v1" } } + case "vivgrid": + if cfg.Providers.Vivgrid.APIKey != "" { + sel.apiKey = cfg.Providers.Vivgrid.APIKey + sel.apiBase = cfg.Providers.Vivgrid.APIBase + sel.proxy = cfg.Providers.Vivgrid.Proxy + if sel.apiBase == "" { + sel.apiBase = "https://api.vivgrid.com/v1" + } + } case "claude-cli", "claude-code", "claudecode": workspace := cfg.WorkspacePath() if workspace == "" { @@ -277,6 +286,13 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) { if sel.apiBase == "" { sel.apiBase = "https://integrate.api.nvidia.com/v1" } + case (strings.Contains(lowerModel, "vivgrid") || strings.HasPrefix(model, "vivgrid/")) && cfg.Providers.Vivgrid.APIKey != "": + sel.apiKey = cfg.Providers.Vivgrid.APIKey + sel.apiBase = cfg.Providers.Vivgrid.APIBase + sel.proxy = cfg.Providers.Vivgrid.Proxy + if sel.apiBase == "" { + sel.apiBase = "https://api.vivgrid.com/v1" + } case (strings.Contains(lowerModel, "ollama") || strings.HasPrefix(model, "ollama/")) && cfg.Providers.Ollama.APIKey != "": sel.apiKey = cfg.Providers.Ollama.APIKey sel.apiBase = cfg.Providers.Ollama.APIBase diff --git a/pkg/providers/factory_provider.go b/pkg/providers/factory_provider.go index 53f7a08a0..a119ca158 100644 --- a/pkg/providers/factory_provider.go +++ b/pkg/providers/factory_provider.go @@ -94,7 +94,7 @@ func CreateProviderFromConfig(cfg *config.ModelConfig) (LLMProvider, string, err case "openrouter", "groq", "zhipu", "gemini", "nvidia", "ollama", "moonshot", "shengsuanyun", "deepseek", "cerebras", - "volcengine", "vllm", "qwen", "mistral": + "vivgrid", "volcengine", "vllm", "qwen", "mistral": // All other OpenAI-compatible HTTP providers if cfg.APIKey == "" && cfg.APIBase == "" { return nil, "", fmt.Errorf("api_key or api_base is required for HTTP-based protocol %q", protocol) @@ -198,6 +198,8 @@ func getDefaultAPIBase(protocol string) string { return "https://api.deepseek.com/v1" case "cerebras": return "https://api.cerebras.ai/v1" + case "vivgrid": + return "https://api.vivgrid.com/v1" case "volcengine": return "https://ark.cn-beijing.volces.com/api/v3" case "qwen": diff --git a/pkg/providers/factory_provider_test.go b/pkg/providers/factory_provider_test.go index e0c0eddef..31cae3442 100644 --- a/pkg/providers/factory_provider_test.go +++ b/pkg/providers/factory_provider_test.go @@ -108,6 +108,7 @@ func TestCreateProviderFromConfig_DefaultAPIBase(t *testing.T) { {"groq", "groq"}, {"openrouter", "openrouter"}, {"cerebras", "cerebras"}, + {"vivgrid", "vivgrid"}, {"qwen", "qwen"}, {"vllm", "vllm"}, {"deepseek", "deepseek"}, diff --git a/pkg/providers/factory_test.go b/pkg/providers/factory_test.go index 5680f23b3..222aff6f2 100644 --- a/pkg/providers/factory_test.go +++ b/pkg/providers/factory_test.go @@ -67,6 +67,17 @@ func TestResolveProviderSelection(t *testing.T) { wantAPIBase: "https://integrate.api.nvidia.com/v1", wantProxy: "http://127.0.0.1:7890", }, + { + name: "explicit vivgrid provider uses defaults", + setup: func(cfg *config.Config) { + cfg.Agents.Defaults.Provider = "vivgrid" + cfg.Providers.Vivgrid.APIKey = "vivgrid-key" + cfg.Providers.Vivgrid.Proxy = "http://127.0.0.1:7890" + }, + wantType: providerTypeHTTPCompat, + wantAPIBase: "https://api.vivgrid.com/v1", + wantProxy: "http://127.0.0.1:7890", + }, { name: "openrouter model uses openrouter defaults", setup: func(cfg *config.Config) { diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index d922ed5f7..b04a6ba2b 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -323,7 +323,7 @@ func normalizeModel(model, apiBase string) string { prefix := strings.ToLower(before) switch prefix { - case "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral": + case "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral", "vivgrid": return after default: return model diff --git a/pkg/providers/openai_compat/provider_test.go b/pkg/providers/openai_compat/provider_test.go index 7247fea3e..dc3f93d9f 100644 --- a/pkg/providers/openai_compat/provider_test.go +++ b/pkg/providers/openai_compat/provider_test.go @@ -200,7 +200,7 @@ func TestProviderChat_StripsMoonshotPrefixAndNormalizesKimiTemperature(t *testin } } -func TestProviderChat_StripsGroqAndOllamaPrefixes(t *testing.T) { +func TestProviderChat_StripsGroqOllamaDeepseekVivgridPrefixes(t *testing.T) { tests := []struct { name string input string @@ -221,6 +221,11 @@ func TestProviderChat_StripsGroqAndOllamaPrefixes(t *testing.T) { input: "deepseek/deepseek-chat", wantModel: "deepseek-chat", }, + { + name: "strips vivgrid prefix", + input: "vivgrid/auto", + wantModel: "auto", + }, } for _, tt := range tests { @@ -325,6 +330,12 @@ func TestNormalizeModel_UsesAPIBase(t *testing.T) { if got := normalizeModel("openrouter/auto", "https://openrouter.ai/api/v1"); got != "openrouter/auto" { t.Fatalf("normalizeModel(openrouter) = %q, want %q", got, "openrouter/auto") } + if got := normalizeModel("vivgrid/managed", "https://api.vivgrid.com/v1"); got != "managed" { + t.Fatalf("normalizeModel(vivgrid) = %q, want %q", got, "managed") + } + if got := normalizeModel("vivgrid/auto", "https://api.vivgrid.com/v1"); got != "auto" { + t.Fatalf("normalizeModel(vivgrid auto) = %q, want %q", got, "auto") + } } func TestProvider_RequestTimeoutDefault(t *testing.T) { From d1cf6806572118ce4b5a03f7327ef902c108d170 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Wed, 4 Mar 2026 22:37:12 -0800 Subject: [PATCH 3/7] Resolve merge conflicts --- pkg/providers/openai_compat/provider.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index 8cd436795..372dfcbf6 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -361,11 +361,7 @@ func normalizeModel(model, apiBase string) string { prefix := strings.ToLower(before) switch prefix { -<<<<<<< HEAD - case "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral", "vivgrid": -======= - case "litellm", "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral": ->>>>>>> origin_picoclaw/main + case "litellm", "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral", "vivgrid": return after default: return model From 91f52c45861654788a6e0154d6a073f379a1112d Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Wed, 4 Mar 2026 23:50:58 -0800 Subject: [PATCH 4/7] Resolve merge conflicts --- pkg/config/config.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 55f4e34fa..449fcd918 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -820,7 +820,6 @@ func (c *Config) findMatches(modelName string) []ModelConfig { // HasProvidersConfig checks if any provider in the old providers config has configuration. func (c *Config) HasProvidersConfig() bool { -<<<<<<< HEAD v := c.Providers return v.Anthropic.APIKey != "" || v.Anthropic.APIBase != "" || v.OpenAI.APIKey != "" || v.OpenAI.APIBase != "" || @@ -841,9 +840,7 @@ func (c *Config) HasProvidersConfig() bool { v.Antigravity.APIKey != "" || v.Antigravity.APIBase != "" || v.Qwen.APIKey != "" || v.Qwen.APIBase != "" || v.Mistral.APIKey != "" || v.Mistral.APIBase != "" -======= return !c.Providers.IsEmpty() ->>>>>>> origin_picoclaw/main } // ValidateModelList validates all ModelConfig entries in the model_list. From a2f63e4207828273d75dcf7771cdbd240facdc34 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Fri, 6 Mar 2026 00:03:10 -0800 Subject: [PATCH 5/7] Fix HasProvidersConfig --- pkg/config/config.go | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/pkg/config/config.go b/pkg/config/config.go index 6661ab16f..ee58c0a93 100644 --- a/pkg/config/config.go +++ b/pkg/config/config.go @@ -864,26 +864,6 @@ func (c *Config) findMatches(modelName string) []ModelConfig { // HasProvidersConfig checks if any provider in the old providers config has configuration. func (c *Config) HasProvidersConfig() bool { - v := c.Providers - return v.Anthropic.APIKey != "" || v.Anthropic.APIBase != "" || - v.OpenAI.APIKey != "" || v.OpenAI.APIBase != "" || - v.OpenRouter.APIKey != "" || v.OpenRouter.APIBase != "" || - v.Groq.APIKey != "" || v.Groq.APIBase != "" || - v.Zhipu.APIKey != "" || v.Zhipu.APIBase != "" || - v.VLLM.APIKey != "" || v.VLLM.APIBase != "" || - v.Gemini.APIKey != "" || v.Gemini.APIBase != "" || - v.Nvidia.APIKey != "" || v.Nvidia.APIBase != "" || - v.Ollama.APIKey != "" || v.Ollama.APIBase != "" || - v.Moonshot.APIKey != "" || v.Moonshot.APIBase != "" || - v.ShengSuanYun.APIKey != "" || v.ShengSuanYun.APIBase != "" || - v.DeepSeek.APIKey != "" || v.DeepSeek.APIBase != "" || - v.Cerebras.APIKey != "" || v.Cerebras.APIBase != "" || - v.Vivgrid.APIKey != "" || v.Vivgrid.APIBase != "" || - v.VolcEngine.APIKey != "" || v.VolcEngine.APIBase != "" || - v.GitHubCopilot.APIKey != "" || v.GitHubCopilot.APIBase != "" || - v.Antigravity.APIKey != "" || v.Antigravity.APIBase != "" || - v.Qwen.APIKey != "" || v.Qwen.APIBase != "" || - v.Mistral.APIKey != "" || v.Mistral.APIBase != "" return !c.Providers.IsEmpty() } From e6f546771182e0cdd6866b497a6f6d5e8c9d69d9 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Fri, 6 Mar 2026 04:20:22 -0800 Subject: [PATCH 6/7] Fix golines for vivgrid case --- pkg/providers/openai_compat/provider.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/providers/openai_compat/provider.go b/pkg/providers/openai_compat/provider.go index f7ccfe5c6..b9cf2fc20 100644 --- a/pkg/providers/openai_compat/provider.go +++ b/pkg/providers/openai_compat/provider.go @@ -363,7 +363,8 @@ func normalizeModel(model, apiBase string) string { prefix := strings.ToLower(before) switch prefix { - case "litellm", "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", "openrouter", "zhipu", "mistral", "vivgrid": + case "litellm", "moonshot", "nvidia", "groq", "ollama", "deepseek", "google", + "openrouter", "zhipu", "mistral", "vivgrid": return after default: return model From 4df413866381a7cc417e35c7d37c371241969db7 Mon Sep 17 00:00:00 2001 From: zihan987 <2910670457@qq.com> Date: Sat, 7 Mar 2026 09:20:56 -0800 Subject: [PATCH 7/7] Fix Vivgrid docs and inference logic --- README.md | 8 ++++---- docs/migration/model-list-migration.md | 1 - pkg/providers/factory.go | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 548303847..b4fcaac4a 100644 --- a/README.md +++ b/README.md @@ -939,7 +939,7 @@ The subagent has access to tools (message, web_search, etc.) and can communicate | `qwen` | LLM (Qwen direct) | [dashscope.console.aliyun.com](https://dashscope.console.aliyun.com) | | `groq` | LLM + **Voice transcription** (Whisper) | [console.groq.com](https://console.groq.com) | | `cerebras` | LLM (Cerebras direct) | [cerebras.ai](https://cerebras.ai) | -| `vivgrid` | LLM (Cerebras direct) | [vivgrid.com](https://vivgrid.com) | +| `vivgrid` | LLM (Vivgrid direct) | [vivgrid.com](https://vivgrid.com) | ### Model Configuration (model_list) @@ -967,12 +967,12 @@ This design also enables **multi-agent support** with flexible provider selectio | **NVIDIA** | `nvidia/` | `https://integrate.api.nvidia.com/v1` | OpenAI | [Get Key](https://build.nvidia.com) | | **Ollama** | `ollama/` | `http://localhost:11434/v1` | OpenAI | Local (no key needed) | | **OpenRouter** | `openrouter/` | `https://openrouter.ai/api/v1` | OpenAI | [Get Key](https://openrouter.ai/keys) | -| **LiteLLM Proxy** | `litellm/` | `http://localhost:4000/v1 | OpenAI | Your LiteLLM proxy key | +| **LiteLLM Proxy** | `litellm/` | `http://localhost:4000/v1` | OpenAI | Your LiteLLM proxy key | | **VLLM** | `vllm/` | `http://localhost:8000/v1` | OpenAI | Local | | **Cerebras** | `cerebras/` | `https://api.cerebras.ai/v1` | OpenAI | [Get Key](https://cerebras.ai) | | **火山引擎** | `volcengine/` | `https://ark.cn-beijing.volces.com/api/v3` | OpenAI | [Get Key](https://console.volcengine.com) | -| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | | -| **Vivgrid** | `vivgrid/` | `https://api.vivgrid.com/v1` | OpenAI | [Get Key](https://vivgrid.com) | +| **神算云** | `shengsuanyun/` | `https://router.shengsuanyun.com/api/v1` | OpenAI | - | +| **Vivgrid** | `vivgrid/` | `https://api.vivgrid.com/v1` | OpenAI | [Get Key](https://vivgrid.com) | | **Antigravity** | `antigravity/` | Google Cloud | Custom | OAuth only | | **GitHub Copilot** | `github-copilot/` | `localhost:4321` | gRPC | - | diff --git a/docs/migration/model-list-migration.md b/docs/migration/model-list-migration.md index d88e5a32d..0d4af719c 100644 --- a/docs/migration/model-list-migration.md +++ b/docs/migration/model-list-migration.md @@ -102,7 +102,6 @@ The `model` field uses a protocol prefix format: `[protocol/]model-identifier` | `shengsuanyun/` | ShengSuanYun | `shengsuanyun/deepseek-v3` | | `volcengine/` | Volcengine | `volcengine/doubao-pro-32k` | - **Note**: If no prefix is specified, `openai/` is used as the default. ## ModelConfig Fields diff --git a/pkg/providers/factory.go b/pkg/providers/factory.go index 99d58cda3..25916ad03 100644 --- a/pkg/providers/factory.go +++ b/pkg/providers/factory.go @@ -304,7 +304,7 @@ func resolveProviderSelection(cfg *config.Config) (providerSelection, error) { if sel.apiBase == "" { sel.apiBase = "https://integrate.api.nvidia.com/v1" } - case (strings.Contains(lowerModel, "vivgrid") || strings.HasPrefix(model, "vivgrid/")) && cfg.Providers.Vivgrid.APIKey != "": + case strings.HasPrefix(model, "vivgrid/") && cfg.Providers.Vivgrid.APIKey != "": sel.apiKey = cfg.Providers.Vivgrid.APIKey sel.apiBase = cfg.Providers.Vivgrid.APIBase sel.proxy = cfg.Providers.Vivgrid.Proxy