ai.clients.Fallback

Streaming fallback advances in member order only for a typed, safely retryable failure or a member timeout that occurs before the first text delta is returned.

Reference version

Signature

class ai.clients.Fallback

Streaming fallback advances in member order only for a typed, safely retryable failure or a member timeout that occurs before the first text delta is returned.

Source:<builtin>/ai/ns_clients/clients.bamlbytes 21355–26945

Fields

Instance methods

Implementations

ai.Client for ai.clients.Fallback

Instance methods

function

default_cache_args

(self) -> baml.json.json throws never

The args this client uses for a ${cache()} written with none (or with null): the object its wire's cache marker carries. Null when the client has no cache marker on its wire, or when the model it is configured for would reject one; a ${cache()} then sends nothing.

A client that sends cache markers passes this to ai.wire.prompt_parts(message, default_cache_args).

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 previews the first fallback member. It never probes later members because request construction itself must remain pure.

Source:<builtin>/ai/ns_clients/clients.bamlbytes 23020–24581