Expand description
Standard-lane executor: walk a route’s legs with per-leg breaker + retry.
Structs§
- Committed
Stream - A committed streaming leg: the winning provider/model plus the remaining item stream (first item already re-prepended).
- Completion
- Normalised result of one completed LLM call.
- Stream
Timeouts - Time bounds for a streaming leg.
Enums§
- LegError
- Errors from a single streaming leg.
Startfailures are fallback-eligible.
Functions§
- execute_
buffered - Buffered (non-streaming) executor: walk legs, fully buffering each. Any failure (start or mid-stream) advances to the next leg. Nothing is ever flushed to the client, so full-chain fallback is preserved.
- execute_
buffered_ with_ timeouts - Buffered executor with explicit first-chunk and idle timeouts. Walk legs, fully buffering each. Any failure (start, timeout, or mid-stream) advances to the next leg. Nothing is ever flushed to the client, so full-chain fallback is preserved.
- execute_
chain - Walk legs in order. Retryable failure (or open breaker) advances; the first
non-retryable failure aborts. Returns
AllLegsFailedif every leg fails. - execute_
streaming - Streaming executor: for each leg, start the stream and peek the first item. First leg to yield an item is committed; failures before the first item fall back. After commitment there is no fallback (caller surfaces mid-stream errors as SSE error events).
- execute_
streaming_ with_ timeouts - Streaming executor with explicit first-chunk timeout. For each leg, start
the stream and peek the first item within
t.first_chunk. First leg to yield an item is committed; failures (including timeout) before the first item fall back. After commitment there is no fallback. - stream_
one_ leg_ standard - Standard-lane per-leg primitive: open a genai stream, normalize to
StreamItem. OuterErr(LegError::Start)= stream could not begin (fallback-eligible).