billions-lawyer-8588
10/20/2025, 7:16 PMtall-airline-16756
10/20/2025, 7:16 PMtall-airline-16756
10/20/2025, 7:18 PMthinking_config parameter when initializing the LLM or RealtimeModel. Let me walk you through how to configure it:
For Regular Gemini LLM:
• *Python:*`from livekit.plugins import google
llm = google.LLM(
model="gemini-2.0-flash-001",
thinking_config={
"thinking_budget": 1000 # Must be an integer
}
)`
• *Node.js:*`import { google } from '@livekit/agents-plugins-google';
const llm = new google.LLM({
model: 'gemini-2.0-flash-001',
thinkingConfig: {
thinkingBudget: 1000 // Must be between 0 and 24576
}
});`
For Gemini Realtime API:
• *Python:*`from livekit.plugins.google.realtime import RealtimeModel
model = RealtimeModel(
model="gemini-2.0-flash-exp",
thinking_config={
"thinking_budget": 1000
}
)`
Key Details:
• The thinking_budget parameter should be an integer in Python and between 0 and 24576 in Node.js.
• This configuration is checked during initialization and then passed along to the Gemini API.
If you have any questions or need a hand with anything else, please don’t hesitate to reach out—I’m here to help!
Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/realtime/real... | .cursor/rules/agent-core.mdc