Skip to main content

Module reliable

Module reliable 

Structs§

ProviderFallbackAttribution
Fallback metadata for a caller that needs exact configured-candidate provenance in addition to the stable provider-family display fields.
ProviderFallbackInfo
Info about a model_provider fallback that occurred during a request.
ReliableModelProvider
ModelProvider wrapper with retry + auth-key rotation. The model_provider Vec exists for tests to exercise multi-provider failover; production wiring always passes a single primary. Per-model failover chains are also test-only — the schema no longer surfaces them.
ReliableProviderTerminalFailure
The typed terminal presentation cause for a Reliable provider failure.
ReliableRejectedCompletionUsage
A Reliable chat request exhausted its candidates after receiving rejected semantic completions. The provider-reported usage is retained so the turn loop can account for work that was billed even though no response was accepted.
ReliableSemanticEmptyCompletion
The final candidate attempt completed successfully at the transport layer but supplied neither usable text nor a native tool call. This remains typed independently from optional rejected-attempt usage so delivery layers can classify the actual terminal failure without guessing from accounting data.

Enums§

ReliableProviderTerminalFailureKind
A terminal Reliable failure that can be rendered safely at a user-facing delivery boundary without exposing retry-attempt diagnostics.

Functions§

is_auth_error
Check if an error indicates an authentication/authorization failure. Used by channels to evict cached model_providers whose OAuth tokens may have expired so the next request triggers a fresh credential resolution.
is_context_window_exceeded
is_non_retryable
Check if an error is non-retryable (client errors that won’t resolve with retries).
is_tool_schema_error
scope_provider_fallback
Run the given future within a provider-fallback scope. Both record_provider_fallback (inside ReliableModelProvider) and take_last_provider_fallback (post-loop channel code) must execute within this scope for the data to be visible.
take_last_provider_context_truncation
Take whether Reliable shortened the provider-visible transcript while recovering the current request from a context-window error.
take_last_provider_fallback
Take (consume) the last model_provider fallback info, if any. Must be called within a scope_provider_fallback scope.
take_last_provider_fallback_attribution
Take fallback metadata including the exact configured candidates.
transient_error_hint