How to fix guardRailViolationError with Foundation Models on XCode 26
When developing with Foundation Models on the Xcode 26 beta1 I got a guardrailViolation
error: "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog"
.
I wasn’t passing sensitive prompts to the model. SystemLanguageModel.default
returned .available
.
In the end, I found the solution in this StackOverflow response:
The error persisted until I noticed that my MacOS language was set to English (US) but the Siri language defaulted to English (Australia). Once I switched the Siri language to English (United States) the Apple Intelligence checkbox appeared and it started downloading the models. After that my code (similar to the code in question) started working!
Once I set my Siri settings to English (US), models started downloading:
How to get Apple Intelligence – Apple Support (AU)
Is this a bug?
I don’t think this is expected behaviour.
The Foundation Models Documentation states:
To use the on-device language model, people need to turn on Apple Intelligence on their device. For a list of supported devices, see Apple Intelligence.
The linked page, “Apple Intelligence” explains:
Supported languages include English, …
More clearly, in another support article:
Apple Intelligence is available on supported iPhone, iPad and Mac models in these languages: …, English (Australia, Canada, India, Ireland, New Zealand, Singapore, South Africa, UK and US) …
At least if the language is not supported, SystemLanguageModel.default.availability
should not return .available
.
I might be missing something, but for now I filed a ticket in the Feedback Assistant (FB19844387
).
If you have insights, please get in touch!
Full error message
guardrailViolation(FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: "May contain sensitive or unsafe content", underlyingErrors: [Error Domain=com.apple.SensitiveContentAnalysisML Code=15 "Failed model manager query for model com.apple.fm.language.instruct_300m.safety: Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000 "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog" UserInfo={NSLocalizedFailureReason=There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog}" UserInfo={NSLocalizedDescription=Failed model manager query for model com.apple.fm.language.instruct_300m.safety: Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000 "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog" UserInfo={NSLocalizedFailureReason=There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog}, NSUnderlyingError=0x600003305fe0 {Error Domain=ModelManagerServices.ModelManagerError Code=1026 "Model Catalog error: Error Domain=com.apple.UnifiedAssetFramework Code=5000 "There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog" UserInfo={NSLocalizedFailureReason=There are no underlying assets (neither atomic instance nor asset roots) for consistency token for asset set com.apple.modelcatalog}"}}]))
Footnotes
- I was using XCode 26.0 beta 6 when this error occurred. ↩