The Swift Package Index logo.Swift Package Index

Build Information

Failed to build swift-ai-sdk, reference main (d8d108), with Swift 6.3 for Wasm on 13 Aug 2026 01:21:15 UTC.

Build Command

bash -c docker run --pull=always --rm -v "checkouts-53886770-0":/host -w "$PWD" -e JAVA_HOME="/root/.sdkman/candidates/java/current" -e SPI_BUILD="1" -e SPI_PROCESSING="1" registry.gitlab.com/saguaro1/spi-images:wasm-6.3-latest swift build --swift-sdk swift-6.3.2-RELEASE_wasm 2>&1

Build Log

219 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
220 |
221 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |     ) {
228 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:35: error: value of type '_' expected to be instance of class or class-constrained type
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
227 |     ) {
228 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 |     ) {
228 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:247:67: error: cannot find type 'URLRequest' in scope
245 |     }
246 |
247 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
248 |         var utterance: [String: JSONValue] = ["text": .string(request.text)]
249 |         if let voice = request.voice {
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:219:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'HumeSpeechModel' has non-Sendable type 'AnyObject'
217 |     private let baseURL: URL
218 |     private let headers: [String: String]
219 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'HumeSpeechModel' has non-Sendable type 'AnyObject'
220 |
221 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:282:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |     private let baseURL: URL
281 |     private let headers: [String: String]
282 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 |
284 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     ) {
291 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:35: error: value of type '_' expected to be instance of class or class-constrained type
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
290 |     ) {
291 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
290 |     ) {
291 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:306:67: error: cannot find type 'URLRequest' in scope
304 |     }
305 |
306 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
307 |         var components = URLComponents(
308 |             url: baseURL.appendingPathComponent("v1/speak"), resolvingAgainstBaseURL: false
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:282:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramSpeechModel' has non-Sendable type 'AnyObject'
280 |     private let baseURL: URL
281 |     private let headers: [String: String]
282 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramSpeechModel' has non-Sendable type 'AnyObject'
283 |
284 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:30:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 28 |
 29 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
 30 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 31 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 32 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:53:26: error: cannot find 'URLRequest' in scope
 51 |         }
 52 |
 53 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("v1/ai/speech/bytes"))
    |                          `- error: cannot find 'URLRequest' in scope
 54 |         urlRequest.httpMethod = "POST"
 55 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "x-api-key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:90:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 88 |
 89 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
 90 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 91 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 92 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:130:26: error: cannot find 'URLRequest' in scope
128 |         }
129 |
130 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("text-to-speech"))
    |                          `- error: cannot find 'URLRequest' in scope
131 |         urlRequest.httpMethod = "POST"
132 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "api-subscription-key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:167:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
165 |
166 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
167 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
168 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
169 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:171:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
169 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
170 |         }
171 |         let mediaType = (response as? HTTPURLResponse)?.mimeType
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
172 |             ?? Self.mediaType(for: request.outputFormat)
173 |         return SpeechModelResponse(audio: data, mediaType: mediaType)
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:200:26: error: cannot find 'URLRequest' in scope
198 |         }
199 |
200 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("tts"))
    |                          `- error: cannot find 'URLRequest' in scope
201 |         urlRequest.httpMethod = "POST"
202 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:236:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
234 |
235 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
236 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
237 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
238 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:265:26: error: cannot find 'URLRequest' in scope
263 |         }
264 |
265 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("v0/tts/file"))
    |                          `- error: cannot find 'URLRequest' in scope
266 |         urlRequest.httpMethod = "POST"
267 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "X-Hume-Api-Key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:299:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
297 |
298 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
299 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
300 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
301 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:312:26: error: cannot find 'URLRequest' in scope
310 |         components.queryItems = [URLQueryItem(name: "model", value: modelID)]
311 |
312 |         var urlRequest = URLRequest(url: components.url!)
    |                          `- error: cannot find 'URLRequest' in scope
313 |         urlRequest.httpMethod = "POST"
314 |         urlRequest.setValue("Token \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:35: error: value of type '_' expected to be instance of class or class-constrained type
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:54: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                      `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:68: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                                    `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:68: error: value of type '_' expected to be instance of class or class-constrained type
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                                    `- error: value of type '_' expected to be instance of class or class-constrained type
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 16 |     let baseURL: URL
 17 |     let headers: [String: String]
 18 |     let urlSession: URLSession
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 19 |
 20 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 26 |     ) {
 27 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 26 |     ) {
 27 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:35: error: value of type '_' expected to be instance of class or class-constrained type
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 26 |     ) {
 27 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:58:67: error: cannot find type 'URLRequest' in scope
 56 |     }
 57 |
 58 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
 59 |         var components = URLComponents(
 60 |             url: baseURL.appendingPathComponent("v1/listen"), resolvingAgainstBaseURL: false
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:18:9: error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramTranscriptionModel' has non-Sendable type 'AnyObject'
 16 |     let baseURL: URL
 17 |     let headers: [String: String]
 18 |     let urlSession: URLSession
    |         `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramTranscriptionModel' has non-Sendable type 'AnyObject'
 19 |
 20 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:84:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |     private let baseURL: URL
 83 |     private let headers: [String: String]
 84 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 85 |
 86 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 92 |     ) {
 93 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 92 |     ) {
 93 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:35: error: value of type '_' expected to be instance of class or class-constrained type
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 92 |     ) {
 93 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:112:67: error: cannot find type 'URLRequest' in scope
110 |     }
111 |
112 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
113 |         var form = MultipartForm(boundary: "swift-ai-sdk-sarvam")
114 |         form.addField(name: "model", value: modelID)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:84:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamTranscriptionModel' has non-Sendable type 'AnyObject'
 82 |     private let baseURL: URL
 83 |     private let headers: [String: String]
 84 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamTranscriptionModel' has non-Sendable type 'AnyObject'
 85 |
 86 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:157:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |     private let baseURL: URL
156 |     private let headers: [String: String]
157 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |
159 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     ) {
166 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:35: error: value of type '_' expected to be instance of class or class-constrained type
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
165 |     ) {
166 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |     ) {
166 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:198:67: error: cannot find type 'URLRequest' in scope
196 |     }
197 |
198 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
199 |         var form = MultipartForm(boundary: "swift-ai-sdk-xai-stt")
200 |         form.addField(name: "model", value: modelID)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:157:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiTranscriptionModel' has non-Sendable type 'AnyObject'
155 |     private let baseURL: URL
156 |     private let headers: [String: String]
157 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiTranscriptionModel' has non-Sendable type 'AnyObject'
158 |
159 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:238:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
236 |     private let baseURL: URL
237 |     private let headers: [String: String]
238 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |     private let pollInterval: TimeInterval
240 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 |     ) {
251 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
250 |     ) {
251 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:35: error: value of type '_' expected to be instance of class or class-constrained type
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
250 |     ) {
251 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:238:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AssemblyAITranscriptionModel' has non-Sendable type 'AnyObject'
236 |     private let baseURL: URL
237 |     private let headers: [String: String]
238 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AssemblyAITranscriptionModel' has non-Sendable type 'AnyObject'
239 |     private let pollInterval: TimeInterval
240 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:340:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 |     private let baseURL: URL
339 |     private let headers: [String: String]
340 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
341 |     private let pollInterval: TimeInterval
342 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
352 |     ) {
353 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
352 |     ) {
353 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:35: error: value of type '_' expected to be instance of class or class-constrained type
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
352 |     ) {
353 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:340:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'RevAITranscriptionModel' has non-Sendable type 'AnyObject'
338 |     private let baseURL: URL
339 |     private let headers: [String: String]
340 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'RevAITranscriptionModel' has non-Sendable type 'AnyObject'
341 |     private let pollInterval: TimeInterval
342 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:445:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
443 |     private let baseURL: URL
444 |     private let headers: [String: String]
445 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
446 |     private let pollInterval: TimeInterval
447 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
457 |     ) {
458 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:35: error: value of type '_' expected to be instance of class or class-constrained type
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
457 |     ) {
458 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
457 |     ) {
458 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:445:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'GladiaTranscriptionModel' has non-Sendable type 'AnyObject'
443 |     private let baseURL: URL
444 |     private let headers: [String: String]
445 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'GladiaTranscriptionModel' has non-Sendable type 'AnyObject'
446 |     private let pollInterval: TimeInterval
447 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:35:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 33 |
 34 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
 35 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 36 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 37 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:67:26: error: cannot find 'URLRequest' in scope
 65 |         ]
 66 |
 67 |         var urlRequest = URLRequest(url: components.url!)
    |                          `- error: cannot find 'URLRequest' in scope
 68 |         urlRequest.httpMethod = "POST"
 69 |         urlRequest.setValue("Token \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:101:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 99 |
100 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
101 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
102 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
103 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:129:26: error: cannot find 'URLRequest' in scope
127 |         )
128 |
129 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("speech-to-text"))
    |                          `- error: cannot find 'URLRequest' in scope
130 |         urlRequest.httpMethod = "POST"
131 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "api-subscription-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:174:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
172 |
173 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
174 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
175 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
176 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:217:26: error: cannot find 'URLRequest' in scope
215 |         )
216 |
217 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("stt"))
    |                          `- error: cannot find 'URLRequest' in scope
