ModerationGuardOptions
Properties
Section titled “Properties”categories?
Section titled “categories?”optional categories?: string[];Policy categories to flag. Defaults cover the standard abuse set.
optional id?: string;message?
Section titled “message?”optional message?: string;User-facing message when content is flagged.
model: LanguageModel;Classifier model. Use a small/fast model — this runs on every turn it guards.
onError?
Section titled “onError?”optional onError?: "block" | "allow";What to do when the classifier itself errors. allow (default) fails open —
deterministic guards still run and an outage does not take the agent down.
block fails closed for zero-tolerance deployments.