diff options
| author | Paul Buetow <paul@buetow.org> | 2026-02-06 23:24:25 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-02-06 23:24:25 +0200 |
| commit | e30c3c82fc270db7559ac44feb0950bdd4c72a92 (patch) | |
| tree | 38ad18ad7de669adcd01d5de7c4472aefd238bf1 /internal/llm/provider.go | |
| parent | 0176d2dd4ddce82e9752c2f3ca4023a1c82b221e (diff) | |
| parent | 7c34c494bf1c6185f5a936e015eef76793703acd (diff) | |
Merge branch 'main' of codeberg.org:snonux/hexai
Diffstat (limited to 'internal/llm/provider.go')
| -rw-r--r-- | internal/llm/provider.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/internal/llm/provider.go b/internal/llm/provider.go index 297f1f3..8230b53 100644 --- a/internal/llm/provider.go +++ b/internal/llm/provider.go @@ -78,10 +78,6 @@ type Config struct { OllamaBaseURL string OllamaModel string OllamaTemperature *float64 - // Copilot options - CopilotBaseURL string - CopilotModel string - CopilotTemperature *float64 // Anthropic options AnthropicBaseURL string AnthropicModel string @@ -91,7 +87,7 @@ type Config struct { // NewFromConfig creates an LLM client using only the supplied configuration. // The OpenAI API key is supplied separately and may be read from the environment // by the caller; other environment-based configuration is not used. -func NewFromConfig(cfg Config, openAIAPIKey, openRouterAPIKey, copilotAPIKey, anthropicAPIKey string) (Client, error) { +func NewFromConfig(cfg Config, openAIAPIKey, openRouterAPIKey, anthropicAPIKey string) (Client, error) { p := strings.ToLower(strings.TrimSpace(cfg.Provider)) if p == "" { p = "openai" @@ -136,15 +132,6 @@ func NewFromConfig(cfg Config, openAIAPIKey, openRouterAPIKey, copilotAPIKey, an cfg.OllamaTemperature = &t } return newOllamaWithTimeout(cfg.OllamaBaseURL, cfg.OllamaModel, cfg.OllamaTemperature, cfg.RequestTimeout), nil - case "copilot": - if strings.TrimSpace(copilotAPIKey) == "" { - return nil, errors.New("missing COPILOT_API_KEY for provider copilot") - } - if cfg.CopilotTemperature == nil { - t := 0.2 - cfg.CopilotTemperature = &t - } - return newCopilotWithTimeout(cfg.CopilotBaseURL, cfg.CopilotModel, copilotAPIKey, cfg.CopilotTemperature, cfg.RequestTimeout), nil case "anthropic": if strings.TrimSpace(anthropicAPIKey) == "" { return nil, errors.New("missing ANTHROPIC_API_KEY for provider anthropic") |
