Hi,
Is there any ongoing work on mitigating unstable latency of LLMs in production? @refined-appointment-81829@dry-elephant-14928
I found this blog that has some interesting ideas about:
• how to find the fastest endpoint in real time by optimizing an exploration/exploitation trade-off
• cancelling long requests to fallback to the second fastest endpoint at time T
https://vapi.ai/blog/how-we-solved-latency-at-vapi?utm_source=LinkedIn&utm_campaign=LI_Latency_15July
h
hundreds-ambulance-81078
08/02/2025, 2:03 AM
We are having the same issue
r
rough-gpu-50664
08/05/2025, 8:56 PM
thanks for reaching out! we're working on something like this internally.
have you seen we have a fallbackAdapter for LLM calls? it's not quite as smart as what we're building, but you can use the attempt_timeout param to set a max threshold for how long to wait until you get an LLM response. after the threshold, it triggers the backup llm request.
you could make your primary model 4o, then your backup model 4o-mini. I wouldn't recommend switching between model groups (gpt, gemini, llama) bc system prompts aren't portable among them.
https://github.com/livekit/agents/blob/26792f4a28f4af0168c80dd672c78e7e3bd738ea/livekit-agents/livekit/agents/llm/fallback_adapter.py#L34
c
creamy-window-79763
08/06/2025, 8:16 AM
Thanks @rough-gpu-50664, yes I was using fallbackAdapter but I didn't see there was an