From fbfbc3311e7c5beee35f430a443866bc30cf595f Mon Sep 17 00:00:00 2001 From: "paul@buetow.org" Date: Fri, 6 Feb 2026 16:15:29 +0200 Subject: fix: add missing Anthropic and OpenRouter provider support in config and LSP - Add Anthropic field merging in config.mergeProviderFields() to properly load AnthropicModel/BaseURL/Temperature from config.toml - Add anthropic and openrouter cases in lsp.resolveDefaultModel() to prevent fallback to OpenAI defaults - Update default Anthropic model to valid claude-3-5-sonnet-20240620 (previous 20241022 doesn't exist) - Update test expectation to match new default model This fixes the issue where Anthropic provider configuration was ignored, causing LSP to return dummy completions instead of real LLM responses. Co-authored-by: Cursor --- internal/appconfig/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'internal/appconfig/config.go') diff --git a/internal/appconfig/config.go b/internal/appconfig/config.go index b17c5d4..c9af85e 100644 --- a/internal/appconfig/config.go +++ b/internal/appconfig/config.go @@ -1112,6 +1112,15 @@ func (a *App) mergeProviderFields(other *App) { if other.CopilotTemperature != nil { // allow explicit 0.0 a.CopilotTemperature = other.CopilotTemperature } + if s := strings.TrimSpace(other.AnthropicBaseURL); s != "" { + a.AnthropicBaseURL = s + } + if s := strings.TrimSpace(other.AnthropicModel); s != "" { + a.AnthropicModel = s + } + if other.AnthropicTemperature != nil { // allow explicit 0.0 + a.AnthropicTemperature = other.AnthropicTemperature + } } func getConfigPath() (string, error) { -- cgit v1.2.3