Can you help me resolve this error? ```{"message":...
# ask-ai
w
Can you help me resolve this error?
Copy code
{"message": "✅ Agent connected to room successfully", "level": "INFO", "name": "start", "room": "room-bca34cbf", "pid": 1371149, "job_id": "AJ_F5F9ZRHuzQje", "timestamp": "2025-12-11T10:59:59.124902+00:00"}
5|livekit-agent | ERROR:livekit.plugins.google:Gemini Realtime API error: received 1008 (policy violation) models/gemini-2.0-flash-live-001 is not found for API version v1beta, or is not supported for bidiGenerateContent. Call Lis; then sent 1008 (policy violation) models/gemini-2.0-flash-live-001 is not found for API version v1beta, or is not supported for bidiGenerateContent. Call Lis
5|livekit-agent | Traceback (most recent call last):
5|livekit-agent |   File "/home/ubuntu/lms-ai-tutor/py-agent/.venv/lib/python3.12/site-packages/livekit/plugins/google/beta/realtime/realtime_api.py", line 589, in _main_task
5|livekit-agent |     async with self._client.aio.live.connect(
5|livekit-agent |   File "/usr/lib/python3.12/contextlib.py", line 210, in __aenter__
5|livekit-agent |     return await anext(self.gen)
5|livekit-agent |            ^^^^^^^^^^^^^^^^^^^^^
5|livekit-agent |   File "/home/ubuntu/lms-ai-tutor/py-agent/.venv/lib/python3.12/site-packages/google/genai/live.py", line 1053, in connect
5|livekit-agent |     logger.info(await ws.recv(decode=False))
5|livekit-agent |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^
5|livekit-agent |   File "/home/ubuntu/lms-ai-tutor/py-agent/.venv/lib/python3.12/site-packages/websockets/asyncio/connection.py", line 322, in recv
5|livekit-agent |     raise self.protocol.close_exc from self.recv_exc
5|livekit-agent | websockets.exceptions.ConnectionClosedError: received 1008 (policy violation) models/gemini-2.0-flash-live-001 is not found for API version v1beta, or is not supported for bidiGenerateContent. Call Lis; then sent 1008 (policy violation) models/gemini-2.0-flash-live-001 is not found for API version v1beta, or is not supported for bidiGenerateContent. Call Lis
t
Thanks for reaching out, Rahul. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — you're hitting the Gemini Realtime policy error in the logs. I reviewed the traceback and the plugin message: the realtime connection was closed with a 1008 (policy violation) because the model ID
models/gemini-2.0-flash-live-001
is not found for API version
v1beta
or not supported for
bidiGenerateContent
. I'll help you resolve it. What to do next 1. Change the model to a supported realtime model. Use: ◦
gemini-2.5-flash-native-audio-preview-09-2025
1. Confirm your plugin/auth setup: ◦ Ensure
GOOGLE_API_KEY
is set (or pass
api_key
to the client). ◦ Use a current version of the LiveKit Google plugin that supports Gemini Live. 1. Restart the agent after updating the model and dependencies. If you want, I can: • Show the exact code snippet to update in your agent (which file are you calling the realtime model from?), • Or check the plugin version you’re running (paste the output of
pip show livekit-agents
or your
requirements.txt
). Which would you like me to do? Sources: Gemini Live API plugin | LiveKit docs