Is there a way to set a fallback LLM in Livekit Ag...
# ask-ai
f
Is there a way to set a fallback LLM in Livekit Agents in case there is a problem with default one
t
Thanks for reaching out, Heidi. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
You're asking whether LiveKit Agents can use a fallback LLM if the primary model fails — yes. The OpenRouter plugin supports a fallback chain via the
fallback_models
parameter. Provide an ordered list of model IDs and LiveKit will try the next model if the primary is unreachable or fails. Example (Python):
Copy code
from livekit.plugins import openai

llm = openai.LLM.with_openrouter(
    model="openai/gpt-4o",
    fallback_models=[
        "anthropic/claude-sonnet-4",
        "openai/gpt-5-mini",
    ],
)
This fallback mechanism is available specifically in the OpenRouter integration. Would you like an example for another language or help building the fallback list for your use case? Sources: OpenRouter LLM plugin guide | LiveKit docs