feat: support Anthropic base url option (#702)

Tony Wang created

Change summary

internal/llm/provider/anthropic.go | 4 ++++
1 file changed, 4 insertions(+)

Detailed changes

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))