Skip to main content
Use final-output validation when downstream Python code expects structured data. Validation callbacks should be deterministic and should raise when the final value does not meet the application contract. Configure bounded retries with AgentModelRetryConfig:
The completed step retains its final model-attempt count. Tool errors use their own policy and are not retried as model requests. The gateway client accepts structured output, routing, provider, reasoning, managed-tool, plugin, prompt-cache, and additional request options.
Last modified on July 26, 2026