Hi Team, we recently started getting this error on...
# agents
r
Hi Team, we recently started getting this error on our prod servers. Is LK experiencing any issues or could this be a external vendor issue?
Copy code
Traceback (most recent call last):
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 190, in _main_task
    return await self._run()
           ^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/inference/llm.py", line 339, in _run
    raise APITimeoutError(retryable=retryable) from None
livekit.agents._exceptions.APITimeoutError: Request timed out. (body=None, retryable=True)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/utils/log.py", line 16, in async_fn_logs
    return await fn(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper
    return await func(*args, **kwargs)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/voice/generation.py", line 125, in _llm_inference_task
    async for chunk in llm_node:
    ...29 lines...
            )
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/voice/agent.py", line 402, in llm_node
    async for chunk in stream:
        yield chunk
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 344, in __anext__
    raise exc  # noqa: B904
    ^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/opentelemetry/util/_decorator.py", line 71, in async_wrapper
    return await func(*args, **kwargs)  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/app/venv/lib/python3.13/site-packages/livekit/agents/llm/llm.py", line 202, in _main_task
    raise APIConnectionError(
        f"failed to generate LLM completion after {self._conn_options.max_retry + 1} attempts",  # noqa: E501
    ) from e
livekit.agents._exceptions.APIConnectionError: failed to generate LLM completion after 4 attempts (body=None, retryable=True)
d
hey Ritwik, what's your project id? and which model is this?
r
gpt 4.1 and project id is p_54i9l8qbrru
👀 2
Thank you!
f
Hey Rithvik, I'm starting to look into this issue. Where is your agent hosted?
r
Lk cloud
f
Got it, thanks! Are you still seeing the exception?
r
I’ll have to check, it looked it was only happening this morning
f
That's helpful, I'll continue to look into it and report back what I find.
r
Thank you
l
Hi @fancy-lifeguard-70250, any update on this? We are hitting this issue too. We are using groq models.
f
Hey Rohit, it appears this particular case was caused by an node pool upgrade in our k8s cluster. Are you still experiencing issues? Could you share your project ID?
l
we are not hitting the issue anymore, thanks!
🙏 1