mammoth-fountain-26720
04/21/2026, 3:20 PMtall-airline-16756
04/21/2026, 3:20 PMtall-airline-16756
04/21/2026, 3:21 PMRoomInputOptions / RoomOutputOptions with RoomOptions when creating session/room configs to remove the warning.
3) Worker capacity
• The logs show workers hit the capacity threshold (load ~0.79 > 0.7). Add more worker instances for the agent or reduce other load on the machine to avoid marking workers unavailable.
• Ensure agent hosts aren’t running extra processes that compete for CPU/memory.
4) Diagnostics to run now (quick)
• From the agent host, curl the LLM API endpoint with the same credentials to confirm connectivity.
• Check agent process environment variables for the correct API key and endpoint.
• Review agent logs immediately before/after the httpx traceback for any specific HTTP error codes (timeouts, DNS, TLS, 4xx/5xx).
• Restart one agent after verifying config to confirm behavior.
If you want, share:
• the LLM provider you’re using,
• the agent host network environment (behind proxy/VPC/firewall),
• and a sanitized snippet of the full httpx traceback (showing the HTTP error/code)
I’ll use those details to give exact commands and config snippets to fix the connection and recommend scaling options.
Sources: livekit-agents/livekit/agents/llm/llm.py | Agent session | LiveKit Documentation | Agents Framework | livekit/livekit_composite | DeepWiki | Troubleshooting 401 Unauthorized and Token Errors | LiveKit | Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit, with interactive elementsmammoth-fountain-26720
04/21/2026, 3:35 PMtall-airline-16756
04/21/2026, 3:35 PMAZURE_OPENAI_API_KEY (or AZURE_OPENAI_AD_TOKEN), AZURE_OPENAI_ENDPOINT (note spelling), and OPENAI_API_VERSION.
• Confirm you’re calling Azure-mode helpers (e.g., openai.LLM.with_azure() / openai.TTS.with_azure()).
2) Confirm network connectivity
• From the agent host, run a quick curl to the Azure endpoint with your key to test connectivity and response:
◦ curl -v -H "api-key: $AZURE_OPENAI_API_KEY" "$AZURE_OPENAI_ENDPOINT/openai/deployments/deployment/chat/completions?api-version=$OPENAI_API_VERSION"
• Check for DNS, firewall, proxy, or TLS errors in the curl output. The httpx trace indicates an HTTP/connection failure rather than an STT problem.
• If you’re inside a VPC or behind a proxy, ensure outbound HTTPS to Azure OpenAI is allowed.
3) Tune timeouts, retries, and fallbacks
• Increase client timeouts and retry settings for httpx/Azure calls so transient network blips don’t immediately fail.
• Configure a fallback adapter or a secondary Azure deployment/provider so the agent can route requests when the primary fails.
• Reduce request payloads if needed (lower max_tokens or shorter prompts) to reduce latency.
4) Handle TTS failures separately
• If TTS can fail independently, add a fallback voice/provider or a short pre-recorded clip to avoid dead air when synthesis times out.
5) Fix deprecated Room options
• Replace RoomInputOptions / RoomOutputOptions with RoomOptions in your agent/room setup to remove warnings.
6) Address worker capacity
• Logs show worker load exceeded the threshold. Add more agent worker instances or lighten host load so workers aren’t marked unavailable.
If you want, share any one of these (sanitized):
• the curl output to the Azure endpoint (including HTTP status / error),
• the exact env var names/values (masked) you’ve set,
• or the httpx traceback lines showing the HTTP error code
I’ll provide the exact curl/timeout config and a minimal code snippet for Azure-mode LLM/TTS or advise next steps based on the error details you paste.
Sources: Build Your First AI Voice Agent in Python: Complete Tutorial | LiveKit | Sequential Pipeline Architecture for Voice Agents | LiveKit | Azure OpenAI LLM plugin guide | LiveKit Documentation | Azure OpenAI TTS plugin guide | LiveKit Documentation | Azure OpenAI Realtime API and LiveKit | LiveKit Documentation, with interactive elements