One Logo Pool Ball
FoundationModels · IOS API REFERENCE

SystemLanguageModel.Guardrails

struct · iOS 26.0+ · SDK 27.1

struct Guardrails

A set of controls that flag sensitive content from model input and output.

Members (2)

get · iOS 26.0+

permissiveContentTransformations

TypeScript
static get permissiveContentTransformations(): SystemLanguageModel_Guardrails
Swift declaration
static let permissiveContentTransformations: SystemLanguageModel.Guardrails

Guardrails that allow for permissively transforming text input, including potentially unsafe content, to text responses. The `permissiveContentTransform` guardrail model lets the model handle potentially unsafe content, such as summarizing a news article. In this mode, requests you make to the model that generate a `String` will not throw ``LanguageModelError/guardrailViolation(_:)`` errors. However, the model may still sometimes refuse to respond to a sensitive prompt, in which case it generates a `String` refusal message. When you generate responses other than `String`, this mode behaves the same way as ``SystemLanguageModel/Guardrails/default`` mode and throws ``LanguageModelError/guardrailViolation(_:)`` errors.

get · iOS 26.0+

default

TypeScript
static get default(): SystemLanguageModel_Guardrails
Swift declaration
static let `default`: SystemLanguageModel.Guardrails

Guardrails that default to ensuring that the system blocks unsafe content in prompts and responses. The `default` guardrail level means that all guardrails are turned on. When the guardrails block unsafe content from either the prompt input or model response, the framework throws a ``LanguageModelError/guardrailViolation(_:)`` error.

Skipped declarations

No declarations were skipped in this snapshot.

All FoundationModels types →