From 0aab8d8afcb69659c663dbcbff2fd0ec77cb4208 Mon Sep 17 00:00:00 2001 From: Lixeer <1612655510@qq.com> Date: Sun, 15 Feb 2026 06:10:00 +0800 Subject: [PATCH] feat:add `github_copilot` to providers factory --- pkg/providers/http_provider.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pkg/providers/http_provider.go b/pkg/providers/http_provider.go index 6fcbd30..013f787 100644 --- a/pkg/providers/http_provider.go +++ b/pkg/providers/http_provider.go @@ -314,7 +314,17 @@ func CreateProvider(cfg *config.Config) (LLMProvider, error) { model = "deepseek-chat" } } + case "github_copilot", "copilot": + if cfg.Providers.GitHubCopilot.APIBase != "" { + apiBase = cfg.Providers.GitHubCopilot.APIBase + }else { + apiBase = "localhost:4321" // no `http://` beacause grpc mode` + } + return NewGitHubCopilotProvider(apiBase, cfg.Providers.GitHubCopilot.ConnectMode, model), nil + } + + } // Fallback: detect provider from model name