AgentModelRetryConfig:
Build
Outputs and retries
Validate Python agent outputs and retry bounded model failures.
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
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