From e58ae44d26a26d38150ced1ac09f69a589d96f49 Mon Sep 17 00:00:00 2001 From: "paul@buetow.org" Date: Fri, 6 Feb 2026 16:35:45 +0200 Subject: Remove GitHub Copilot provider support Remove all GitHub Copilot integration from the codebase to streamline the supported provider set to OpenAI, OpenRouter, Anthropic, and Ollama. Changes: - Delete core Copilot implementation (copilot.go) and all related tests - Remove Copilot configuration fields from App struct and Config - Remove Copilot from provider factory and API key handling - Update all test files to replace Copilot references with other providers - Remove Copilot documentation from README, configuration guide, and examples - Remove Copilot section from config.toml.example All tests pass successfully after removal. Co-authored-by: Cursor --- internal/hexaiaction/prompts.go | 4 ++-- internal/hexaiaction/prompts_more_test.go | 4 ++-- internal/hexaiaction/run_more_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'internal/hexaiaction') diff --git a/internal/hexaiaction/prompts.go b/internal/hexaiaction/prompts.go index a113391..fc743a0 100644 --- a/internal/hexaiaction/prompts.go +++ b/internal/hexaiaction/prompts.go @@ -49,8 +49,8 @@ func defaultModelForProvider(cfg appconfig.App, provider string) string { switch provider { case "ollama": return cfg.OllamaModel - case "copilot": - return cfg.CopilotModel + case "anthropic": + return cfg.AnthropicModel default: return cfg.OpenAIModel } diff --git a/internal/hexaiaction/prompts_more_test.go b/internal/hexaiaction/prompts_more_test.go index cfccd0c..a4410e5 100644 --- a/internal/hexaiaction/prompts_more_test.go +++ b/internal/hexaiaction/prompts_more_test.go @@ -35,8 +35,8 @@ func TestReqOptsFrom_Override(t *testing.T) { cfg := appconfig.App{ MaxTokens: 123, Provider: "openai", - CopilotModel: "gpt-4o", - CodeActionConfigs: []appconfig.SurfaceConfig{{Provider: "copilot", Model: "override", Temperature: ptrFloat(0.6)}}, + AnthropicModel: "claude-3-5-sonnet", + CodeActionConfigs: []appconfig.SurfaceConfig{{Provider: "anthropic", Model: "override", Temperature: ptrFloat(0.6)}}, } req := reqOptsFrom(cfg) if req.model != "override" { diff --git a/internal/hexaiaction/run_more_test.go b/internal/hexaiaction/run_more_test.go index a3e7f25..57bd933 100644 --- a/internal/hexaiaction/run_more_test.go +++ b/internal/hexaiaction/run_more_test.go @@ -14,7 +14,7 @@ import ( // Covers the early error path in Run when no API key is available for the default provider. func TestRun_MissingAPIKey(t *testing.T) { // Ensure no provider API keys in env - for _, k := range []string{"HEXAI_OPENAI_API_KEY", "OPENAI_API_KEY", "HEXAI_COPILOT_API_KEY", "COPILOT_API_KEY"} { + for _, k := range []string{"HEXAI_OPENAI_API_KEY", "OPENAI_API_KEY"} { t.Setenv(k, "") } // Provide minimal stdin to get past empty input check (if reached) -- cgit v1.2.3