Error handling strategy for structured output via ToolStrategy.
True: Catch all errors with default error templatestr: Catch all errors with this custom messagetype[Exception]: Only catch this exception type with default messagetuple[type[Exception], ...]: Only catch these exception types with default
messageCallable[[Exception], str]: Custom function that returns error messageFalse: No retry, let exceptions propagateWhen schema is a raw JSON schema dict (as opposed to a Pydantic model,
dataclass, or TypedDict), the model's tool-call arguments are returned
as-is without validation against the schema.
As a result, handle_errors is effectively inert for dict schemas. To get
validation and automatic retries, express the schema as a Pydantic model,
dataclass, or TypedDict instead.