Handling inference completion brownouts Hi team. ...
# agents
w
Handling inference completion brownouts Hi team. Is there something we can do in our Livekit agent implementation to be more robust against Livekit inference chat completion dropouts/timeouts/retries/brownouts? We had a few cases this morning where the agent would go silent in the middle of a call, with no recovery. Logs below. Is there anything we can do to (a) detect that this has happened; (b) kick the agent awake; (c) gracefully recover? We're using livekit inference with gpt-4.1; livekit-hosted agent; python agents lib 1.3.5. Thank you!
Copy code
Dec 03, 10:52:21.953 AM
httpx
HTTP Request: POST <http://inference.livekit.svc.cluster.local/v1/chat/completions> "HTTP/1.1 200 OK"
Dec 03, 10:52:25.462 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:25.469 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/traces/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:30.476 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:30.484 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/traces/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:35.490 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:40.505 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:45.509 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/traces/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:45.519 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:50.536 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:52.536 AM
openai._base_client
Retrying request to /chat/completions in 0.490029 seconds
Dec 03, 10:52:55.538 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/traces/otlp/v0 HTTP/1.1" 200 0
Dec 03, 10:52:55.552 AM
urllib3.connectionpool
<https://production-ejnfnpod.livekit.cloud:443> "POST /observability/logs/otlp/v0 HTTP/1.1" 200 0
P.S. this happened a few times this morning, felt like some "weather" rolling through.
r
This may be better in #C09J2AYGN0M
👍 1
That may have more insights in this specific case.
w
Thank you @refined-appointment-81829
b
Just curious, have you tried using the
FallbackAdapter
?