Skip to main content

Large language models (LLM) overview

Conversational intelligence for your voice agents.

On this page

Overview

The core reasoning, response, and orchestration of your voice agent is powered by an LLM. You can choose between a variety of models to balance performance, accuracy, and cost. In a voice agent, your LLM receives a transcript of the user's speech from an STT model, and produces a text response which is turned into speech by a TTS model.

You can choose a model served through LiveKit Inference, included with LiveKit Cloud. With LiveKit Inference, your agent runs on LiveKit's infrastructure to minimize latency. No separate provider API key is required, and usage and rate limits are managed through LiveKit Cloud. Use the plugin instead if you prefer to manage billing and rate limits yourself, or need access to a provider not currently available through LiveKit Inference.

LiveKit Inference

The following models are available in LiveKit Inference. Refer to the guide for each model for more details on additional configuration options.

Recommended for voice agents

Gemma 4 31B is the recommended default LLM. It's a latency-optimized, open-weight model served on LiveKit's infrastructure.

A checkmark in the EU endpoint column means the model has a dedicated EU endpoint, in addition to the global endpoint. To learn more, see Data residency.

Hosted by LiveKit

Model nameModel IDProvidersEU endpoint
Gemma 4 31B
google/gemma-4-31b-it
  • livekit
EU endpoint

DeepSeek

Model nameModel IDProvidersEU endpoint
DeepSeek-V4 Pro
deepseek-ai/deepseek-v4-pro
  • vercel
No EU endpoint
DeepSeek-V4.1 Flash
deepseek-ai/deepseek-v4.1-flash
  • baseten
No EU endpoint
DeepSeek-V3
deepseek-ai/deepseek-v3
  • baseten
    Retired
No EU endpoint
DeepSeek-V3.1
deepseek-ai/deepseek-v3.1
  • baseten
    Retired
No EU endpoint
DeepSeek-V3.2
deepseek-ai/deepseek-v3.2
  • deepseek
    Retired
No EU endpoint

Gemini

Model nameModel IDProvidersEU endpoint
Gemini 3 Flash
google/gemini-3-flash-preview
  • google
No EU endpoint
Gemini 3.1 Flash Lite
google/gemini-3.1-flash-lite
  • google
EU endpoint
Gemini 3.1 Pro
google/gemini-3.1-pro-preview
  • google
No EU endpoint
Gemini 3.5 Flash
google/gemini-3.5-flash
  • google
EU endpoint
Gemini 3.5 Flash Lite
google/gemini-3.5-flash-lite
  • google
EU endpoint
Gemini 3.8 Flash
google/gemini-3.8-flash
  • google
EU endpoint
Gemini 4 Argon
google/gemini-4-argon
  • google
EU endpoint
Gemini 4 Hydrogen
google/gemini-4-hydrogen
  • google
EU endpoint
Gemini 4 Neon
google/gemini-4-neon
  • google
No EU endpoint
Gemini Decision 1
google/gemini-decision-1
  • google
No EU endpoint
Gemini 3.6 Flash
google/gemini-3.6-flash
  • google
    Deprecated
    Retires
EU endpoint
Gemini 3.7 Flash
google/gemini-3.7-flash
  • google
    Deprecated
    Retires
EU endpoint
Gemini 2.0 Flash
google/gemini-2.0-flash
  • google
    Retired
No EU endpoint
Gemini 2.0 Flash-Lite
google/gemini-2.0-flash-lite
  • google
    Retired
No EU endpoint
Gemini 2.5 Flash
google/gemini-2.5-flash
  • google
    Retired
EU endpoint
Gemini 2.5 Flash-Lite
google/gemini-2.5-flash-lite
  • google
    Retired
EU endpoint
Gemini 2.5 Pro
google/gemini-2.5-pro
  • google
    Retired
EU endpoint
Gemini 3 Pro
google/gemini-3-pro-preview
  • google
    Retired
No EU endpoint

Meta

Model nameModel IDProvidersEU endpoint
Muse Spark 1.3
meta/muse-spark-1.3
  • meta
No EU endpoint
Muse Wonder 1.0
meta/muse-wonder-1.0
  • meta
No EU endpoint

Kimi

Model nameModel IDProvidersEU endpoint
Kimi K2.6
moonshotai/kimi-k2.6
  • vercel
No EU endpoint
Kimi K2 Instruct
moonshotai/kimi-k2-instruct
  • baseten
    Retired
No EU endpoint
Kimi K2.5
moonshotai/kimi-k2.5
  • baseten
    Retired
No EU endpoint

OpenAI