218 |         urlRequest.httpMethod = "POST"
219 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:261:22: error: cannot find 'URLRequest' in scope
259 |
260 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
261 |         var upload = URLRequest(url: baseURL.appendingPathComponent("v2/upload"))
    |                      `- error: cannot find 'URLRequest' in scope
262 |         upload.httpMethod = "POST"
263 |         upload.setValue(apiKey, forHTTPHeaderField: "authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:266:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
264 |         upload.setValue("application/octet-stream", forHTTPHeaderField: "content-type")
265 |         upload.httpBody = request.audio
266 |         let (uploadData, uploadResponse) = try await urlSession.data(for: upload)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
267 |         if let http = uploadResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
268 |             throw AIError.http(status: http.statusCode, body: String(decoding: uploadData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:273:22: error: cannot find 'URLRequest' in scope
271 |         else { throw AIError.decoding("AssemblyAI upload returned no upload_url") }
272 |
273 |         var create = URLRequest(url: baseURL.appendingPathComponent("v2/transcript"))
    |                      `- error: cannot find 'URLRequest' in scope
274 |         create.httpMethod = "POST"
275 |         create.setValue(apiKey, forHTTPHeaderField: "authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:285:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
283 |         }
284 |         create.httpBody = try JSONEncoder().encode(JSONValue.object(body))
285 |         let (createData, createResponse) = try await urlSession.data(for: create)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
286 |         if let http = createResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
287 |             throw AIError.http(status: http.statusCode, body: String(decoding: createData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:298:24: error: cannot find 'URLRequest' in scope
296 |                 throw AIError.transport("AssemblyAI transcription timed out")
297 |             }
298 |             var poll = URLRequest(url: baseURL.appendingPathComponent("v2/transcript/\(jobID)"))
    |                        `- error: cannot find 'URLRequest' in scope
299 |             poll.setValue(apiKey, forHTTPHeaderField: "authorization")
300 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:300:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
298 |             var poll = URLRequest(url: baseURL.appendingPathComponent("v2/transcript/\(jobID)"))
299 |             poll.setValue(apiKey, forHTTPHeaderField: "authorization")
300 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
301 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
302 |             if let terminal = try Self.resolvePoll(status) { return terminal }
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:368:22: error: cannot find 'URLRequest' in scope
366 |         form.addFile(name: "media", filename: "audio", mediaType: request.mediaType, data: request.audio)
367 |
368 |         var submit = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs"))
    |                      `- error: cannot find 'URLRequest' in scope
369 |         submit.httpMethod = "POST"
370 |         submit.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:375:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
373 |         )
374 |         submit.httpBody = form.finish()
375 |         let (submitData, submitResponse) = try await urlSession.data(for: submit)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
376 |         if let http = submitResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
377 |             throw AIError.http(status: http.statusCode, body: String(decoding: submitData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:386:24: error: cannot find 'URLRequest' in scope
384 |             try await Task.sleep(nanoseconds: pollNanoseconds(pollInterval))
385 |             if Date() > deadline { throw AIError.transport("Rev.ai transcription timed out") }
386 |             var poll = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)"))
    |                        `- error: cannot find 'URLRequest' in scope
387 |             poll.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
388 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:388:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
386 |             var poll = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)"))
387 |             poll.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
388 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
389 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
390 |             switch status["status"]?.stringValue?.lowercased() {
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:404:21: error: cannot find 'URLRequest' in scope
402 |
403 |     private func fetchTranscript(jobID: String) async throws -> TranscriptionModelResponse {
404 |         var fetch = URLRequest(
    |                     `- error: cannot find 'URLRequest' in scope
405 |             url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)/transcript")
406 |         )
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:409:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
407 |         fetch.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
408 |         fetch.setValue("application/vnd.rev.transcript.v1.0+json", forHTTPHeaderField: "Accept")
409 |         let (data, response) = try await urlSession.data(for: fetch)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
410 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
411 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:470:22: error: cannot find 'URLRequest' in scope
468 |         var form = MultipartForm(boundary: "swift-ai-sdk-gladia")
469 |         form.addFile(name: "audio", filename: "audio", mediaType: request.mediaType, data: request.audio)
470 |         var upload = URLRequest(url: baseURL.appendingPathComponent("v2/upload"))
    |                      `- error: cannot find 'URLRequest' in scope
471 |         upload.httpMethod = "POST"
472 |         upload.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:477:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
475 |         )
476 |         upload.httpBody = form.finish()
477 |         let (uploadData, uploadResponse) = try await urlSession.data(for: upload)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
478 |         if let http = uploadResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
479 |             throw AIError.http(status: http.statusCode, body: String(decoding: uploadData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:484:22: error: cannot find 'URLRequest' in scope
482 |         else { throw AIError.decoding("Gladia upload returned no audio_url") }
483 |
484 |         var create = URLRequest(url: baseURL.appendingPathComponent("v2/pre-recorded"))
    |                      `- error: cannot find 'URLRequest' in scope
485 |         create.httpMethod = "POST"
486 |         create.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:490:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
488 |         let body = Self.createBody(audioURL: audioURL, providerOptions: request.providerOptions)
489 |         create.httpBody = try JSONEncoder().encode(JSONValue.object(body))
490 |         let (createData, createResponse) = try await urlSession.data(for: create)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
491 |         if let http = createResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
492 |             throw AIError.http(status: http.statusCode, body: String(decoding: createData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:511:24: error: cannot find 'URLRequest' in scope
509 |             try await Task.sleep(nanoseconds: pollNanoseconds(pollInterval))
510 |             if Date() > deadline { throw AIError.transport("Gladia transcription timed out") }
511 |             var poll = URLRequest(url: resultURL)
    |                        `- error: cannot find 'URLRequest' in scope
512 |             poll.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
513 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:513:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
511 |             var poll = URLRequest(url: resultURL)
512 |             poll.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
513 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
514 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
515 |             if let terminal = try Self.resolvePoll(status) { return terminal }
[128/136] Compiling AI TranscriptionProviderPacks.swift
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:13:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
11 |     private let baseURL: URL
12 |     private let headers: [String: String]
13 |     private let urlSession: URLSession
   |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
14 |
15 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:20:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
19 |         headers: [String: String] = [:],
20 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
21 |     ) {
22 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:20:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
19 |         headers: [String: String] = [:],
20 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
21 |     ) {
22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:20:35: error: value of type '_' expected to be instance of class or class-constrained type
18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
19 |         headers: [String: String] = [:],
20 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
21 |     ) {
22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
35 |         baseURL: URL,
36 |         headers: [String: String],
37 |         urlSession: URLSession,
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
38 |         providerName: String
39 |     ) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:13:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIEmbeddingModel' has non-Sendable type 'AnyObject'
11 |     private let baseURL: URL
12 |     private let headers: [String: String]
13 |     private let urlSession: URLSession
   |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIEmbeddingModel' has non-Sendable type 'AnyObject'
14 |
15 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:49:26: error: cannot find 'URLRequest' in scope
47 |
48 |     public func embed(_ texts: [String]) async throws -> EmbeddingResponse {
49 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("embeddings"))
   |                          `- error: cannot find 'URLRequest' in scope
50 |         urlRequest.httpMethod = "POST"
51 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:63:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
61 |         ]))
62 |
63 |         let (data, response) = try await urlSession.data(for: urlRequest)
   |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
