Add Azure Anthropic support

This commit is contained in:
2026-03-01 19:00:03 +00:00
parent 88fe79e457
commit b5f21f385a
4 changed files with 57 additions and 6 deletions

View File

@@ -31,7 +31,9 @@ func NewRegistry(cfg config.ProvidersConfig) (*Registry, error) {
if cfg.Google.APIKey != "" {
reg.providers[googleprovider.Name] = googleprovider.New(cfg.Google)
}
if cfg.Anthropic.APIKey != "" {
if cfg.AzureAnthropic.APIKey != "" && cfg.AzureAnthropic.Endpoint != "" {
reg.providers[anthropicprovider.Name] = anthropicprovider.NewAzure(cfg.AzureAnthropic)
} else if cfg.Anthropic.APIKey != "" {
reg.providers[anthropicprovider.Name] = anthropicprovider.New(cfg.Anthropic)
}
if cfg.AzureOpenAI.APIKey != "" && cfg.AzureOpenAI.Endpoint != "" {