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.
Signature
class ai.clients.FallbackStreaming 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 22111–28232
Fields
members
Instance methods
_try
(Implementations
ai.Client for ai.clients.Fallback
Instance methods
default_cache_args
(self) -> baml.json.json throws neverThe 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).
invoke
(provider
(self) -> string throws neverrender
(Rendering previews the first fallback member. It never probes later members because request construction itself must remain pure.
requested_model
(self) -> string throws neverSource:<builtin>/ai/ns_clients/clients.bamlbytes 23896–25445
ai.stream.StreamingClient for ai.clients.Fallback
Instance methods
Source:<builtin>/ai/ns_clients/clients.bamlbytes 25451–28230