64 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
65 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIEmbeddingModel.swift:69:71: error: cannot infer key path type from context; consider explicitly specifying a root type
67 |
68 |         let decoded = try JSONDecoder().decode(EmbeddingsResponseBody.self, from: data)
69 |         let ordered = decoded.data.sorted { $0.index < $1.index }.map(\.embedding)
   |                                                                       `- error: cannot infer key path type from context; consider explicitly specifying a root type
70 |         return EmbeddingResponse(
71 |             embeddings: ordered,
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:13:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:20:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |     ) {
 22 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:20:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:20:35: error: value of type '_' expected to be instance of class or class-constrained type
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |         baseURL: URL,
 36 |         headers: [String: String],
 37 |         urlSession: URLSession,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |         providerName: String
 39 |     ) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:68:66: error: cannot find type 'URLRequest' in scope
 66 |     }
 67 |
 68 |     func buildURLRequest(_ request: ImageModelRequest) throws -> URLRequest {
    |                                                                  `- error: cannot find type 'URLRequest' in scope
 69 |         if !request.images.isEmpty {
 70 |             return try buildEditRequest(request)
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:102:75: error: cannot find type 'URLRequest' in scope
100 |     }
101 |
102 |     private func buildEditRequest(_ request: ImageModelRequest) throws -> URLRequest {
    |                                                                           `- error: cannot find type 'URLRequest' in scope
103 |         let boundary = "swift-ai-sdk-\(request.prompt.hashValue.magnitude)"
104 |         var form = MultipartForm(boundary: boundary)
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:13:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIImageModel' has non-Sendable type 'AnyObject'
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIImageModel' has non-Sendable type 'AnyObject'
 14 |
 15 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:50:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 48 |     public func generateImages(_ request: ImageModelRequest) async throws -> ImageModelResponse {
 49 |         let urlRequest = try buildURLRequest(request)
 50 |         let (data, response) = try await urlSession.data(for: urlRequest)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 51 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 52 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:64:46: error: cannot infer key path type from context; consider explicitly specifying a root type
 62 |         return ImageModelResponse(
 63 |             images: images,
 64 |             revisedPrompts: decoded.data.map(\.revised_prompt)
    |                                              `- error: cannot infer key path type from context; consider explicitly specifying a root type
 65 |         )
 66 |     }
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:89:26: error: cannot find 'URLRequest' in scope
 87 |         }
 88 |
 89 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("images/generations"))
    |                          `- error: cannot find 'URLRequest' in scope
 90 |         urlRequest.httpMethod = "POST"
 91 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIImageModel.swift:131:26: error: cannot find 'URLRequest' in scope
129 |         }
130 |
131 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("images/edits"))
    |                          `- error: cannot find 'URLRequest' in scope
132 |         urlRequest.httpMethod = "POST"
133 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:14:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 12 |     private let headers: [String: String]
 13 |     private let queryParams: [String: String]
 14 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |
 16 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:22:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 20 |         headers: [String: String] = [:],
 21 |         queryParams: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 23 |     ) {
 24 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:22:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 20 |         headers: [String: String] = [:],
 21 |         queryParams: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 23 |     ) {
 24 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:22:35: error: value of type '_' expected to be instance of class or class-constrained type
 20 |         headers: [String: String] = [:],
 21 |         queryParams: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 23 |     ) {
 24 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:41:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 39 |         headers: [String: String],
 40 |         queryParams: [String: String],
 41 |         urlSession: URLSession,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 42 |         providerName: String
 43 |     ) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:153:77: error: cannot find type 'URLRequest' in scope
