diff --git a/internal/llm/provider/anthropic.go b/internal/llm/provider/anthropic.go index d7f678a9b82932356d15e423fe362aab15d521a8..40d33e12cc4a1893c006d1e62c9c522fdf1ee3c4 100644 --- a/internal/llm/provider/anthropic.go +++ b/internal/llm/provider/anthropic.go @@ -79,6 +79,10 @@ func createAnthropicClient(opts providerClientOptions, tp AnthropicClientType) a slog.Debug("Skipping X-Api-Key header because Authorization header is provided") } + if opts.baseURL != "" { + anthropicClientOptions = append(anthropicClientOptions, option.WithBaseURL(opts.baseURL)) + } + if config.Get().Options.Debug { httpClient := log.NewHTTPClient() anthropicClientOptions = append(anthropicClientOptions, option.WithHTTPClient(httpClient))