Skip to content

[WIP] Gemini test#6508

Open
thorwebdev wants to merge 1 commit into
livekit:mainfrom
thorwebdev:thor/gemini-test
Open

[WIP] Gemini test#6508
thorwebdev wants to merge 1 commit into
livekit:mainfrom
thorwebdev:thor/gemini-test

Conversation

@thorwebdev

Copy link
Copy Markdown
Contributor

No description provided.

@thorwebdev
thorwebdev requested a review from a team as a code owner July 22, 2026 13:22
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 1 additional finding in Devin Review.

Open in Devin Review

"http_options": self._http_options,
}
if is_enterprise:
client_kwargs["enterprise"] = True

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 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.

Suggested change
client_kwargs["enterprise"] = True
client_kwargs["vertexai"] = True
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants