SPB Git

spb/zyquo-atlas Public License

The AI-native macOS web browser — every surface, intelligent.

Swift 75.2% JavaScript 22% Shell 2% Makefile 0.9%
967 B · 35 lines swift
Raw Blame History
1//2//  ProviderRegistry.swift3//  Zyquo Atlas4//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