OptionalcheckOutput?: (output: TOutput, ctx: TStageContext) => TLlmOutputCheckFailure | undefinedOptionalmaxOutputTokens?: numberOptionalreasoningEffort?: TReasoningEffortOptionalretry?: Partial<TRetryPolicy>Optionaltools?: readonly TToolSpec[]
A check of the output's content, run once it matches the schema. A returned failure is handled exactly like a schema mismatch: the attempt is retried under the stage's retry policy (
schema_validationmust be inretryOn), and when the attempts run out the stage fails with that failure's code and message. It reads the stage context, so on the launch/complete path it runs only whencompleteStageis given the upstream outputs.