Post

Replies

Boosts

Views

Activity

Reply to "FoundationModels GenerationError error 2" on iOS 26 beta 3
Just tried the sample code again with Xcode 26 beta 3, the same problem persists. All itinerary generations are failing with the same guardrail error. Some of the hashtag generations succeed, but one weird thing I saw was the "White Cliffs of Dover" landmark generating one extremely long hashtag that stretched the window off the side of the screen. The LLM got stuck in a loop generating the same phrase repeatedly.
Jul ’25
Reply to "FoundationModels GenerationError error 2" on iOS 26 beta 3
I'm also seeing this using Xcode 26 beta 2 and an iPhone 16 Pro Max on iOS 26 beta 3. In a demo chat app project, the error is thrown for roughly half of prompts. Often trying the same prompt multiple times will succeed or fail at random. It reliably happens when using the FoundationModelsTripPlanner sample code. Every attempt to generate an itinerary throws an error: The operation couldn’t be completed. (FoundationModels.LanguageModelSession.GenerationError error 2.) Printing description of error: ▿ GenerationError ▿ guardrailViolation : Context - debugDescription : "May contain sensitive or unsafe content" ▿ underlyingErrors : 1 element ▿ 0 : GenerationError ▿ guardrailViolation : Context - debugDescription : "May contain unsafe content" - underlyingErrors : 0 elements
Jul ’25
Reply to "FoundationModels GenerationError error 2" on iOS 26 beta 3
Just tried the sample code again with Xcode 26 beta 3, the same problem persists. All itinerary generations are failing with the same guardrail error. Some of the hashtag generations succeed, but one weird thing I saw was the "White Cliffs of Dover" landmark generating one extremely long hashtag that stretched the window off the side of the screen. The LLM got stuck in a loop generating the same phrase repeatedly.
Replies
Boosts
Views
Activity
Jul ’25
Reply to "FoundationModels GenerationError error 2" on iOS 26 beta 3
I'm also seeing this using Xcode 26 beta 2 and an iPhone 16 Pro Max on iOS 26 beta 3. In a demo chat app project, the error is thrown for roughly half of prompts. Often trying the same prompt multiple times will succeed or fail at random. It reliably happens when using the FoundationModelsTripPlanner sample code. Every attempt to generate an itinerary throws an error: The operation couldn’t be completed. (FoundationModels.LanguageModelSession.GenerationError error 2.) Printing description of error: ▿ GenerationError ▿ guardrailViolation : Context - debugDescription : "May contain sensitive or unsafe content" ▿ underlyingErrors : 1 element ▿ 0 : GenerationError ▿ guardrailViolation : Context - debugDescription : "May contain unsafe content" - underlyingErrors : 0 elements
Replies
Boosts
Views
Activity
Jul ’25