[WIP] Gemini test#6508
Conversation
|
|
| "http_options": self._http_options, | ||
| } | ||
| if is_enterprise: | ||
| client_kwargs["enterprise"] = True |
There was a problem hiding this comment.
🔴 Vertex AI speech-to-text mode always crashes on startup
The Vertex AI client is created with an unsupported option name (client_kwargs["enterprise"] = True at livekit-plugins/livekit-plugins-google/livekit/plugins/google/beta/gemini_stt.py:219) instead of the option the client actually accepts, so any attempt to use the enterprise/Vertex backend fails immediately.
Impact: Users who configure Gemini STT for Vertex AI (via credentials, project, location, or vertexai=True) get an error and cannot transcribe any audio.
Invalid Client keyword and downstream vertexai detection
The google.genai.Client constructor accepts a vertexai boolean (see gemini_tts.py:148, llm.py:261, realtime_api.py:490), not enterprise. Passing enterprise=True to Client(**client_kwargs) at gemini_stt.py:226 raises TypeError: __init__() got an unexpected keyword argument 'enterprise'.
Even if the constructor tolerated the extra kwarg, vertexai would never be enabled on the client, so the subsequent check getattr(client._api_client, "vertexai", False) at gemini_stt.py:232 would always be False and the configured language_hints/language would be silently dropped. The correct fix is to pass vertexai=True.
| client_kwargs["enterprise"] = True | |
| client_kwargs["vertexai"] = True |
Was this helpful? React with 👍 or 👎 to provide feedback.
No description provided.