Expand description
Fallback provider – tries a primary LLM, falls back to secondary on transient failure.
Only falls back when the primary returns a transient error (as classified by
PeError::is_transient()). Permanent errors propagate immediately.
§Example
ⓘ
use pe_core::fallback_provider::FallbackProvider;
let provider = FallbackProvider::new(openai_provider, anthropic_provider);
// Uses OpenAI by default; on transient failure, retries with AnthropicStructs§
- Fallback
Provider - Wraps a primary and secondary
LlmProvider. On transient failure from the primary, automatically tries the secondary.