hi, how do we configure this thinking budget in li...
# ask-ai
l
hi, how do we configure this thinking budget in livekit:
Copy code
model = "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
    )
)
t
Thanks for reaching out, James. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
I'm happy to help you configure the thinking budget in LiveKit! To do this, you'll want to pass the
thinking_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:
Copy code
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:
Copy code
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