Skip to main content
Use checkOutput(...) after the provider returns final text and before your application returns it.
For output checkpoints, valid decisions are allow, block, and rewrite.

Handle Rewrites

If the decision is rewrite, 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.