checkOutput(...) after the provider returns final text and before your application returns it.
allow, block, and rewrite.
Handle Rewrites
If the decision isrewrite, use decision.actions?.rewrite?.category to build a provider-specific rewrite prompt, call the provider again, and check the rewritten output with rewriteAttempt: 1.
Provider wrappers do this for supported non-streaming calls. Custom adapters must implement the rewrite loop themselves.