Public declaration syntax from forge-swift/Sources/ForgeCore/Routing.swift Original source SHA-256: 9c9235156e18c33ed42e76e41305698885f2b07fbb0df0c61f0c2d410d22e62c Function bodies and constant values are omitted. This is not the complete implementation. Source line 20 public enum TaskMode: String, Codable, Sendable, Hashable, CaseIterable Source line 31 public var roleName: String Source line 40 public enum ExecutionTopology: String, Codable, Sendable, Hashable, CaseIterable Source line 57 public struct RoutingContext: Codable, Sendable Source line 59 public var domain: String? /// The task mode for this call. public var taskMode: TaskMode? /// The execution topology for this call. public var executionTopology: ExecutionTopology? /// Tool capabilities required for the model selected by this route. public var toolRequirements: [String] /// Explicit role override. When set, the router returns the slot with /// this role name without applying strategy logic. public var roleOverride: String? public init( domain: String?; Source line 62 public var taskMode: TaskMode? /// The execution topology for this call. public var executionTopology: ExecutionTopology? /// Tool capabilities required for the model selected by this route. public var toolRequirements: [String] /// Explicit role override. When set, the router returns the slot with /// this role name without applying strategy logic. public var roleOverride: String? public init( domain: String?; Source line 65 public var executionTopology: ExecutionTopology? /// Tool capabilities required for the model selected by this route. public var toolRequirements: [String] /// Explicit role override. When set, the router returns the slot with /// this role name without applying strategy logic. public var roleOverride: String? public init( domain: String?; Source line 68 public var toolRequirements: [String] /// Explicit role override. When set, the router returns the slot with /// this role name without applying strategy logic. public var roleOverride: String? public init( domain: String?; Source line 72 public var roleOverride: String? public init( domain: String?; Source line 74 public init( domain: String?; Source line 102 public struct ModelCapabilities: Codable, Sendable Source line 104 public var textGeneration: Bool /// Whether the model supports structured output (JSON mode). public var structuredOutput: Bool /// Whether the model supports tool calling. public var toolCalling: Bool /// Whether the model supports vision (image input). public var vision: Bool /// Whether the model supports audio input/output. public var audio: Bool /// Whether the model supports embedding generation. public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 106 public var structuredOutput: Bool /// Whether the model supports tool calling. public var toolCalling: Bool /// Whether the model supports vision (image input). public var vision: Bool /// Whether the model supports audio input/output. public var audio: Bool /// Whether the model supports embedding generation. public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 108 public var toolCalling: Bool /// Whether the model supports vision (image input). public var vision: Bool /// Whether the model supports audio input/output. public var audio: Bool /// Whether the model supports embedding generation. public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 110 public var vision: Bool /// Whether the model supports audio input/output. public var audio: Bool /// Whether the model supports embedding generation. public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 112 public var audio: Bool /// Whether the model supports embedding generation. public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 114 public var embedding: Bool /// Maximum number of tokens in the context window. public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 116 public var maxContextTokens: UInt32 /// Maximum number of tokens the model can generate in a single response. public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 118 public var maxOutputTokens: UInt32 public init( textGeneration: Bool; Source line 120 public init( textGeneration: Bool; Source line 155 public struct ResolvedRoute: Codable, Sendable Source line 157 public let slotRole: String /// The specific `ProviderRef` to use (primary or one of the fallbacks). public let provider: ProviderRef /// The model capabilities of the selected provider. public let modelCapabilities: ModelCapabilities /// Whether a fallback model was selected instead of the primary. public let fallbackUsed: Bool public init( slotRole: String, provider: ProviderRef, modelCapabilities: ModelCapabilities; Source line 160 public let provider: ProviderRef /// The model capabilities of the selected provider. public let modelCapabilities: ModelCapabilities /// Whether a fallback model was selected instead of the primary. public let fallbackUsed: Bool public init( slotRole: String, provider: ProviderRef, modelCapabilities: ModelCapabilities; Source line 163 public let modelCapabilities: ModelCapabilities /// Whether a fallback model was selected instead of the primary. public let fallbackUsed: Bool public init( slotRole: String, provider: ProviderRef, modelCapabilities: ModelCapabilities; Source line 166 public let fallbackUsed: Bool public init( slotRole: String, provider: ProviderRef, modelCapabilities: ModelCapabilities; Source line 168 public init( slotRole: String, provider: ProviderRef, modelCapabilities: ModelCapabilities; Source line 196 public protocol ModelRouter: Sendable Source line 221 public struct DefaultModelRouter: ModelRouter, Sendable Source line 222 public let name: String; Source line 224 public init() Source line 226 public func route(context: RoutingContext, topology: ModelTopology) throws -> ResolvedRoute