Why does my agent retry when the elevenlabs api is...
# ask-ai
r
Why does my agent retry when the elevenlabs api is returning a 403?
t
Thanks for reaching out, John. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
An agent should not retry when the ElevenLabs API returns a 403 error. This is because 4xx errors, including 403, are categorized as non-retryable errors. The system is designed to immediately fail without attempting retries in such cases. Sources: livekit-agents/livekit/agents/llm/llm.py
r
it doesn't it retries
t
Hey there! If you’re seeing the agent retrying on a 403 error from the ElevenLabs API, it might be because the retry settings are a bit off or there’s some custom logic that’s overriding the usual behavior. Normally, 4xx errors like 403 are considered non-retryable, so the system shouldn’t be trying again. Here’s what you can do to fix this: • Take a look at the
APIConnectOptions
configuration and make sure
max_retry
isn’t set to retry errors that shouldn’t be retried. • Double-check that there isn’t any custom code forcing retries on errors marked as
retryable=False
. If you want, I’m here to help you go through these settings or troubleshoot the issue further. Just let me know! Sources: livekit-agents/livekit/agents/stt/stt.py | Events and error handling | LiveKit Docs | LLM Integrations | livekit/livekit_composite | DeepWiki