spb/zyquo-cloud Public MIT
Native macOS AI chat client for 12 cloud providers — your keys, every cloud model, one beautiful chat.
Swift 97.4%
Shell 1.7%
Makefile 1%
1//2// ProviderRegistry.swift3// Zyquo Cloud4//5// Author: Simon-Pierre Boucher6// Mail: contact@spboucher.ai7//89import Foundation1011/// Resolves the right client for a provider or custom model. The only place12/// that knows which wire format each provider speaks.13enum ProviderRegistry {14 static func client(for model: AIModel) -> ProviderClient {15 switch model.provider.wireFormat {16 case .anthropicMessages:17 return AnthropicClient()18 case .openAIChatCompletions:19 return OpenAICompatibleClient(20 provider: model.provider,21 baseURLOverride: model.customBaseURL22 )23 }24 }2526 static func client(for provider: ProviderID) -> ProviderClient {27 switch provider.wireFormat {28 case .anthropicMessages:29 return AnthropicClient()30 case .openAIChatCompletions:31 return OpenAICompatibleClient(provider: provider)32 }33 }34}35