jolly-apartment-95291
07/24/2025, 10:46 PMtall-airline-16756
07/24/2025, 10:46 PMtall-airline-16756
07/24/2025, 10:47 PMLLMStream class includes built-in retry logic with exponential backoff for recoverable errors. You can configure the number of retry attempts using the max_retry option in the connection settings.
• FallbackAdapter for Multiple LLM Providers: Use the FallbackAdapter to switch between multiple LLM providers automatically when one fails. This provides:
◦ Automatic failover to backup LLMs
◦ Background recovery for failed providers
◦ Customizable retry attempts and timeouts
• Error Event Handling: The AgentSession emits ErrorEvent when errors occur. If the error is recoverable, the session will retry automatically. If not, intervention may be required after retries are exhausted.
• Configuration Options: You can adjust retry behavior using APIConnectOptions, including:
◦ `max_retry`: Number of retry attempts
◦ `timeout`: Request timeout duration
◦ `retry_interval`: Interval between retries
These mechanisms ensure that the "no candidates in the response" scenario is handled gracefully, minimizing the risk of perceived failure.
Sources: livekit-plugins/livekit-plugins-openai/livekit/plugins/openai/llm.py | Agents Core Architecture | livekit/livekit_composite | DeepWiki | Events and error handling | LiveKit Docs | Events and error handling | LiveKit Docs