> ## Documentation Index
> Fetch the complete documentation index at: https://docs.averta.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Output checkpoint

> Evaluate final model output in a custom provider adapter.

Use `checkOutput(...)` after the provider returns final text and before your application returns it.

```typescript theme={null}
const decision = await client.checkOutput({
  provider: {
    name: "custom-provider",
    operation: "messages.create",
    model: "model-name",
  },
  content: {
    value: "Here is the final answer from the model.",
  },
  rewriteAttempt: 0,
});
```

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.
