feat:add github_copilot to providers factory

This commit is contained in:
Lixeer
2026-02-15 06:10:00 +08:00
parent 5faa67b77d
commit 0aab8d8afc

View File

@@ -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