// ABI Hash: 42f4906feaa926f9920a33a61ab5c44b15d27600343e52fddabf3691457a1158 import Foundation import Security import StreamlineFoundation @_exported import StreamlineFoundation import Foundation import Foundation public struct ModelRosterBridge: Sendable { public static let shared = ModelRosterBridge() public init() { fatalError() } public var defaultCustomModesURL: URL { get { fatalError() } } public func loadActiveModels(from url: URL? = nil) throws -> [ActiveModel] { fatalError() } public func parseActiveModels(from yamlContent: String) -> [ActiveModel] { fatalError() } public func parseCurrentValues(slug: String, yamlContent: String) -> ModelPersona { fatalError() } public func regenerateYAML(existingYAML: String, personas: [String: ModelPersona]) -> String { fatalError() } public func saveYAML(_ content: String, to url: URL? = nil) throws { fatalError() } public func sanitizeSlug(_ input: String) -> String { fatalError() } } public struct ActiveModel: Identifiable, Hashable, Sendable, Codable { public let slug: String public let name: String public let modelID: String? public let apiProvider: String? public var id: String { get { fatalError() } } public init( slug: String, name: String, modelID: String? = nil, apiProvider: String? = nil ) { fatalError() } } public struct ModelPersona: Codable, Sendable, Hashable { public let roleDefinition: String public let whenToUse: String public let yamlDescription: String public init( roleDefinition: String, whenToUse: String, yamlDescription: String ) { fatalError() } } public struct OllamaModelFormatDetails: Codable, Sendable, Hashable { public let format: String? public let family: String? public let parameterSize: String? public let quantizationLevel: String? public let families: [String]? public init( format: String? = nil, family: String? = nil, parameterSize: String? = nil, quantizationLevel: String? = nil, families: [String]? = nil ) { fatalError() } enum CodingKeys: String, CodingKey { case format case family case parameterSize = "parameter_size" case quantizationLevel = "quantization_level" case families } } public struct OllamaModelRecord: Codable, Sendable, Identifiable, Hashable { public let name: String public let model: String public let size: Int? public let digest: String? public let modifiedAt: Date? public let details: OllamaModelFormatDetails? public var id: String { get { fatalError() } } public init( name: String, model: String, size: Int? = nil, digest: String? = nil, modifiedAt: Date? = nil, details: OllamaModelFormatDetails? = nil ) { fatalError() } enum CodingKeys: String, CodingKey { case name case model case size case digest case modifiedAt = "modified_at" case details } } public struct OllamaModelDetails: Codable, Sendable { public let details: OllamaModelFormatDetails? public let parameters: String? public let template: String? public let capabilities: [String]? public init( details: OllamaModelFormatDetails? = nil, parameters: String? = nil, template: String? = nil, capabilities: [String]? = nil ) { fatalError() } } public struct OllamaModelOptions: Codable, Sendable { public let numCtx: Int? public let temperature: Double? public let keepAlive: String? public init( numCtx: Int? = 8192, temperature: Double? = nil, keepAlive: String? = "10m" ) { fatalError() } enum CodingKeys: String, CodingKey { case numCtx = "num_ctx" case temperature case keepAlive = "keep_alive" } } public enum OllamaDaemonStatus: Sendable, Codable, Equatable { case online case unauthorizedDevice case subscriptionRequired case quotaExceeded case offline case error(String) public init(from decoder: Decoder) throws { fatalError() } public func encode(to encoder: Encoder) throws { fatalError() } } public enum OllamaServiceError: Error, LocalizedError, Sendable { case daemonUnreachable(String) case unauthorizedDevice case subscriptionRequired case modelNotInstalled(String) case quotaExceeded case insufficientUnifiedMemory case invalidHTTPStatus(Int, String?) case emptyResponse case decodingFailure(String) public var errorDescription: String? { get { fatalError() } } } public actor OllamaService { public static let shared = OllamaService() public init(baseURL: URL? = nil) { fatalError() } public func checkDaemonStatus() async -> OllamaDaemonStatus { fatalError() } public func fetchInstalledModels() async throws -> [OllamaModelRecord] { fatalError() } public func showModelDetails(named modelName: String) async throws -> OllamaModelDetails { fatalError() } public func generateText( systemPrompt: String?, userPrompt: String, model: String, options: OllamaModelOptions? = nil ) async throws -> String { fatalError() } } public actor OpenRouterKeyPool { public static let shared = OpenRouterKeyPool() public enum KeyPoolError: Error, LocalizedError, Sendable { case allKeysExhausted(waitDuration: TimeInterval) case missingCredentials case keychainError(OSStatus) public var errorDescription: String? { get { fatalError() } } } public func nextAvailableToken() async throws -> (account: String, token: String) { fatalError() } public func markCooldown(account: String, duration: TimeInterval) async { fatalError() } public func resetAllCooldowns() async { fatalError() } } public struct OpenRouterModelsResponse: Codable, Sendable { public let data: [OpenRouterModel] = [] public init(data: [OpenRouterModel]) { fatalError() } } public struct OpenRouterModel: Codable, Identifiable, Sendable { public let id: String = "" public let name: String? = nil public let description: String? = nil public let contextLength: Int = 0 public let pricing: Pricing = .init(prompt: "", completion: "") public let architecture: Architecture? = nil public let artificial_analysis: ArtificialAnalysis? = nil public let reasoning: Reasoning? = nil public let benchmarks: Benchmarks? = nil public var isFree: Bool { fatalError() } public init(id: String, name: String? = nil, description: String? = nil, contextLength: Int, pricing: Pricing, architecture: Architecture? = nil, artificial_analysis: ArtificialAnalysis? = nil, reasoning: Reasoning? = nil, benchmarks: Benchmarks? = nil) { fatalError() } } extension OpenRouterModel { public struct Pricing: Codable, Sendable { public let prompt: String = "" public let completion: String = "" public init(prompt: String, completion: String) { fatalError() } } public struct Architecture: Codable, Sendable { public let modality: String? = nil public init(modality: String?) { fatalError() } } public struct ArtificialAnalysis: Codable, Sendable { public let intelligence_index: Double? = 0 public let coding_index: Double? = 0 public let agentic_index: Double? = 0 public init(intelligence_index: Double?, coding_index: Double?, agentic_index: Double?) { fatalError() } } public struct Reasoning: Codable, Sendable { public let mandatory: Bool? = false public let supported_efforts: [String]? = [] public init(mandatory: Bool?, supported_efforts: [String]?) { fatalError() } } public struct DesignArena: Codable, Sendable { public let category: String? = nil public let elo: Double? = 0 public init(category: String?, elo: Double?) { fatalError() } } public struct Benchmarks: Codable, Sendable { public let design_arena: [DesignArena]? = [] public init(design_arena: [DesignArena]?) { fatalError() } } } public struct OpenRouterChatCompletionRequest: Codable, Sendable { public let model: String = "" public let messages: [Message] = [] public init(model: String, messages: [Message]) { fatalError() } } extension OpenRouterChatCompletionRequest { public struct Message: Codable, Sendable { public let role: String = "" public let content: String = "" public init(role: String, content: String) { fatalError() } } } public struct OpenRouterChatCompletionResponse: Codable, Sendable { public let choices: [Choice] = [] public init(choices: [Choice]) { fatalError() } } extension OpenRouterChatCompletionResponse { public struct Choice: Codable, Sendable { public let message: Message = .init(content: "") public init(message: Message) { fatalError() } } public struct Message: Codable, Sendable { public let content: String = "" public init(content: String) { fatalError() } } } public struct OpenRouterCreditsResponse: Codable, Sendable { public let data: Data = .init(total_usage: 0, total_credits: 0) public init(data: Data) { fatalError() } } extension OpenRouterCreditsResponse { public struct Data: Codable, Sendable { public let total_usage: Decimal = 0 public let total_credits: Decimal? = 0 public init(total_usage: Decimal, total_credits: Decimal?) { fatalError() } } } public struct OpenRouterKeyDetailsResponse: Codable, Sendable { public let data: Data = .init(usage: 0, limit: 0) public init(data: Data) { fatalError() } } extension OpenRouterKeyDetailsResponse { public struct Data: Codable, Sendable { public let usage: Decimal = 0 public let limit: Decimal? = 0 public init(usage: Decimal, limit: Decimal?) { fatalError() } } } public struct GenerationResult: Codable, Sendable, Hashable { public let text: String = "" public let account: String = "" public let duration: Double = 0 public let model: String = "" public init(text: String, account: String, duration: Double, model: String) { fatalError() } } public enum OpenRouterServiceError: Error, LocalizedError, Sendable { case invalidResponse case transportFailure(String) case httpFailure(statusCode: Int, responseBody: String?) case decodingFailure(String) case emptyChatCompletionChoices public var errorDescription: String? { fatalError() } } public struct OpenRouterService: Sendable { public static let shared = OpenRouterService() public init() { fatalError() } public func fetchModels(token: String) async throws -> [OpenRouterModel] { fatalError() } public func fetchCredits(token: String) async throws -> OpenRouterCreditsResponse.Data { fatalError() } public func fetchKeyDetails(token: String) async throws -> OpenRouterKeyDetailsResponse.Data { fatalError() } public func generateText( systemPrompt: String, userPrompt: String, model: String, token: String ) async throws -> String { fatalError() } public static func resolvedStubModel() -> String { fatalError() } public func generateText( systemPrompt: String?, userPrompt: String, model: String? = nil ) async throws -> String { fatalError() } public func generate( systemPrompt: String?, userPrompt: String, model: String? = nil, tag: String? = nil ) async throws -> GenerationResult { fatalError() } }