summaryrefslogtreecommitdiff
path: root/internal/hexaicli
diff options
context:
space:
mode:
authorpaul@buetow.org <paul@buetow.org>2026-02-06 16:35:45 +0200
committerpaul@buetow.org <paul@buetow.org>2026-02-06 16:35:45 +0200
commit12a249282d5dd9dc2ee1e66f08d6acc26dd29eba (patch)
tree5e9ae4fbd1696d1b668dfe0be791004a87fc7a6a /internal/hexaicli
parent89dc2aab0b6be2620766a4b4b750fa888641b89d (diff)
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 <cursoragent@cursor.com>
Diffstat (limited to 'internal/hexaicli')
-rw-r--r--internal/hexaicli/run.go8
-rw-r--r--internal/hexaicli/run_test.go20
-rw-r--r--internal/hexaicli/testhelpers_test.go1
3 files changed, 12 insertions, 17 deletions
diff --git a/internal/hexaicli/run.go b/internal/hexaicli/run.go
index 7b360e9..9ea3a40 100644
--- a/internal/hexaicli/run.go
+++ b/internal/hexaicli/run.go
@@ -77,10 +77,6 @@ func buildCLIJobs(cfg appconfig.App) ([]cliJob, error) {
if entry.Model != "" {
derived.OpenAIModel = entry.Model
}
- case "copilot":
- if entry.Model != "" {
- derived.CopilotModel = entry.Model
- }
case "ollama":
if entry.Model != "" {
derived.OllamaModel = entry.Model
@@ -151,8 +147,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/hexaicli/run_test.go b/internal/hexaicli/run_test.go
index 43576cf..34a5c51 100644
--- a/internal/hexaicli/run_test.go
+++ b/internal/hexaicli/run_test.go
@@ -161,11 +161,11 @@ func TestPrintProviderInfo(t *testing.T) {
func TestBuildCLIRequest_Override(t *testing.T) {
cfg := appconfig.App{
- Provider: "openai",
- CopilotModel: "gpt-4o",
+ Provider: "openai",
+ AnthropicModel: "claude-3-5-sonnet",
}
- entry := appconfig.SurfaceConfig{Provider: "copilot", Model: "override", Temperature: floatPtr(0.7)}
- req := buildCLIRequest(entry, "copilot", cfg, &fakeClient{name: "copilot", model: "default"})
+ entry := appconfig.SurfaceConfig{Provider: "anthropic", Model: "override", Temperature: floatPtr(0.7)}
+ req := buildCLIRequest(entry, "anthropic", cfg, &fakeClient{name: "anthropic", model: "default"})
if req.model != "override" {
t.Fatalf("expected model override, got %q", req.model)
}
@@ -199,8 +199,8 @@ func TestBuildCLIJobs_MultiEntries(t *testing.T) {
defer func() { newClientFromApp = old }()
newClientFromApp = func(cfg appconfig.App) (llm.Client, error) {
model := cfg.OpenAIModel
- if cfg.Provider == "copilot" {
- model = cfg.CopilotModel
+ if cfg.Provider == "anthropic" {
+ model = cfg.AnthropicModel
}
if cfg.Provider == "ollama" {
model = cfg.OllamaModel
@@ -215,7 +215,7 @@ func TestBuildCLIJobs_MultiEntries(t *testing.T) {
OllamaModel: "llama3",
CLIConfigs: []appconfig.SurfaceConfig{
{Provider: "openai", Model: "gpt-4o"},
- {Provider: "copilot", Model: "cpt"},
+ {Provider: "anthropic", Model: "claude"},
},
}
jobs, err := buildCLIJobs(cfg)
@@ -228,18 +228,18 @@ func TestBuildCLIJobs_MultiEntries(t *testing.T) {
if jobs[0].provider != "openai" || jobs[0].req.model != "gpt-4o" {
t.Fatalf("unexpected first job: %+v", jobs[0])
}
- if jobs[1].provider != "copilot" || jobs[1].req.model != "cpt" {
+ if jobs[1].provider != "anthropic" || jobs[1].req.model != "claude" {
t.Fatalf("unexpected second job: %+v", jobs[1])
}
}
func TestFilterJobsBySelection(t *testing.T) {
- jobs := []cliJob{{index: 0, provider: "openai"}, {index: 1, provider: "ollama"}, {index: 2, provider: "copilot"}}
+ jobs := []cliJob{{index: 0, provider: "openai"}, {index: 1, provider: "ollama"}, {index: 2, provider: "anthropic"}}
filtered, err := filterJobsBySelection(jobs, []int{2, 0})
if err != nil {
t.Fatalf("unexpected error: %v", err)
}
- if len(filtered) != 2 || filtered[0].provider != "copilot" || filtered[1].provider != "openai" {
+ if len(filtered) != 2 || filtered[0].provider != "anthropic" || filtered[1].provider != "openai" {
t.Fatalf("unexpected filtered order: %+v", filtered)
}
if filtered[0].index != 0 || filtered[1].index != 1 {
diff --git a/internal/hexaicli/testhelpers_test.go b/internal/hexaicli/testhelpers_test.go
index 8f6863d..3197880 100644
--- a/internal/hexaicli/testhelpers_test.go
+++ b/internal/hexaicli/testhelpers_test.go
@@ -63,7 +63,6 @@ func (s *fakeStreamer) ChatStream(ctx context.Context, messages []llm.Message, o
return nil
}
-
func writeConfigString(t *testing.T, path string, contents string) {
t.Helper()
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {