getting this error when trying to use live models ...
# ask-ai
c
getting this error when trying to use live models of google websockets.exceptions.ConnectionClosedError: 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
t
Thanks for reaching out, Divyanshu. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like the error is happening because the model name and API configuration don’t quite match up. The correct model name you’ll want to use is
gemini-2.5-flash-native-audio-preview-09-2025
, rather than
gemini-live-2.5-flash-preview-native-audio-09-2025
. Just a heads up, this model works with the Gemini Developer API, not Vertex AI. Here’s how you can fix this: 1. Make sure to use the correct model name:
gemini-2.5-flash-native-audio-preview-09-2025
. 2. Double-check that your API key is set properly using
GOOGLE_API_KEY
for the Gemini Developer API. 3. If you’re using advanced features like proactivity or affective dialog, avoid forcing API version `v1beta`—these need
v1alpha
. 4. Don’t forget to install the necessary plugin by running
pip install livekit-plugins-google
. If you’d like, I’m here to help you step-by-step with the setup. Just let me know! Sources: livekit-plugins/livekit-plugins-google/livekit/plugins/google/realtime/real... | Gemini Live API plugin | LiveKit docs | web/src/data/playground-state.ts | realtime/gemini_live_vision.py
c
1. If you’re using advanced features like proactivity or affective dialog, avoid forcing API version `v1beta`—these need
v1alpha
. how can we decidie this,, i am ok with v1 alpha but dont know how to switch it from livekit
t
Great news! You don’t have to worry about manually switching to
v1alpha
when you’re using advanced features like proactivity or affective dialog in LiveKit. The system is designed to automatically set the API version to
v1alpha
whenever these features are turned on. Here’s a quick example to help you get started:
Copy code
from livekit.plugins.google import RealtimeModel

model = RealtimeModel(
    api_key="your-api-key",
    enable_affective_dialog=True,     # Enables emotional responses
    proactivity=True,                 # Allows model to initiate speech
    voice="Puck",
    # api_version will automatically be set to "v1alpha"
)
If you have any more questions or need a hand with this setup, just let me know—I’m here to help! Sources: examples/README.md | Gemini Live API plugin | LiveKit docs | Gemini Live API plugin | LiveKit docs