ai.clients.Retry

class in the ai package.

Reference version

Signature

class ai.clients.Retry

Source:<builtin>/ai/ns_clients/clients.bamlbytes 7616–12399

Fields

max_attempts

int

Static methods

Instance methods

function

_wants_retry

(self, cause: ai.clients.Retryable) -> bool throws never

The safety gate is not overridable; the judgment is. retry_if judges typed failures; a member timeout passes the gate and is always retried.

Implementations

ai.Client for ai.clients.Retry

Instance methods

function

id

(self) -> string throws never
function

render

(
self,
) -> baml.http.Request throws baml.errors.Timeout | baml.errors.UnknownError | reflect.errors.CompilationError | ai.errors.Failure

Rendering is a pure preview of the inner client. It deliberately does not apply retry policy or backoff because no request is sent.

Source:<builtin>/ai/ns_clients/clients.bamlbytes 9519–10469