Model nameModel IDProvidersEU endpoint
ChatGPT Latest
openai/chat-latest
  • azure
  • openai
No EU endpoint
GPT-5
openai/gpt-5
  • azure
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5 mini
openai/gpt-5-mini
  • azure
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5 nano
openai/gpt-5-nano
  • azure
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5.2
openai/gpt-5.2
  • azure
  • openai
EU endpoint
GPT-5.4
openai/gpt-5.4
  • azure
  • openai
EU endpoint
GPT-5.4 mini
openai/gpt-5.4-mini
  • azure
  • openai
EU endpoint
GPT-5.5
openai/gpt-5.5
  • azure
  • openai
EU endpoint
GPT-5.6 Luna
openai/gpt-5.6-luna
  • azure
  • openai
EU endpoint
GPT-5.6 Sol
openai/gpt-5.6-sol
  • azure
  • openai
EU endpoint
GPT-5.6 Terra
openai/gpt-5.6-terra
  • azure
  • openai
EU endpoint
GPT-6 Luna
openai/gpt-6-luna
  • azure
  • openai
EU endpoint
GPT-6 Luna (Decisions)
openai/gpt-6-luna-decisions
  • openai
EU endpoint
GPT-6 Sol
openai/gpt-6-sol
  • azure
  • openai
EU endpoint
GPT-6.1 Sol
openai/gpt-6.1-sol
  • azure
  • openai
EU endpoint
GPT-6.1 Terra
openai/gpt-6.1-terra
  • openai
EU endpoint
GPT OSS 120B
openai/gpt-oss-120b
  • baseten
  • groq
No EU endpoint
GPT-4.1
openai/gpt-4.1
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-4.1 mini
openai/gpt-4.1-mini
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-4.1 nano
openai/gpt-4.1-nano
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-4o
openai/gpt-4o
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-4o mini
openai/gpt-4o-mini
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5.1
openai/gpt-5.1
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5.4 nano
openai/gpt-5.4-nano
  • azure
    Deprecated
    Retires
  • openai
    Deprecated
    Retires
EU endpoint
GPT-5.1 Chat
openai/gpt-5.1-chat-latest
  • azure
    Retired
  • openai
    Retired
No EU endpoint
GPT-5.2 Chat
openai/gpt-5.2-chat-latest
  • azure
    Retired
  • openai
    Retired
No EU endpoint
GPT-5.3 Chat
openai/gpt-5.3-chat-latest
  • azure
    Retired
  • openai
    Retired
No EU endpoint

SpaceXAI

Model nameModel IDProvidersEU endpoint
Grok 4.20
xai/grok-4.20-0309-non-reasoning
  • xai
No EU endpoint
Grok 4.20 Reasoning
xai/grok-4.20-0309-reasoning
  • xai
No EU endpoint
Grok 4.20 Multi-Agent
xai/grok-4.20-multi-agent-0309
  • xai
No EU endpoint
Grok 4.3
xai/grok-4.3
  • xai
No EU endpoint
Grok 4.5
xai/grok-4.5
  • xai
No EU endpoint
Grok 4.6
xai/grok-4.6
  • xai
No EU endpoint
Grok 4.7
xai/grok-4.7
  • xai
No EU endpoint
Grok 4.1 Fast
xai/grok-4-1-fast-non-reasoning
  • xai
    Retired
No EU endpoint
Grok 4.1 Fast Reasoning
xai/grok-4-1-fast-reasoning
  • xai
    Retired
No EU endpoint
Retired models
A Retired badge means that provider no longer serves the model. A model that is retired by every listed provider is no longer accessible. Switch to a currently available model.

Plugins

The LiveKit Agents framework also includes a variety of open source plugins for a wide range of LLM providers. Plugins are especially useful if you need custom or fine-tuned models. These plugins require authentication with the provider yourself, usually via an API key. You are responsible for setting up your own account and managing your own billing and credentials. The plugins are listed below, along with their availability for Python or Node.js.

ProviderPythonNode.js
✓—
✓✓
✓—
✓✓
✓✓
✓—
✓✓
✓—
✓✓
✓✓
✓✓
✓✓
✓✓
✓—
✓✓
✓—
✓✓
✓✓
✓✓
✓✓
✓✓

Have another provider in mind? LiveKit is open source and welcomes new plugin contributions.

Usage

To set up an LLM in an AgentSession, provide the model ID to the llm argument. LiveKit Inference manages the connection to the model automatically. Consult the models list for available models.

from livekit.agents import AgentSession, inference
session = AgentSession(
llm=inference.LLM(model="google/gemma-4-31b-it"),
)
import { AgentSession, inference } from '@livekit/agents';
const session = new AgentSession({
llm: new inference.LLM({ model: "google/gemma-4-31b-it" }),
});

