googleapis / googleapis/python-genai

LiveKit Google Plugin: Gemini 2.5 Flash returns empty candidates despite STOP finish reason

Aperta
#1,394 15 commenti 1 reazione 1 assegnatario Rivendicata da @Venkaiahbabuneelam Vedi su GitHub
priority: p3 type: bug
Lingua principale
Python
Stelle
4k
Fork
1k
Merge medio
2g 12h
PR unite (30g)
41

Descrizione

I'm experiencing a recurring issue with the LiveKit Google plugin
when using Gemini 2.5 Flash. The model returns empty candidates
despite having a STOP finish reason and consuming prompt tokens.
This issue does not occur with Gemini 2.0 Flash.

Error Message:
2025-09-18 04:17:28,022 - WARNING livekit.plugins.google - no
candidates in the response: sdk_http_response=HttpResponse(
headers=
) candidates=[Candidate(
content=Content(
role='model'
),
finish_reason=,
index=0
)] create_time=None model_version='gemini-2.5-flash'
prompt_feedback=None response_id='2IfLaNMEmbCq2w_6i_WpDw'
usage_metadata=GenerateContentResponseUsageMetadata(
prompt_token_count=4589,
prompt_tokens_details=[
ModalityTokenCount(
modality=,
token_count=4589
),
],
total_token_count=4589
) automatic_function_calling_history=None parsed=None {"pid": 71,
"job_id": "AJ_apM9tfCyuNjG"}

Environment:
- LiveKit Agents: livekit-agents[google]~=1.2
- Model: gemini-2.5-flash
- Working Model: gemini-2.0-flash (no issues)
- Plugin: livekit.plugins.google

Code Configuration:
llm=google.LLM(
model="gemini-2.5-flash",
temperature=0.8,
tool_choice="auto",
)

Reproduction:

This occurs during stt-llm-tts voice chat sessions using LiveKit
agents with the Google plugin. The issue appears to be
model-specific to Gemini 2.5 models.

Workaround:

Currently using gemini-2.0-flash as it does not exhibit this
behavior.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.