Skip to content

OutputGuardConfig

Configuration for guard.output().

optional onBlock?: "error" | "replace"

What to do when the validator blocks a response (ok: false).

  • "replace" (default): strip tool calls, return reason as text
  • "error": throw OutputGuardrailError

validate: OutputValidator

Validation function.