Dynamic LLM Model Switching During an Active LiveKit Voice Call

Hi LiveKit team,

We wanted to check if dynamic LLM switching is supported during an active LiveKit voice call.
Our use case is:

  • Use a faster/lightweight model like GPT-4.1 mini for simple conversational tasks.

  • Switch to a stronger reasoning model like GPT-5.4 for complex reasoning tasks.

Is it possible to switch models seamlessly within the same ongoing session/call without reconnecting the user or restarting the agent?

The way to achieve this would be to transfer from one agent to another. From your user’s perspective, this would appear seamless:

@sahil.dutta, the mechanic behind that: AgentSession doesn’t expose a runtime LLM-only swap. The llm, stt, tts plugins are set in init and stored as private fields with no public swap method livekit-agents/…/voice/agent_session.py. The only mid-session swap available is the whole Agent instance, via session.update_agent(agent).

You can use the pattern such as; instantiate two Agents (one with the fast model, one with the reasoning model) and call update_agent when you want to switch. The same source notes update_agent immediately blocks the old activity from accepting new user turns, which is what makes the transition seamless from the user’s perspective.

great insights mate. Thanks !