On macOS 26.0.1 Tahoe, I am using the FoundationModels
to do some text classification. However, I keep hitting guardrails pretty often.
For example, this headline:
SEC approves Texas Stock Exchange, first new US integrated exchange in decades
Hits the guardrails and throws error May contain sensitive content
:
refusal(FoundationModels.LanguageModelSession.GenerationError.Refusal(record: FoundationModels.LanguageModelSession.GenerationError.Refusal.TranscriptRecord), FoundationModels.LanguageModelSession.GenerationError.Context(debugDescription: "May contain sensitive content", underlyingErrors: []))
How can I disable the guardrails? Private API is fine too as it’s for local development only and not going on App Store.
I saw this comment mention it but I can’t figure out how to use it: