{"message": "Gemini Realtime API error: received 1...
# ask-ai
b
{"message": "Gemini Realtime API error: received 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1beta, or is not supported for bidi; then sent 1008 (policy violation) models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1beta, or is not supported for bidi\nTraceback (most recent call last):\n File \"/home/azureuser/projects/voice_agent/.venv/lib/python3.12/site-packages/livekit/plugins/google/realtime/realtime_api.py\", line 667, in _main_task\n async with self._client.aio.live.connect(\n File \"/usr/lib/python3.12/contextlib.py\", line 210, in __aenter__\n return await anext(self.gen)\n ^^^^^^^^^^^^^^^^^^^^^\n File \"/home/azureuser/projects/voice_agent/.venv/lib/python3.12/site-packages/google/genai/live.py\", line 1085, in connect\n raw_response = await ws.recv(decode=False)\n
t
Thanks for reaching out, Aman. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to the Gemini Realtime API error you pasted (1008 policy violation: "models/gemini-live-2.5-flash-preview-native-audio-09-2025 is not found for API version v1beta, or is not supported for bidi"). What to check and try next: • Model name: Use the documented model ID — remove the extra
live-
and
models/
prefix. Example: ◦ Correct:
gemini-2.5-flash-native-audio-preview-09-2025
◦ Update the
model
field in your RealtimeModel config to that exact string. • API access & scope: ◦ Ensure your Google Cloud project has Gemini Live / Live API access enabled and your credentials (API key or
GOOGLE_APPLICATION_CREDENTIALS
) are for a project enrolled in the preview model if it’s a preview. • Bidi (realtime) compatibility: ◦ Not every Gemini model supports bidirectional realtime (bidi) streaming. Confirm the specific preview model supports realtime audio/video; if it’s preview-limited you may need explicit enrollment. • SDK / endpoint versioning: ◦ Make sure you’re using the LiveKit plugin / Google genai client versions that match the Realtime API expectations. Let LiveKit’s RealtimeModel (AgentSession) handle the connection rather than manually opening raw WebSocket connections. • Example pattern to use:
Copy code
llm = google.realtime.RealtimeModel(
      model="gemini-2.5-flash-native-audio-preview-09-2025",
      voice="Puck",
  )
  session = AgentSession(llm=llm, room=ctx.room, room_options=room_io.RoomOptions(video_input=True))
  await session.start()
If you update the model string and still get 1008, tell me: • the exact model string you changed to, • whether your Google project is enrolled for Gemini Live preview, • and a short snippet of the RealtimeModel/AgentSession code you’re using. I’ll use that to guide the next troubleshooting steps. Sources: Vision | LiveKit Docs | Gemini Live API plugin | LiveKit docs