All generations in #Playground macro are throwing "unsafe" Generation Errors

I'm using Xcode 26 Beta 5 and get errors on any generation I try, however harmless, when wrapped in the #Playground macro.

#Playground { let session = LanguageModelSession() let topic = "pandas" let prompt = "Write a safe and respectful story about (topic)." let response = try await session.respond(to: prompt)

Not seeing any issues on simulator or device. Anyone else seeing this or have any ideas?

Thanks for any help!

Version 26.0 beta 5 (17A5295f) macOS 26.0 Beta (25A5316i)

Answered by Frameworks Engineer in 852841022

Looks like you are using macOS 26 beta 4, not beta 5. I'd recommend upgrading to beta 5 to match your Xcode.

You may be hitting a known issue in Beta 5. This is in our release notes:

In some cases, requests you make to the model erroneously throw a guardrailViolation for all prompts due to model assets not fully downloaded. (156223847) (FB18944619)

Workaround: Stay connected to the internet and try again later.

I've definitely had Xcode open for hours and seeing the same thing. Also, would this be expected as a known issue only for generations in the #Playground macro? Generations in simulator are fine.

Accepted Answer

Looks like you are using macOS 26 beta 4, not beta 5. I'd recommend upgrading to beta 5 to match your Xcode.

That worked! Thanks!

All generations in #Playground macro are throwing "unsafe" Generation Errors
 
 
Q