The error you're encountering is due to Swift's concurrency model introduced in Swift 5.5, which aims to prevent data races by enforcing actor isolation. In Swift 6, these checks have become more stringent, especially when dealing with concurrent and actor-isolated contexts. The Translation framework's methods, like translate, are likely designed to work concurrently, which means they expect to be called from an actor context. When you pass the session object, which is likely actor-isolated to the main actor (due to how URLSession typically works), to a concurrent method, Swift flags this as a potential data race. How to Fix the Issue Make the Session Actor If possible, wrap the URLSession instance in an actor. This way, all interactions with it are serialized and safe from data races. actor TranslationSession { private let session: URLSession init() { self.session = URLSession(configuration: .default) } func translate(_ text: String) async throws -> TranslatedText { let configur