Model parameters

The LLM class from the inference module lets you configure additional model parameters via extra_kwargs (Python) or modelOptions (Node.js). For the full parameter reference, see Inference LLM parameters or your model's documentation. These options can also be updated at runtime without rebuilding the LLM.

Advanced features

The following sections cover more advanced topics common to all LLM providers. For more detailed reference on individual provider configuration, consult the model reference or plugin documentation for that provider.

Custom LLM

To create an entirely custom LLM, implement the LLM node in your agent.

Standalone usage

You can use an LLM instance as a standalone component with its streaming interface. It expects a ChatContext object, which contains the conversation history. The return value is a stream of ChatChunk objects. This interface is the same across all LLM providers, regardless of their underlying API design:

from livekit.agents import ChatContext
from livekit.plugins import openai
# Use Responses API (recommended for direct OpenAI usage)
llm = openai.responses.LLM(model="gpt-4o-mini")
chat_ctx = ChatContext()
chat_ctx.add_message(role="user", content="Hello, this is a test message!")
async with llm.chat(chat_ctx=chat_ctx) as stream:
async for chunk in stream:
print("Received chunk:", chunk.delta)

Collecting the response

Available inPython
|
Node.js

LLMStream provides a collect() convenience method that awaits the full response and returns a CollectedResponse with text, tool_calls (toolCalls in Node.js), usage, and extra fields. It's useful for background tasks, pre-processing, or any workflow that needs LLM output outside of the voice pipeline, for example, summarizing conversation history before a handoff.

The following example shows how to collect a full response and execute any tool calls it contains:

import asyncio
from dotenv import load_dotenv
from livekit.agents import function_tool, inference, llm
load_dotenv(".env.local")
my_llm = inference.LLM(model="google/gemma-4-31b-it")
@function_tool
async def get_weather(location: str) -> str:
"""Get the current weather for a location.
Args:
location: The city name to get weather for.
"""
print(f" [tool called] get_weather(location={location!r})")
return f"The weather in {location} is sunny and 72°F."
async def main() -> None:
tools = [get_weather]
tool_ctx = llm.ToolContext(tools)
chat_ctx = llm.ChatContext()
chat_ctx.add_message(role="system", content="You are a helpful assistant.")
chat_ctx.add_message(role="user", content="What's the weather in San Francisco?")
# First LLM call — expect a tool call
response = await my_llm.chat(chat_ctx=chat_ctx, tools=tools).collect()
print(f"text: {response.text!r}")
print(f"tool_calls: {response.tool_calls}")
# Execute each tool call and add results to context
for tc in response.tool_calls:
result = await llm.execute_function_call(tc, tool_ctx)
chat_ctx.insert(result.fnc_call)
if result.fnc_call_out:
chat_ctx.insert(result.fnc_call_out)
# Second LLM call — expect a final text response
final = await my_llm.chat(chat_ctx=chat_ctx, tools=tools).collect()
print(f"final: {final.text!r}")
if __name__ == "__main__":
asyncio.run(main())
import { inference, llm } from '@livekit/agents';
import { z } from 'zod';
const myLlm = new inference.LLM({ model: 'google/gemma-4-31b-it' });
const getWeather = llm.tool({
name: 'getWeather',
description: 'Get the current weather for a location.',
parameters: z.object({
location: z.string().describe('The city name to get weather for.'),
}),
execute: async ({ location }) => `The weather in ${location} is sunny and 72°F.`,
});
const toolCtx = new llm.ToolContext([getWeather]);
const chatCtx = new llm.ChatContext();
chatCtx.addMessage({ role: 'system', content: 'You are a helpful assistant.' });
chatCtx.addMessage({ role: 'user', content: "What's the weather in San Francisco?" });
// First LLM call — expect a tool call
const response = await myLlm.chat({ chatCtx, toolCtx }).collect();
console.log('text:', response.text);
console.log('toolCalls:', response.toolCalls);
// Execute each tool call and add the call and its result to the context
for (const toolCall of response.toolCalls) {
chatCtx.insert(toolCall);
chatCtx.insert(await llm.executeToolCall(toolCall, toolCtx));
}
// Second LLM call — expect a final text response
const final = await myLlm.chat({ chatCtx, toolCtx }).collect();
console.log('final:', final.text);

Vision

LiveKit Agents supports image input from URL or from realtime video frames. Consult your model provider for details on compatible image types, external URL support, and other constraints. For more information, see Images.

Additional resources

The following resources cover related topics that may be useful for your application.