most-optician-26302
04/16/2026, 11:45 AMmodel = "gemini-3.1-flash-live-preview"
config = types.LiveConnectConfig(
response_modalities=["AUDIO"]
thinking_config=types.ThinkingConfig(
thinking_level="low",
)
)
async with client.aio.live.connect(model=model, config=config) as session:
# Send audio input and receive audiotall-airline-16756
04/16/2026, 11:45 AMtall-airline-16756
04/16/2026, 11:45 AMthinking_level for gemini-3.1-flash-live-preview.
Your snippet is correct. Valid thinking_level values are: "minimal", "low", "medium", and "high". The default is "minimal" (lowest latency). To change it, set thinking_config in LiveConnectConfig as you already do. Example:
config = types.LiveConnectConfig(
response_modalities=["AUDIO"],
thinking_config=types.ThinkingConfig(
thinking_level="medium", # minimal | low | medium | high
)
)
If you want guidance on trade-offs (latency vs. reasoning quality) or which level to pick for a specific use case (e.g., real-time conversation vs. complex reasoning), tell me your use case and I’ll recommend a level.
Sources: Gemini Live API plugin | LiveKit Documentation, with interactive elementsmost-optician-26302
04/16/2026, 11:47 AMtall-airline-16756
04/16/2026, 11:48 AMRealtimeModel. For Gemini 3.1 use `thinking_level`; for Gemini 2.5 use thinking_budget.
Example for Gemini 3.1:
from livekit.plugins import google
from google.genai import types
session = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-3.1-flash-live-preview",
voice="Puck",
temperature=0.8,
instructions="You are a helpful assistant",
thinking_config=types.ThinkingConfig(
thinking_level="medium", # minimal | low | medium | high
include_thoughts=False, # optional
),
),
)
If you want, tell me which model/version you’re using and your priority (lowest latency vs. better reasoning) and I’ll recommend a specific level.
Sources: Gemini Live API plugin | LiveKit Documentation, with interactive elementsmost-optician-26302
04/16/2026, 12:03 PMtall-airline-16756
04/16/2026, 12:04 PMfrom google.genai import types
from livekit.plugins import google
from livekit.agents import AgentSession
session = AgentSession(
llm=google.realtime.RealtimeModel(
model="gemini-3.1-flash-live-preview",
voice="Puck",
temperature=0.8,
instructions="You are a helpful assistant",
input_audio_transcription=types.InputAudioTranscription(
model="whisper-1"
),
thinking_config=types.ThinkingConfig(thinking_level="medium"),
),
)
Then listen for conversation items (user role) or the lk.transcription text stream and save the text to your DB/file.
• Separate STT + turn detection (more control, recommended for production)
◦ Disable automatic activity detection for Gemini and enable a turn-detection model.
◦ Use an external STT (e.g., Deepgram) to produce transcripts.
◦ Capture transcripts from the STT or from conversation events and persist them.
If you want, tell me:
• which SDK/language you’re using (Python, JS, server, client), and
• whether you prefer built-in simplicity or a more robust STT pipeline,
and I’ll provide the exact code/event hooks to save transcripts to your storage.
Sources: Gemini Live API plugin | LiveKit Documentation | Text and transcriptions | LiveKit Documentation, with interactive elementsmost-optician-26302
04/22/2026, 9:46 PMtall-airline-16756
04/22/2026, 9:46 PMgenerate_reply(), update_instructions(), update_chat_ctx() aren’t compatible, and send_client_content is restricted to initial history seeding). To help quickly, what specific functionality is failing for you?
Please include:
• SDK/language and code snippet where the failure happens
• Model string you’re using (e.g., gemini-3.1-flash-live-preview)
• Any error messages, unexpected behavior, or logs
• Whether you’re using built-in transcription or an external STT
With that I’ll suggest targeted workarounds or config changes.
, with interactive elementsmost-optician-26302
04/22/2026, 9:49 PMtall-airline-16756
04/22/2026, 9:49 PMgenerate_reply(), update_instructions(), and update_chat_ctx() are not compatible, and send_client_content is limited to initial history seeding.
• These model-imposed limits cause the behaviors you described (functions that work with other models may be no-ops or error when used with 3.1).
What LiveKit still handles
• LiveKit continues to provide real-time plumbing (audio streams, events, text stream handlers, turn detection, registering handlers). Transcription capture via lk.transcription or text stream handlers and using external STT is supported as described earlier.
Next step
• If you share one failing function, the SDK/language, your model string, and any error/log output, I’ll confirm whether it’s a model limitation and suggest a concrete workaround (e.g., use a different model for that feature, perform instruction updates in your app layer, or use an external STT pipeline)., with interactive elements