Skip to main content

Hosted by LiveKit

A fast, open-weight LLM hosted on LiveKit Inference and recommended as the default for voice agents.

On this page

Use in Agent Builder

Create a new agent in your browser using this model

Overview

LiveKit hosts a fast, open-weight model through LiveKit Inference and tunes the deployment for the low latency that voice agents need, making it the recommended default LLM for your agents. You don't manage a separate provider API key, and usage and rate limits are handled through LiveKit Cloud. See the pricing page  for current rates.

LiveKit Inference

Use LiveKit Inference to access LiveKit's open-weight hosted models.

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.

Model nameModel IDEU endpoint
Gemma 4 31B
google/gemma-4-31b-it
EU endpoint

Usage

To use LiveKit hosted models, use the LLM class from the inference module. You can use this LLM in the Voice AI quickstart:

from livekit.agents import AgentSession, inference
session = AgentSession(
llm=inference.LLM(
model="google/gemma-4-31b-it",
extra_kwargs={
"max_completion_tokens": 1000
}
),
# ... tts, stt, vad, turn_handling, etc.
)
import { AgentSession, inference } from '@livekit/agents';
const session = new AgentSession({
llm: new inference.LLM({
model: "google/gemma-4-31b-it",
modelOptions: {
max_completion_tokens: 1000
}
}),
// ... tts, stt, vad, turnHandling, etc.
});

Parameters

The following are parameters for configuring LiveKit open-weight hosted models with LiveKit Inference. For model behavior parameters like temperature and max_completion_tokens, see model parameters.

model
Required
string

The model ID from the models list.

providerstring

Deprecated. Support for provider pinning ends on March 1, 2027. Omit provider to let LiveKit route requests and use fallback providers. See provider pinning deprecation for migration guidance.

extra_kwargsdict

Additional parameters to pass to the (OpenAI-compatible) Chat Completions API, such as max_tokens or temperature. See model parameters for supported fields.

In Node.js this parameter is called modelOptions.

Model parameters

Pass the following parameters inside extra_kwargs (Python) or modelOptions (Node.js). For more details about each parameter in the list, see Inference parameters.

ParameterTypeDefaultNotes
temperaturefloat1Controls the randomness of the model's output. Valid range: 0-2. Not supported by reasoning models.
top_pfloat1Alternative to temperature. Valid range: 0-1. Not supported by reasoning models.
max_tokensintMaximum tokens to generate. Use max_completion_tokens for newer models.
max_completion_tokensintMaximum tokens to generate, including reasoning tokens. Preferred over max_tokens for newer models.
frequency_penaltyfloat0Reduces the model's likelihood to repeat the same line verbatim. Valid range: -2.0-2.0. Not supported by reasoning models.
presence_penaltyfloat0Increases the model's likelihood to talk about new topics. Valid range: -2.0-2.0. Not supported by reasoning models.
seedintEnables deterministic sampling. The system makes a best effort to return the same result for identical requests.
stopstr | list[str]Sequences that stop generation. Up to 4 sequences.
nintNumber of completions to generate. Not supported by reasoning models.
logprobsboolReturns log probabilities of each output token. Not supported by reasoning models.
top_logprobsintNumber of most likely tokens to return at each position. Valid range: 0-20. Requires logprobs: true. Not supported by reasoning models.
logit_biasdict[str, int]Adjusts likelihood of specified tokens appearing in the output. Not supported by reasoning models.
parallel_tool_callsboolWhether the model can make multiple tool calls in a single response.
tool_choiceToolChoice | Literal['auto', 'required', 'none']"auto"Controls how the model uses tools.
reasoning_effortstr"none"Enables reasoning when set to any value other than none. Gemma doesn't support multiple reasoning levels, so unlike other reasoning models, the value itself doesn't control effort — any non-none string turns reasoning on.
add_generation_promptbooltrueWhether to append the assistant generation prompt to the chat template, signaling the model to begin its response. Set to false to omit it. Specific to open-weight models.
continue_final_messageboolfalseWhether to continue the final message in the conversation instead of starting a new turn. Useful for prefilling the start of the model's response. Cannot be used together with add_generation_prompt. Specific to open-weight models.

String descriptors

As a shortcut, you can also pass a model ID directly to the llm argument in your AgentSession:

from livekit.agents import AgentSession
session = AgentSession(
llm="google/gemma-4-31b-it",
# ... tts, stt, vad, turn_handling, etc.
)
import { AgentSession } from '@livekit/agents';
const session = new AgentSession({
llm: "google/gemma-4-31b-it",
// ... tts, stt, vad, turnHandling, etc.
});

Additional resources

The following resources provide more information about using open-weight hosted models with LiveKit Agents.