Added skills, shortcuts, and bugifixes++
This commit is contained in:
@@ -36,15 +36,11 @@ class ProviderRegistry {
|
||||
provider = OpenRouterProvider(apiKey: apiKey)
|
||||
|
||||
case .anthropic:
|
||||
if AnthropicOAuthService.shared.isAuthenticated {
|
||||
// OAuth (Pro/Max subscription) takes precedence
|
||||
provider = AnthropicProvider(oauth: true)
|
||||
} else if let apiKey = settings.anthropicAPIKey, !apiKey.isEmpty {
|
||||
provider = AnthropicProvider(apiKey: apiKey)
|
||||
} else {
|
||||
Log.api.warning("No API key or OAuth configured for Anthropic")
|
||||
guard let apiKey = settings.anthropicAPIKey, !apiKey.isEmpty else {
|
||||
Log.api.warning("No API key configured for Anthropic")
|
||||
return nil
|
||||
}
|
||||
provider = AnthropicProvider(apiKey: apiKey)
|
||||
|
||||
case .openai:
|
||||
guard let apiKey = settings.openaiAPIKey, !apiKey.isEmpty else {
|
||||
|
||||
Reference in New Issue
Block a user