Error with guardrailViolation and underlyingErrors

Hi, I am a new IOS developer, trying to learn to integrate the Apple Foundation Model.

my set up is:

  • Mac M1 Pro
  • MacOS 26 Beta
  • Version 26.0 beta 3
  • Apple Intelligence & Siri --> On

here is the code,

    func generate() {
        Task {
            isGenerating = true
            output = "⏳ Thinking..."
            do {
              
                let session = LanguageModelSession( instructions: """
                    Extract time from a message. Example 
                    Q: Golfing at 6PM
                    A: 6PM
                """)
                let response = try await session.respond(to: "Go to gym at 7PM")
                output = response.content
                
            } catch {
                output = "❌ Error:, \(error)"
                print(output)
            }
            isGenerating = false
        }
    

and I get these errors

guardrailViolation(FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: "Prompt may contain sensitive or unsafe content", underlyingErrors: [Asset com.apple.gm.safety_embedding_deny.all not found in Model Catalog]))

Can you help me get through this?

That error indicates that your device is missing some of the assets it needs to run FoundationModels. This is a bug.

Please do two things. The first will help us understand how you got into a bad state in the first place, and the second may get it back into a good state.

First, please take a sysdiagnose and submit it via Feedback Assistant. When you do, please include a link to your forum post. If you could also post the feedback id here when you're done, that would be helpful. How to collect a sysdiagnose

Second, with WiFi turned on, navigate to Settings > Apple Intelligence & Siri. This should trigger your device to attempt to download missing assets. Wait a few minutes and then try running your code again.

I had the same problem. It works on the real device, but fails systematically on simulator. I run Beta8 on macOS Tahoe and the latest Xcode beta.

Error: 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=0x600003300960 {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}"}}]))

Hi, my first post here. I have the same issue since today morning, till yesterday everything was working properly. I am on:

macOS 26.2 Xcode 26.2

Tried now also with the FoundationModelTripPlanner and getting:

Passing along 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} in response to ExecuteRequest

Received ModelManagerError that couldn't be converted to a TokenGenerationError: 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}

Failed to fetch model metadata. 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}

End sanitizeText with error: 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=0x600003300aa0 {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}"}}

What I've tried so far:

  • disabled Apple Intelligence in the system settings + reboot and enable it again (found this hint here in the forum)

  • reinstalled XCode

Both applications (mine and FoundationModelsTripPlanner) are working on a real device iPhone 17 on iOS 26.1

Any help is highly appreciated!

thanks

Strange, I've activated Siri, which triggered some downloads and now it works again. Nevertheless, it will be interesting to get a reliable recovery way, because I've tried this also previously and it didn't help

Error with guardrailViolation and underlyingErrors
 
 
Q