151 |     }
152 |
153 |     private func buildURLRequest(_ request: LanguageModelRequest) throws -> URLRequest {
    |                                                                             `- error: cannot find type 'URLRequest' in scope
154 |         var urlRequest = URLRequest(url: requestURL(path: "chat/completions"))
155 |         urlRequest.httpMethod = "POST"
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:14:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIChatModel' has non-Sendable type 'AnyObject'
 12 |     private let headers: [String: String]
 13 |     private let queryParams: [String: String]
 14 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIChatModel' has non-Sendable type 'AnyObject'
 15 |
 16 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:57:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
 55 |     ) async throws -> AsyncThrowingStream<StreamPart, Error> {
 56 |         let urlRequest = try buildURLRequest(request)
 57 |         let (bytes, response) = try await urlSession.bytes(for: urlRequest)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
 58 |
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
/host/spi-builder-workspace/Sources/AI/Streaming/SSE.swift:45:32: error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
43 | enum SSE {
44 |     static func events(
45 |         from bytes: URLSession.AsyncBytes
   |                                `- error: 'AsyncBytes' is not a member type of type 'Foundation.URLSession' (aka 'AnyObject')
46 |     ) -> AsyncThrowingStream<SSEEvent, Error> {
47 |         AsyncThrowingStream { continuation in
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIModel.swift:154:26: error: cannot find 'URLRequest' in scope
152 |
153 |     private func buildURLRequest(_ request: LanguageModelRequest) throws -> URLRequest {
154 |         var urlRequest = URLRequest(url: requestURL(path: "chat/completions"))
    |                          `- error: cannot find 'URLRequest' in scope
155 |         urlRequest.httpMethod = "POST"
156 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:10:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  8 |     var baseURL: URL
  9 |     var headers: [String: String]
 10 |     var urlSession: URLSession
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |
 12 |     init(apiKey: String?, baseURL: URL, headers: [String: String], urlSession: URLSession) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:12:80: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 10 |     var urlSession: URLSession
 11 |
 12 |     init(apiKey: String?, baseURL: URL, headers: [String: String], urlSession: URLSession) {
    |                                                                                `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 13 |         self.apiKey = apiKey ?? ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
 14 |         self.baseURL = baseURL
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:19:86: error: cannot find type 'URLRequest' in scope
 17 |     }
 18 |
 19 |     func request(_ method: String, _ path: String, query: [String: String] = [:]) -> URLRequest {
    |                                                                                      `- error: cannot find type 'URLRequest' in scope
 20 |         let base = baseURL.appendingPathComponent(path)
 21 |         var url = base
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:58:35: error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 56 |     }
 57 |
 58 |     static func check(_ response: URLResponse, _ data: Data) throws {
    |                                   `- error: 'URLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 60 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
Foundation.URLResponse:2:18: note: 'URLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLResponse = AnyObject
  |                  `- note: 'URLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:10:9: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIHTTP' has non-Sendable type 'AnyObject'
  8 |     var baseURL: URL
  9 |     var headers: [String: String]
 10 |     var urlSession: URLSession
    |         `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIHTTP' has non-Sendable type 'AnyObject'
 11 |
 12 |     init(apiKey: String?, baseURL: URL, headers: [String: String], urlSession: URLSession) {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:72:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 70 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 71 |         headers: [String: String] = [:],
 72 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 73 |     ) {
 74 |         self.http = OpenAIHTTP(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:72:35: error: value of type '_' expected to be instance of class or class-constrained type
 70 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 71 |         headers: [String: String] = [:],
 72 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 73 |     ) {
 74 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:72:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 70 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 71 |         headers: [String: String] = [:],
 72 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 73 |     ) {
 74 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:167:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
166 |         headers: [String: String] = [:],
167 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
168 |     ) {
169 |         self.http = OpenAIHTTP(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:167:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
166 |         headers: [String: String] = [:],
167 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
168 |     ) {
169 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:167:35: error: value of type '_' expected to be instance of class or class-constrained type
165 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
166 |         headers: [String: String] = [:],
167 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
168 |     ) {
169 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:274:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
272 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
273 |         headers: [String: String] = [:],
274 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
275 |     ) {
276 |         self.http = OpenAIHTTP(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:274:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
272 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
273 |         headers: [String: String] = [:],
274 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
275 |     ) {
276 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:274:35: error: value of type '_' expected to be instance of class or class-constrained type
272 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
273 |         headers: [String: String] = [:],
274 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
275 |     ) {
276 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:324:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
322 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
323 |         headers: [String: String] = [:],
324 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
325 |     ) {
326 |         self.http = OpenAIHTTP(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:324:35: error: value of type '_' expected to be instance of class or class-constrained type
322 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
323 |         headers: [String: String] = [:],
324 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
325 |     ) {
326 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:324:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
322 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
323 |         headers: [String: String] = [:],
324 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
325 |     ) {
326 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:375:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
373 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
374 |         headers: [String: String] = [:],
375 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
376 |     ) {
377 |         self.http = OpenAIHTTP(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:375:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
373 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
374 |         headers: [String: String] = [:],
375 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
376 |     ) {
377 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:375:35: error: value of type '_' expected to be instance of class or class-constrained type
373 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
374 |         headers: [String: String] = [:],
375 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
376 |     ) {
377 |         self.http = OpenAIHTTP(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:431:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
429 |         pollTimeout: Duration = .seconds(900),
430 |         headers: [String: String] = [:],
431 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
432 |     ) {
433 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:431:35: error: value of type '_' expected to be instance of class or class-constrained type
429 |         pollTimeout: Duration = .seconds(900),
430 |         headers: [String: String] = [:],
431 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
432 |     ) {
433 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:431:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
429 |         pollTimeout: Duration = .seconds(900),
430 |         headers: [String: String] = [:],
431 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
432 |     ) {
433 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:27:23: error: cannot find 'URLRequest' in scope
 25 |             url = components.url ?? base
 26 |         }
 27 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 28 |         request.httpMethod = method
 29 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:47:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 45 |             urlRequest.httpBody = try JSONEncoder().encode(json)
 46 |         }
 47 |         let (data, response) = try await urlSession.data(for: urlRequest)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 48 |         try Self.check(response, data)
 49 |         return data.isEmpty ? .object([:]) : try JSONDecoder().decode(JSONValue.self, from: data)
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:53:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 51 |
 52 |     func download(_ path: String) async throws -> Data {
 53 |         let (data, response) = try await urlSession.data(for: request("GET", path))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 54 |         try Self.check(response, data)
 55 |         return data
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:59:32: warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 57 |
 58 |     static func check(_ response: URLResponse, _ data: Data) throws {
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
    |                                `- warning: conditional cast from 'URLResponse' (aka 'AnyObject') to 'HTTPURLResponse' (aka 'AnyObject') always succeeds
 60 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
 61 |         }
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:59:36: error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 57 |
 58 |     static func check(_ response: URLResponse, _ data: Data) throws {
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
    |                                    `- error: 'HTTPURLResponse' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 60 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
 61 |         }
Foundation.HTTPURLResponse:2:18: note: 'HTTPURLResponse' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias HTTPURLResponse = AnyObject
  |                  `- note: 'HTTPURLResponse' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:59:80: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 57 |
 58 |     static func check(_ response: URLResponse, _ data: Data) throws {
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
    |                                                                                `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 60 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
 61 |         }
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIPlatformClients.swift:60:45: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 58 |     static func check(_ response: URLResponse, _ data: Data) throws {
 59 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 60 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
    |                                             `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'statusCode'
 61 |         }
 62 |     }
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:10:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
  8 |     private let baseURL: URL
  9 |     private let headers: [String: String]
 10 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |
 12 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:16:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 15 |         headers: [String: String] = [:],
 16 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 17 |     ) {
 18 |         self.apiKey = apiKey ?? ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:16:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 14 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 15 |         headers: [String: String] = [:],
 16 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 17 |     ) {
 18 |         self.apiKey = apiKey ?? ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:16:35: error: value of type '_' expected to be instance of class or class-constrained type
 14 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 15 |         headers: [String: String] = [:],
 16 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 17 |     ) {
 18 |         self.apiKey = apiKey ?? ProcessInfo.processInfo.environment["OPENAI_API_KEY"] ?? ""
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:10:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIResponsesClient' has non-Sendable type 'AnyObject'
  8 |     private let baseURL: URL
  9 |     private let headers: [String: String]
 10 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAIResponsesClient' has non-Sendable type 'AnyObject'
 11 |
 12 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:96:23: error: cannot find 'URLRequest' in scope
 94 |             if let built = components.url { url = built }
 95 |         }
 96 |         var request = URLRequest(url: url)
    |                       `- error: cannot find 'URLRequest' in scope
 97 |         request.httpMethod = method
 98 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesClient.swift:106:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
104 |             request.httpBody = try JSONEncoder().encode(json)
105 |         }
106 |         let (data, response) = try await urlSession.data(for: request)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
107 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
108 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:39:25: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 37 |         var baseURL: URL
 38 |         var headers: [String: String]
 39 |         var urlSession: URLSession
    |                         `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 40 |         var multiAgent: MultiAgent? = nil
 41 |         var dialect: ResponsesDialect = .openai
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:39:13: error: stored property 'urlSession' of 'Sendable'-conforming struct 'ResponsesConfig' has non-Sendable type 'AnyObject'
 37 |         var baseURL: URL
 38 |         var headers: [String: String]
 39 |         var urlSession: URLSession
    |             `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'ResponsesConfig' has non-Sendable type 'AnyObject'
 40 |         var multiAgent: MultiAgent? = nil
 41 |         var dialect: ResponsesDialect = .openai
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:68:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 66 |         multiAgent: MultiAgent? = nil,
 67 |         headers: [String: String] = [:],
 68 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 69 |     ) {
 70 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:68:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 66 |         multiAgent: MultiAgent? = nil,
 67 |         headers: [String: String] = [:],
 68 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 69 |     ) {
 70 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:68:35: error: value of type '_' expected to be instance of class or class-constrained type
 66 |         multiAgent: MultiAgent? = nil,
 67 |         headers: [String: String] = [:],
 68 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 69 |     ) {
 70 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:89:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 87 |         multiAgent: MultiAgent? = nil,
 88 |         headers: [String: String],
 89 |         urlSession: URLSession,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 90 |         providerName: String,
 91 |         dialect: ResponsesDialect = .openai
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:112:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
110 |         project: String? = nil,
111 |         headers: [String: String] = [:],
112 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
113 |     ) -> OpenAIModel {
114 |         OpenAIModel(modelID: modelID, chatEngine: OpenAIChatModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:112:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
110 |         project: String? = nil,
111 |         headers: [String: String] = [:],
112 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
113 |     ) -> OpenAIModel {
114 |         OpenAIModel(modelID: modelID, chatEngine: OpenAIChatModel(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:112:35: error: value of type '_' expected to be instance of class or class-constrained type
110 |         project: String? = nil,
111 |         headers: [String: String] = [:],
112 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
113 |     ) -> OpenAIModel {
114 |         OpenAIModel(modelID: modelID, chatEngine: OpenAIChatModel(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:459:17: error: cannot find type 'URLRequest' in scope
457 |         modelID: String,
458 |         request: LanguageModelRequest
459 |     ) throws -> URLRequest {
    |                 `- error: cannot find type 'URLRequest' in scope
460 |         var urlRequest = URLRequest(url: config.baseURL.appendingPathComponent("responses"))
461 |         urlRequest.httpMethod = "POST"
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:176:61: error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
174 |     ) async throws -> AsyncThrowingStream<StreamPart, Error> {
175 |         let urlRequest = try buildResponsesRequest(config, modelID: modelID, request: request)
176 |         let (bytes, response) = try await config.urlSession.bytes(for: urlRequest)
    |                                                             `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'bytes'
177 |
178 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAIResponsesModel.swift:460:26: error: cannot find 'URLRequest' in scope
458 |         request: LanguageModelRequest
459 |     ) throws -> URLRequest {
460 |         var urlRequest = URLRequest(url: config.baseURL.appendingPathComponent("responses"))
    |                          `- error: cannot find 'URLRequest' in scope
461 |         urlRequest.httpMethod = "POST"
462 |         if !config.apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:13:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:20:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |     ) {
 22 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:20:35: error: value of type '_' expected to be instance of class or class-constrained type
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:20:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |         baseURL: URL,
 36 |         headers: [String: String],
 37 |         urlSession: URLSession,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |         providerName: String
 39 |     ) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:58:67: error: cannot find type 'URLRequest' in scope
 56 |     }
 57 |
 58 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
 59 |         var body: [String: JSONValue] = [
 60 |             "model": .string(modelID),
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:13:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAISpeechModel' has non-Sendable type 'AnyObject'
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAISpeechModel' has non-Sendable type 'AnyObject'
 14 |
 15 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:50:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 48 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
 49 |         let urlRequest = try buildURLRequest(request)
 50 |         let (data, response) = try await urlSession.data(for: urlRequest)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 51 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 52 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/OpenAISpeechModel.swift:77:26: error: cannot find 'URLRequest' in scope
 75 |         }
 76 |
 77 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("audio/speech"))
    |                          `- error: cannot find 'URLRequest' in scope
 78 |         urlRequest.httpMethod = "POST"
 79 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:13:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:20:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |     ) {
 22 |         self.init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:20:35: error: value of type '_' expected to be instance of class or class-constrained type
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:20:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 18 |         baseURL: URL = URL(string: "https://api.openai.com/v1")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 21 |     ) {
 22 |         self.init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:37:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 35 |         baseURL: URL,
 36 |         headers: [String: String],
 37 |         urlSession: URLSession,
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 38 |         providerName: String
 39 |     ) {
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:69:74: error: cannot find type 'URLRequest' in scope
 67 |     }
 68 |
 69 |     func buildURLRequest(_ request: TranscriptionModelRequest) throws -> URLRequest {
    |                                                                          `- error: cannot find type 'URLRequest' in scope
 70 |         let boundary = "swift-ai-sdk-\(UUID().uuidString)"
 71 |         var body = Data()
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:13:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAITranscriptionModel' has non-Sendable type 'AnyObject'
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'OpenAITranscriptionModel' has non-Sendable type 'AnyObject'
 14 |
 15 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:50:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 48 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
 49 |         let urlRequest = try buildURLRequest(request)
 50 |         let (data, response) = try await urlSession.data(for: urlRequest)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 51 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 52 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:56:24: error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
 54 |
 55 |         let decoded = try JSONDecoder().decode(TranscriptionResponseBody.self, from: data)
 56 |         let segments = decoded.segments?.map {
    |                        `- error: the compiler is unable to type-check this expression in reasonable time; try breaking up the expression into distinct sub-expressions
 57 |             TranscriptionSegment(text: $0.text, startSecond: $0.start, endSecond: $0.end)
 58 |         } ?? decoded.words?.map {
/host/spi-builder-workspace/Sources/AI/Providers/OpenAITranscriptionModel.swift:106:26: error: cannot find 'URLRequest' in scope
104 |         body.append(Data("--\(boundary)--\r\n".utf8))
105 |
106 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("audio/transcriptions"))
    |                          `- error: cannot find 'URLRequest' in scope
107 |         urlRequest.httpMethod = "POST"
108 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/OpenRouterModel.swift:19:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     ) {
21 |         engine = openRouterConfiguration.makeModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/OpenRouterModel.swift:19:35: error: value of type '_' expected to be instance of class or class-constrained type
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
20 |     ) {
21 |         engine = openRouterConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/OpenRouterModel.swift:19:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
20 |     ) {
21 |         engine = openRouterConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/PerplexityModel.swift:19:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     ) {
21 |         engine = perplexityConfiguration.makeModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/PerplexityModel.swift:19:35: error: value of type '_' expected to be instance of class or class-constrained type
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
20 |     ) {
21 |         engine = perplexityConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/PerplexityModel.swift:19:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
20 |     ) {
21 |         engine = perplexityConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:14:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 12 |     private let accept: String
 13 |     private let headers: [String: String]
 14 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 15 |
 16 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:22:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 20 |         baseURL: URL = URL(string: "https://inference.prodia.com/v2")!,
 21 |         headers: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 23 |     ) {
 24 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:22:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 20 |         baseURL: URL = URL(string: "https://inference.prodia.com/v2")!,
 21 |         headers: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 23 |     ) {
 24 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:22:35: error: value of type '_' expected to be instance of class or class-constrained type
 20 |         baseURL: URL = URL(string: "https://inference.prodia.com/v2")!,
 21 |         headers: [String: String] = [:],
 22 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 23 |     ) {
 24 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:44:66: error: cannot find type 'URLRequest' in scope
 42 |     }
 43 |
 44 |     func buildURLRequest(_ request: ImageModelRequest) throws -> URLRequest {
    |                                                                  `- error: cannot find type 'URLRequest' in scope
 45 |         var config: [String: JSONValue] = ["prompt": .string(request.prompt)]
 46 |         if let seed = request.seed { config["seed"] = .number(Double(seed)) }
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:14:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'ProdiaImageModel' has non-Sendable type 'AnyObject'
 12 |     private let accept: String
 13 |     private let headers: [String: String]
 14 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'ProdiaImageModel' has non-Sendable type 'AnyObject'
 15 |
 16 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:73:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 71 |     private let baseURL: URL
 72 |     private let headers: [String: String]
 73 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 74 |
 75 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:80:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 78 |         baseURL: URL = URL(string: "https://api.quiver.ai/v1")!,
 79 |         headers: [String: String] = [:],
 80 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 81 |     ) {
 82 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:80:35: error: value of type '_' expected to be instance of class or class-constrained type
 78 |         baseURL: URL = URL(string: "https://api.quiver.ai/v1")!,
 79 |         headers: [String: String] = [:],
 80 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 81 |     ) {
 82 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:80:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 78 |         baseURL: URL = URL(string: "https://api.quiver.ai/v1")!,
 79 |         headers: [String: String] = [:],
 80 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 81 |     ) {
 82 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:108:66: error: cannot find type 'URLRequest' in scope
106 |     }
107 |
108 |     func buildURLRequest(_ request: ImageModelRequest) throws -> URLRequest {
    |                                                                  `- error: cannot find type 'URLRequest' in scope
109 |         var body: [String: JSONValue] = [
110 |             "model": .string(modelID),
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:73:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'QuiverAIImageModel' has non-Sendable type 'AnyObject'
 71 |     private let baseURL: URL
 72 |     private let headers: [String: String]
 73 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'QuiverAIImageModel' has non-Sendable type 'AnyObject'
 74 |
 75 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:35:57: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 33 |         var images: [Data] = []
 34 |         for _ in 0..<max(request.n, 1) {
 35 |             let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                         `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 36 |             if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 37 |                 throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:55:26: error: cannot find 'URLRequest' in scope
 53 |         ])
 54 |
 55 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("job"))
    |                          `- error: cannot find 'URLRequest' in scope
 56 |         urlRequest.httpMethod = "POST"
 57 |         urlRequest.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:90:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 88 |
 89 |     public func generateImages(_ request: ImageModelRequest) async throws -> ImageModelResponse {
 90 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 91 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 92 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:100:55: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 98 |                 images.append(Data(svg.utf8))
 99 |             } else if let urlString = item["url"]?.stringValue, let url = URL(string: urlString) {
100 |                 let (bytes, _) = try await urlSession.data(from: url)
    |                                                       `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
101 |                 images.append(bytes)
102 |             }
/host/spi-builder-workspace/Sources/AI/Providers/ProdiaModel.swift:117:26: error: cannot find 'URLRequest' in scope
115 |         }
116 |
117 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("svgs/generations"))
    |                          `- error: cannot find 'URLRequest' in scope
118 |         urlRequest.httpMethod = "POST"
119 |         urlRequest.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/SarvamModel.swift:19:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     ) {
21 |         engine = sarvamConfiguration.makeModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SarvamModel.swift:19:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
20 |     ) {
21 |         engine = sarvamConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/SarvamModel.swift:19:35: error: value of type '_' expected to be instance of class or class-constrained type
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
20 |     ) {
21 |         engine = sarvamConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:13:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 14 |
 15 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:20:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 18 |         baseURL: URL = URL(string: "https://api.lmnt.com")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 21 |     ) {
 22 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:20:35: error: value of type '_' expected to be instance of class or class-constrained type
 18 |         baseURL: URL = URL(string: "https://api.lmnt.com")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 21 |     ) {
 22 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:20:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 18 |         baseURL: URL = URL(string: "https://api.lmnt.com")!,
 19 |         headers: [String: String] = [:],
 20 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 21 |     ) {
 22 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:41:67: error: cannot find type 'URLRequest' in scope
 39 |     }
 40 |
 41 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
 42 |         var body: [String: JSONValue] = [
 43 |             "model": .string(modelID),
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:13:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'LMNTSpeechModel' has non-Sendable type 'AnyObject'
 11 |     private let baseURL: URL
 12 |     private let headers: [String: String]
 13 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'LMNTSpeechModel' has non-Sendable type 'AnyObject'
 14 |
 15 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:71:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 69 |     private let targetLanguage: String
 70 |     private let headers: [String: String]
 71 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 72 |
 73 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:79:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 77 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 78 |         headers: [String: String] = [:],
 79 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 80 |     ) {
 81 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:79:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 77 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 78 |         headers: [String: String] = [:],
 79 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 80 |     ) {
 81 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:79:35: error: value of type '_' expected to be instance of class or class-constrained type
 77 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 78 |         headers: [String: String] = [:],
 79 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 80 |     ) {
 81 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:115:67: error: cannot find type 'URLRequest' in scope
113 |     }
114 |
115 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
116 |         var body: [String: JSONValue] = [
117 |             "model": .string(modelID),
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:71:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamSpeechModel' has non-Sendable type 'AnyObject'
 69 |     private let targetLanguage: String
 70 |     private let headers: [String: String]
 71 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamSpeechModel' has non-Sendable type 'AnyObject'
 72 |
 73 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:148:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
146 |     private let language: String
147 |     private let headers: [String: String]
148 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
149 |
150 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:156:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
154 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
155 |         headers: [String: String] = [:],
156 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
157 |     ) {
158 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:156:35: error: value of type '_' expected to be instance of class or class-constrained type
154 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
155 |         headers: [String: String] = [:],
156 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
157 |     ) {
158 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:156:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
154 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
155 |         headers: [String: String] = [:],
156 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
157 |     ) {
158 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:186:67: error: cannot find type 'URLRequest' in scope
184 |     }
185 |
186 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
187 |         var body: [String: JSONValue] = [
188 |             "model": .string(modelID),
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:148:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiSpeechModel' has non-Sendable type 'AnyObject'
146 |     private let language: String
147 |     private let headers: [String: String]
148 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiSpeechModel' has non-Sendable type 'AnyObject'
149 |
150 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:219:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
217 |     private let baseURL: URL
218 |     private let headers: [String: String]
219 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
220 |
221 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
227 |     ) {
228 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:35: error: value of type '_' expected to be instance of class or class-constrained type
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
227 |     ) {
228 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:226:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
224 |         baseURL: URL = URL(string: "https://api.hume.ai")!,
225 |         headers: [String: String] = [:],
226 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
227 |     ) {
228 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:247:67: error: cannot find type 'URLRequest' in scope
245 |     }
246 |
247 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
248 |         var utterance: [String: JSONValue] = ["text": .string(request.text)]
249 |         if let voice = request.voice {
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:219:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'HumeSpeechModel' has non-Sendable type 'AnyObject'
217 |     private let baseURL: URL
218 |     private let headers: [String: String]
219 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'HumeSpeechModel' has non-Sendable type 'AnyObject'
220 |
221 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:282:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
280 |     private let baseURL: URL
281 |     private let headers: [String: String]
282 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
283 |
284 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
290 |     ) {
291 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:35: error: value of type '_' expected to be instance of class or class-constrained type
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
290 |     ) {
291 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:289:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
287 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
288 |         headers: [String: String] = [:],
289 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
290 |     ) {
291 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:306:67: error: cannot find type 'URLRequest' in scope
304 |     }
305 |
306 |     func buildURLRequest(_ request: SpeechModelRequest) throws -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
307 |         var components = URLComponents(
308 |             url: baseURL.appendingPathComponent("v1/speak"), resolvingAgainstBaseURL: false
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:282:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramSpeechModel' has non-Sendable type 'AnyObject'
280 |     private let baseURL: URL
281 |     private let headers: [String: String]
282 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramSpeechModel' has non-Sendable type 'AnyObject'
283 |
284 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:30:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 28 |
 29 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
 30 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 31 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 32 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:53:26: error: cannot find 'URLRequest' in scope
 51 |         }
 52 |
 53 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("v1/ai/speech/bytes"))
    |                          `- error: cannot find 'URLRequest' in scope
 54 |         urlRequest.httpMethod = "POST"
 55 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "x-api-key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:90:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 88 |
 89 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
 90 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 91 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 92 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:130:26: error: cannot find 'URLRequest' in scope
128 |         }
129 |
130 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("text-to-speech"))
    |                          `- error: cannot find 'URLRequest' in scope
131 |         urlRequest.httpMethod = "POST"
132 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "api-subscription-key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:167:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
165 |
166 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
167 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
168 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
169 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:171:57: error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
169 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
170 |         }
171 |         let mediaType = (response as? HTTPURLResponse)?.mimeType
    |                                                         `- error: value of type 'HTTPURLResponse' (aka 'AnyObject') has no member 'mimeType'
172 |             ?? Self.mediaType(for: request.outputFormat)
173 |         return SpeechModelResponse(audio: data, mediaType: mediaType)
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:200:26: error: cannot find 'URLRequest' in scope
198 |         }
199 |
200 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("tts"))
    |                          `- error: cannot find 'URLRequest' in scope
201 |         urlRequest.httpMethod = "POST"
202 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:236:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
234 |
235 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
236 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
237 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
238 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:265:26: error: cannot find 'URLRequest' in scope
263 |         }
264 |
265 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("v0/tts/file"))
    |                          `- error: cannot find 'URLRequest' in scope
266 |         urlRequest.httpMethod = "POST"
267 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "X-Hume-Api-Key")
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:299:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
297 |
298 |     public func generateSpeech(_ request: SpeechModelRequest) async throws -> SpeechModelResponse {
299 |         let (data, response) = try await urlSession.data(for: try buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
300 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
301 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/SpeechProviderPacks.swift:312:26: error: cannot find 'URLRequest' in scope
310 |         components.queryItems = [URLQueryItem(name: "model", value: modelID)]
311 |
312 |         var urlRequest = URLRequest(url: components.url!)
    |                          `- error: cannot find 'URLRequest' in scope
313 |         urlRequest.httpMethod = "POST"
314 |         urlRequest.setValue("Token \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:35: error: value of type '_' expected to be instance of class or class-constrained type
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:19:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
17 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
18 |         headers: [String: String] = [:], queryParams: [String: String] = [:],
19 |         urlSession: URLSession = .shared
   |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
20 |     ) {
21 |         engine = togetherAIConfiguration.makeModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:54: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                      `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:68: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                                    `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
/host/spi-builder-workspace/Sources/AI/Providers/TogetherAIModel.swift:33:68: error: value of type '_' expected to be instance of class or class-constrained type
31 |     public init(
32 |         _ modelID: String, apiKey: String? = nil, baseURL: URL? = nil,
33 |         headers: [String: String] = [:], urlSession: URLSession = .shared
   |                                                                    `- error: value of type '_' expected to be instance of class or class-constrained type
34 |     ) {
35 |         engine = togetherAIConfiguration.makeEmbeddingModel(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:18:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 16 |     let baseURL: URL
 17 |     let headers: [String: String]
 18 |     let urlSession: URLSession
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 19 |
 20 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 26 |     ) {
 27 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 26 |     ) {
 27 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:25:35: error: value of type '_' expected to be instance of class or class-constrained type
 23 |         baseURL: URL = URL(string: "https://api.deepgram.com")!,
 24 |         headers: [String: String] = [:],
 25 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 26 |     ) {
 27 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:58:67: error: cannot find type 'URLRequest' in scope
 56 |     }
 57 |
 58 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
 59 |         var components = URLComponents(
 60 |             url: baseURL.appendingPathComponent("v1/listen"), resolvingAgainstBaseURL: false
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:18:9: error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramTranscriptionModel' has non-Sendable type 'AnyObject'
 16 |     let baseURL: URL
 17 |     let headers: [String: String]
 18 |     let urlSession: URLSession
    |         `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'DeepgramTranscriptionModel' has non-Sendable type 'AnyObject'
 19 |
 20 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:84:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 82 |     private let baseURL: URL
 83 |     private let headers: [String: String]
 84 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 85 |
 86 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
 92 |     ) {
 93 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
 92 |     ) {
 93 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:91:35: error: value of type '_' expected to be instance of class or class-constrained type
 89 |         baseURL: URL = URL(string: "https://api.sarvam.ai")!,
 90 |         headers: [String: String] = [:],
 91 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
 92 |     ) {
 93 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:112:67: error: cannot find type 'URLRequest' in scope
110 |     }
111 |
112 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
113 |         var form = MultipartForm(boundary: "swift-ai-sdk-sarvam")
114 |         form.addField(name: "model", value: modelID)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:84:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamTranscriptionModel' has non-Sendable type 'AnyObject'
 82 |     private let baseURL: URL
 83 |     private let headers: [String: String]
 84 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'SarvamTranscriptionModel' has non-Sendable type 'AnyObject'
 85 |
 86 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:157:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
155 |     private let baseURL: URL
156 |     private let headers: [String: String]
157 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
158 |
159 |     public init(
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
165 |     ) {
166 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:35: error: value of type '_' expected to be instance of class or class-constrained type
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
165 |     ) {
166 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:164:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
162 |         baseURL: URL = URL(string: "https://api.x.ai/v1")!,
163 |         headers: [String: String] = [:],
164 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
165 |     ) {
166 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:198:67: error: cannot find type 'URLRequest' in scope
196 |     }
197 |
198 |     func buildURLRequest(_ request: TranscriptionModelRequest) -> URLRequest {
    |                                                                   `- error: cannot find type 'URLRequest' in scope
199 |         var form = MultipartForm(boundary: "swift-ai-sdk-xai-stt")
200 |         form.addField(name: "model", value: modelID)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:157:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiTranscriptionModel' has non-Sendable type 'AnyObject'
155 |     private let baseURL: URL
156 |     private let headers: [String: String]
157 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'XaiTranscriptionModel' has non-Sendable type 'AnyObject'
158 |
159 |     public init(
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:238:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
236 |     private let baseURL: URL
237 |     private let headers: [String: String]
238 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
239 |     private let pollInterval: TimeInterval
240 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
250 |     ) {
251 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
250 |     ) {
251 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:249:35: error: value of type '_' expected to be instance of class or class-constrained type
247 |         pollInterval: TimeInterval = 1,
248 |         pollTimeout: TimeInterval = 300,
249 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
250 |     ) {
251 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:238:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'AssemblyAITranscriptionModel' has non-Sendable type 'AnyObject'
236 |     private let baseURL: URL
237 |     private let headers: [String: String]
238 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'AssemblyAITranscriptionModel' has non-Sendable type 'AnyObject'
239 |     private let pollInterval: TimeInterval
240 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:340:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
338 |     private let baseURL: URL
339 |     private let headers: [String: String]
340 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
341 |     private let pollInterval: TimeInterval
342 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
352 |     ) {
353 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
352 |     ) {
353 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:351:35: error: value of type '_' expected to be instance of class or class-constrained type
349 |         pollInterval: TimeInterval = 2,
350 |         pollTimeout: TimeInterval = 600,
351 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
352 |     ) {
353 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:340:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'RevAITranscriptionModel' has non-Sendable type 'AnyObject'
338 |     private let baseURL: URL
339 |     private let headers: [String: String]
340 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'RevAITranscriptionModel' has non-Sendable type 'AnyObject'
341 |     private let pollInterval: TimeInterval
342 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:445:29: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
443 |     private let baseURL: URL
444 |     private let headers: [String: String]
445 |     private let urlSession: URLSession
    |                             `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
446 |     private let pollInterval: TimeInterval
447 |     private let pollTimeout: TimeInterval
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:21: error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                     `- error: 'URLSession' is unavailable: This type has moved to the FoundationNetworking module. Import that module to use it.
457 |     ) {
458 |         self.modelID = modelID
Foundation.URLSession:2:18: note: 'URLSession' has been explicitly marked unavailable here
1 | @available(*, unavailable, message: "This type has moved to the FoundationNetworking module. Import that module to use it.")
2 | public typealias URLSession = AnyObject
  |                  `- note: 'URLSession' has been explicitly marked unavailable here
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:35: error: value of type '_' expected to be instance of class or class-constrained type
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                                   `- error: value of type '_' expected to be instance of class or class-constrained type
457 |     ) {
458 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:456:35: error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
454 |         pollInterval: TimeInterval = 1,
455 |         pollTimeout: TimeInterval = 300,
456 |         urlSession: URLSession = .shared
    |                                   `- error: type 'URLSession' (aka 'AnyObject') has no member 'shared'
457 |     ) {
458 |         self.modelID = modelID
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:445:17: error: stored property 'urlSession' of 'Sendable'-conforming struct 'GladiaTranscriptionModel' has non-Sendable type 'AnyObject'
443 |     private let baseURL: URL
444 |     private let headers: [String: String]
445 |     private let urlSession: URLSession
    |                 `- error: stored property 'urlSession' of 'Sendable'-conforming struct 'GladiaTranscriptionModel' has non-Sendable type 'AnyObject'
446 |     private let pollInterval: TimeInterval
447 |     private let pollTimeout: TimeInterval
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:35:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 33 |
 34 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
 35 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 36 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
 37 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:67:26: error: cannot find 'URLRequest' in scope
 65 |         ]
 66 |
 67 |         var urlRequest = URLRequest(url: components.url!)
    |                          `- error: cannot find 'URLRequest' in scope
 68 |         urlRequest.httpMethod = "POST"
 69 |         urlRequest.setValue("Token \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:101:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
 99 |
100 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
101 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
102 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
103 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:129:26: error: cannot find 'URLRequest' in scope
127 |         )
128 |
129 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("speech-to-text"))
    |                          `- error: cannot find 'URLRequest' in scope
130 |         urlRequest.httpMethod = "POST"
131 |         urlRequest.setValue(apiKey, forHTTPHeaderField: "api-subscription-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:174:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
172 |
173 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
174 |         let (data, response) = try await urlSession.data(for: buildURLRequest(request))
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
175 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
176 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:217:26: error: cannot find 'URLRequest' in scope
215 |         )
216 |
217 |         var urlRequest = URLRequest(url: baseURL.appendingPathComponent("stt"))
    |                          `- error: cannot find 'URLRequest' in scope
218 |         urlRequest.httpMethod = "POST"
219 |         if !apiKey.isEmpty {
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:261:22: error: cannot find 'URLRequest' in scope
259 |
260 |     public func transcribe(_ request: TranscriptionModelRequest) async throws -> TranscriptionModelResponse {
261 |         var upload = URLRequest(url: baseURL.appendingPathComponent("v2/upload"))
    |                      `- error: cannot find 'URLRequest' in scope
262 |         upload.httpMethod = "POST"
263 |         upload.setValue(apiKey, forHTTPHeaderField: "authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:266:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
264 |         upload.setValue("application/octet-stream", forHTTPHeaderField: "content-type")
265 |         upload.httpBody = request.audio
266 |         let (uploadData, uploadResponse) = try await urlSession.data(for: upload)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
267 |         if let http = uploadResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
268 |             throw AIError.http(status: http.statusCode, body: String(decoding: uploadData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:273:22: error: cannot find 'URLRequest' in scope
271 |         else { throw AIError.decoding("AssemblyAI upload returned no upload_url") }
272 |
273 |         var create = URLRequest(url: baseURL.appendingPathComponent("v2/transcript"))
    |                      `- error: cannot find 'URLRequest' in scope
274 |         create.httpMethod = "POST"
275 |         create.setValue(apiKey, forHTTPHeaderField: "authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:285:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
283 |         }
284 |         create.httpBody = try JSONEncoder().encode(JSONValue.object(body))
285 |         let (createData, createResponse) = try await urlSession.data(for: create)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
286 |         if let http = createResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
287 |             throw AIError.http(status: http.statusCode, body: String(decoding: createData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:298:24: error: cannot find 'URLRequest' in scope
296 |                 throw AIError.transport("AssemblyAI transcription timed out")
297 |             }
298 |             var poll = URLRequest(url: baseURL.appendingPathComponent("v2/transcript/\(jobID)"))
    |                        `- error: cannot find 'URLRequest' in scope
299 |             poll.setValue(apiKey, forHTTPHeaderField: "authorization")
300 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:300:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
298 |             var poll = URLRequest(url: baseURL.appendingPathComponent("v2/transcript/\(jobID)"))
299 |             poll.setValue(apiKey, forHTTPHeaderField: "authorization")
300 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
301 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
302 |             if let terminal = try Self.resolvePoll(status) { return terminal }
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:368:22: error: cannot find 'URLRequest' in scope
366 |         form.addFile(name: "media", filename: "audio", mediaType: request.mediaType, data: request.audio)
367 |
368 |         var submit = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs"))
    |                      `- error: cannot find 'URLRequest' in scope
369 |         submit.httpMethod = "POST"
370 |         submit.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:375:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
373 |         )
374 |         submit.httpBody = form.finish()
375 |         let (submitData, submitResponse) = try await urlSession.data(for: submit)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
376 |         if let http = submitResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
377 |             throw AIError.http(status: http.statusCode, body: String(decoding: submitData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:386:24: error: cannot find 'URLRequest' in scope
384 |             try await Task.sleep(nanoseconds: pollNanoseconds(pollInterval))
385 |             if Date() > deadline { throw AIError.transport("Rev.ai transcription timed out") }
386 |             var poll = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)"))
    |                        `- error: cannot find 'URLRequest' in scope
387 |             poll.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
388 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:388:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
386 |             var poll = URLRequest(url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)"))
387 |             poll.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
388 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
389 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
390 |             switch status["status"]?.stringValue?.lowercased() {
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:404:21: error: cannot find 'URLRequest' in scope
402 |
403 |     private func fetchTranscript(jobID: String) async throws -> TranscriptionModelResponse {
404 |         var fetch = URLRequest(
    |                     `- error: cannot find 'URLRequest' in scope
405 |             url: baseURL.appendingPathComponent("speechtotext/v1/jobs/\(jobID)/transcript")
406 |         )
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:409:53: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
407 |         fetch.setValue("Bearer \(apiKey)", forHTTPHeaderField: "Authorization")
408 |         fetch.setValue("application/vnd.rev.transcript.v1.0+json", forHTTPHeaderField: "Accept")
409 |         let (data, response) = try await urlSession.data(for: fetch)
    |                                                     `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
410 |         if let http = response as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
411 |             throw AIError.http(status: http.statusCode, body: String(decoding: data, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:470:22: error: cannot find 'URLRequest' in scope
468 |         var form = MultipartForm(boundary: "swift-ai-sdk-gladia")
469 |         form.addFile(name: "audio", filename: "audio", mediaType: request.mediaType, data: request.audio)
470 |         var upload = URLRequest(url: baseURL.appendingPathComponent("v2/upload"))
    |                      `- error: cannot find 'URLRequest' in scope
471 |         upload.httpMethod = "POST"
472 |         upload.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:477:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
475 |         )
476 |         upload.httpBody = form.finish()
477 |         let (uploadData, uploadResponse) = try await urlSession.data(for: upload)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
478 |         if let http = uploadResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
479 |             throw AIError.http(status: http.statusCode, body: String(decoding: uploadData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:484:22: error: cannot find 'URLRequest' in scope
482 |         else { throw AIError.decoding("Gladia upload returned no audio_url") }
483 |
484 |         var create = URLRequest(url: baseURL.appendingPathComponent("v2/pre-recorded"))
    |                      `- error: cannot find 'URLRequest' in scope
485 |         create.httpMethod = "POST"
486 |         create.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:490:65: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
488 |         let body = Self.createBody(audioURL: audioURL, providerOptions: request.providerOptions)
489 |         create.httpBody = try JSONEncoder().encode(JSONValue.object(body))
490 |         let (createData, createResponse) = try await urlSession.data(for: create)
    |                                                                 `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
491 |         if let http = createResponse as? HTTPURLResponse, !(200..<300).contains(http.statusCode) {
492 |             throw AIError.http(status: http.statusCode, body: String(decoding: createData, as: UTF8.self))
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:511:24: error: cannot find 'URLRequest' in scope
509 |             try await Task.sleep(nanoseconds: pollNanoseconds(pollInterval))
510 |             if Date() > deadline { throw AIError.transport("Gladia transcription timed out") }
511 |             var poll = URLRequest(url: resultURL)
    |                        `- error: cannot find 'URLRequest' in scope
512 |             poll.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
513 |             let (pollData, _) = try await urlSession.data(for: poll)
/host/spi-builder-workspace/Sources/AI/Providers/TranscriptionProviderPacks.swift:513:54: error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
511 |             var poll = URLRequest(url: resultURL)
512 |             poll.setValue(apiKey, forHTTPHeaderField: "x-gladia-key")
513 |             let (pollData, _) = try await urlSession.data(for: poll)
    |                                                      `- error: value of type 'URLSession' (aka 'AnyObject') has no member 'data'
514 |             let status = try JSONDecoder().decode(JSONValue.self, from: pollData)
515 |             if let terminal = try Self.resolvePoll(status) { return terminal }
BUILD FAILURE 6.3 wasm