I've been retrying every ~15 minutes for an hour now, still 429's. my agent config is:
# Set up a voice AI pipeline using ElevenLabs, Google, and the LiveKit turn detector
session = AgentSession(
turn_detection="stt",
stt=inference.STT(model="assemblyai/universal-streaming"),
llm=inference.LLM(model="google/gemini-2.5-flash"),
tts=inference.TTS(
model="inworld/inworld-tts-1.5-mini", voice="Sarah", language="en"
),
vad=ctx.proc.userdata["vad"],
preemptive_generation=True,
)
my logs look like:
14
5534.888 ERROR… asyncio Task exception was never retrieved
future: <Task finished name='Task-19' coro=<ConnectionPool.prewarm.<locals>._prewarm_impl() done, defined at
/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/utils/connection_pool.py:169>
exception=APIStatusError('Invalid response status (429 Too Many Requests)', status_code=429, request_id=None, body=None, retryable=False)>
Traceback (most recent call last):
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/inference/tts.py", line 412, in _connect_ws
ws = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<2 lines>...
)
^
File "/Users/ashwin/.local/share/uv/python/cpython-3.13.5-macos-aarch64-none/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/aiohttp/client.py", line 1093, in _ws_connect
raise WSServerHandshakeError(
...<5 lines>...
)
aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url='
wss://agent-gateway.livekit.cloud/v1/tts?model=inworld/inworld-tts-1.5-mini'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/utils/connection_pool.py", line 172, in _prewarm_impl
conn = await self._connect(timeout=self._connect_timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/utils/connection_pool.py", line 63, in _connect
connection = await self._connect_cb(timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/inference/tts.py", line 417, in _connect_ws
raise create_api_error_from_http(e.message, status=e.status) from e
livekit.agents._exceptions.APIStatusError: Invalid response status (429 Too Many Requests)
14
5534.918 WARNI… livekit.agents failed to recognize speech: Invalid response status (429 Too Many Requests), retrying in 0.1s
{"stt": "livekit.agents.inference.stt.STT", "attempt": 0, "streamed": true, "room": "console"}
14
5535.013 WARNI… livekit.agents failed to synthesize speech: Invalid response status (429 Too Many Requests), retrying in 0.1s
{"tts": "livekit.agents.inference.tts.TTS", "attempt": 1, "streamed": true, "room": "console"}
14
5535.063 WARNI… livekit.agents failed to recognize speech: Invalid response status (429 Too Many Requests), retrying in 2.0s
{"stt": "livekit.agents.inference.stt.STT", "attempt": 1, "streamed": true, "room": "console"}
14
5535.143 WARNI… livekit.agents failed to synthesize speech: Invalid response status (429 Too Many Requests), retrying in 2.0s
{"tts": "livekit.agents.inference.tts.TTS", "attempt": 2, "streamed": true, "room": "console"}
14
5537.150 WARNI… livekit.agents failed to recognize speech: Invalid response status (429 Too Many Requests), retrying in 2.0s
{"stt": "livekit.agents.inference.stt.STT", "attempt": 2, "streamed": true, "room": "console"}
14
5537.172 WARNI… livekit.agents failed to synthesize speech: Invalid response status (429 Too Many Requests), retrying in 2.0s
{"tts": "livekit.agents.inference.tts.TTS", "attempt": 3, "streamed": true, "room": "console"}
14
5537.546 INFO … livekit.agents shutting down worker {"id": "unregistered"}
14
5539.246 ERROR… livekit.agents Error in _stt_task {"room": "console"}
Traceback (most recent call last):
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/livekit/agents/inference/stt.py", line 599, in _connect_ws
ws = await asyncio.wait_for(
^^^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
)
^
File "/Users/ashwin/.local/share/uv/python/cpython-3.13.5-macos-aarch64-none/lib/python3.13/asyncio/tasks.py", line 507, in wait_for
return await fut
^^^^^^^^^
File "/Users/ashwin/Documents/pestphone/agents/demo/.venv/lib/python3.13/site-packages/aiohttp/client.py", line 1093, in _ws_connect
raise WSServerHandshakeError(
...<5 lines>...
)
aiohttp.client_exceptions.WSServerHandshakeError: 429, message='Invalid response status', url='
wss://agent-gateway.livekit.cloud/v1/stt?model=assemblyai/universal-streaming'