0:03:48.4… ERROR… livekit.agents Error in ...
# ask-ai
p
00348.4… ERROR… livekit.agents Error in _llm_infer… Traceback (most recent call last): File "C:\voice assitant\.venv\Lib\site-packages\livekit\plugins\google \llm.py", line 459, in _run async for response in stream: File "C:\voice assitant\.venv\Lib\site-packages\google\genai\models.py ", line 7907, in async_generator response = await self._generate_content_stream( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\google\genai\models.py ", line 6578, in _generate_content_stream response_stream = await self._api_client.async_request_streamed( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\google\genai\_api_clie nt.py", line 1465, in async_request_streamed response = await self._async_request( ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\google\genai\_api_clie nt.py", line 1381, in _async_request return await self._async_retry( # type: ignore[no-any-return] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\tenacity\asyncio\__ini t__.py", line 112, in call do = await self.iter(retry_state=retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\tenacity\asyncio\__ini t__.py", line 157, in iter result = await action(retry_state) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\tenacity\_utils.py", line 111, in inner return call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\tenacity\__init__.py", line 413, in exc_check raise retry_exc.reraise() ^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\tenacity\__init__.py", line 184, in reraise raise self.last_attempt.result() ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\vishn\AppData\Roaming\uv\python\cpython-3.11. 11-windows-x86_64-none\Lib\concurrent\futures\_base.py" , line 449, in result return self.__get_result() ^^^^^^^^^^^^^^^^^^^ File "C:\Users\vishn\AppData\Roaming\uv\python\cpython-3.11. 11-windows-x86_64-none\Lib\concurrent\futures\_base.py" , line 401, in __get_result raise self._exception File "C:\voice assitant\.venv\Lib\site-packages\tenacity\asyncio\__ini t__.py", line 116, in call result = await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\google\genai\_api_clie nt.py", line 1297, in _async_request_once await errors.APIError.raise_for_async_response(response) File "C:\voice assitant\.venv\Lib\site-packages\google\genai\errors.py ", line 216, in raise_for_async_response await cls.raise_error_async(status_code, response_json, response) File "C:\voice assitant\.venv\Lib\site-packages\google\genai\errors.py ", line 238, in raise_error_async raise ClientError(status_code, response_json, response) google.genai.errors.ClientError: 429 Too Many Requests. {'message': '{\n "error": {\n "code": 429,\n "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \\n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free _tier_requests, limit: 20, model: gemini-3-flash\\nPlease retry in 12.14717134s.",\n "status": "RESOURCE_EXHAUSTED",\n "details": [\n {\n "@type": "type.googleapis.com/google.rpc.Help",\n "links": [\n {\n "description": "Learn more about Gemini API quotas",\n "url": "https://ai.google.dev/gemini-api/docs/rate-limits"\n }\n ]\n },\n {\n "@type": "type.googleapis.com/google.rpc.QuotaFailure",\n "violations": [\n {\n "quotaMetric": "generativelanguage.googleapis.com/generate_content_fre e_tier_requests",\n "quotaId": "GenerateRequestsPerDayPerProjectPerModel-FreeTier",\n "quotaDimensions": {\n "location": "global",\n "model": "gemini-3-flash"\n },\n "quotaValue": "20"\n }\n ]\n },\n {\n "@type": "type.googleapis.com/google.rpc.RetryInfo",\n "retryDelay": "12s"\n }\n ]\n }\n}\n', 'status': 'Too Many Requests'} The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\llm\llm .py", line 213, in _main_task return await self._run() ^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\livekit\plugins\google \llm.py", line 519, in _run raise APIStatusError( livekit.agents._exceptions.APIStatusError: message='gemini llm: client error', status_code=429, retryable=True, request_id=f5eb6b871247, body={ "error": { "code": 429, "message": "You exceeded your current quota, please check your plan and billing details. For more information on this error, head to: https://ai.google.dev/gemini-api/docs/rate-limits. To monitor your current usage, head to: https://ai.dev/rate-limit. \n* Quota exceeded for metric: generativelanguage.googleapis.com/generate_content_free _tier_requests, limit: 20, model: gemini-3-flash\nPlease retry in 12.14717134s.", "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.rpc.Help", "links": [ { "description": "Learn more about Gemini API quotas", "url": "https://ai.google.dev/gemini-api/docs/rate-limits" } ] }, { "@type": "type.googleapis.com/google.rpc.QuotaFailure", "violations": [ { "quotaMetric": "generativelanguage.googleapis.com/generate_content_fre e_tier_requests", "quotaId": "GenerateRequestsPerDayPerProjectPerModel-FreeTier", "quotaDimensions": { "location": "global", "model": "gemini-3-flash" }, "quotaValue": "20" } ] }, { "@type": "type.googleapis.com/google.rpc.RetryInfo", "retryDelay": "12s" } ] } } Too Many Requests The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\utils\l og.py", line 17, in async_fn_logs return await fn(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\opentelemetry\util\_de corator.py", line 71, in async_wrapper return await func(*args, **kwargs) # type: ignore ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\voice\g eneration.py", line 138, in _llm_inference_task async for chunk in llm_node: File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\voice\a gent.py", line 424, in llm_node async for chunk in stream: File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\llm\llm .py", line 372, in anext raise exc # noqa: B904 ^^^^^^^^^ File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\llm\llm .py", line 188, in _traceable_main_task await self._main_task() File "C:\voice assitant\.venv\Lib\site-packages\livekit\agents\llm\llm .py", line 229, in _main_task raise APIConnectionError( livekit.agents._exceptions.APIConnectionError: failed to generate LLM completion after 4 attempts
✅ 1
t
Thanks for reaching out, Bhuvan. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I can see you’re hitting a 429 Too Many Requests from Google Gemini while the LiveKit agent was generating LLM completions. I’ll explain what happened and give short, actionable next steps. What happened • The Gemini API returned 429 RESOURCE_EXHAUSTED: the free‑tier quota for model
gemini-3-flash
(20 generate requests/day per project per model) was exceeded. The error includes a suggested retry delay (~12s). What you can do now • Wait the retry delay shown in the error and retry. • Check your Google quota and usage at the rate‑limit dashboard: https://ai.dev/rate-limit and the Gemini rate limit docs: https://ai.google.dev/gemini-api/docs/rate-limits. • If you expect higher volume, enable billing or upgrade your Google plan to increase quota. • Add or tune exponential backoff and retry logic in the agent so it respects RetryInfo and avoids rapid retries. • Consider switching to a model/plan with higher quotas or routing LLM calls through LiveKit Inference / an enterprise plan if you need higher throughput and centralized billing. If you’d like, tell me: • whether you’re using a personal Google project (free tier) or LiveKit’s Inference/enterprise, and • roughly how many requests/min or per day you expect — and I’ll suggest specific retry parameters and next steps for increasing capacity. Sources: Build voice, video, and physical AI | LiveKit | Google AI and LiveKit | LiveKit Documentation | Google Gemini LLM | LiveKit Documentation | LiveKit Platform | Build, run, and observe voice AI agents | LiveKit, with interactive elements