limited-arm-86913
11/01/2025, 12:02 AMmodel = "gemini-2.5-flash-native-audio-preview-09-2025"
config = types.LiveConnectConfig(
response_modalities=["AUDIO"]
thinking_config=types.ThinkingConfig(
thinking_budget=1024,
include_thoughts=True
)
)tall-airline-16756
11/01/2025, 12:02 AMtall-airline-16756
11/01/2025, 12:03 AMthinking_config parameter to the RealtimeModel or LLM class instead of using LiveConnectConfig directly. Don’t worry—the framework will take care of integrating with LiveConnectConfig for you automatically.
Here’s a friendly example in Python to get you started:
from livekit.plugins.google import RealtimeModel
from google.genai.types import ThinkingConfig
# Using ThinkingConfig object
model = RealtimeModel(
model="gemini-2.5-flash-native-audio-preview-09-2025",
thinking_config=ThinkingConfig(thinking_budget=1024, include_thoughts=True)
)
And if you’re working with Node.js, here’s how you can set it up:
import { RealtimeModel } from '@livekit/agents-plugin-google';
const model = new RealtimeModel({
model: 'gemini-2.5-flash-native-audio-preview-09-2025',
thinkingConfig: {
thinkingBudget: 1024,
includeThoughts: true,
},
});
Just a quick tip: make sure your thinking_budget value is between 0 and 24576. Setting it to 0 will turn off thinking, while higher numbers let the model do more complex reasoning. If you have any questions or need further assistance, feel free to ask—I’m here to help!
Sources: plugins/google/src/llm.ts | livekit-plugins/livekit-plugins-aws/livekit/plugins/aws/experimental/realti... | Gemini Live API plugin | LiveKit docs