max_endpointing_delay in the earlier version i was...
# ask-ai
b
max_endpointing_delay in the earlier version i was using session.update_options(max_endpointing_delay=new_max_endpointing_delay) this code to update it but since in 1.5 version we use turn_handling, how can we update it
✅ 1
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks — I’m responding to your question about how to update
max_endpointing_delay
now that v1.5 uses
turn_handling
. You set
max_endpointing_delay
inside the
turn_handling
/
endpointing
options when creating the AgentSession (it’s not updated via
session.update_options
in v1.5). Example: • Python
Copy code
from livekit.agents import AgentSession, TurnHandlingOptions

session = AgentSession(
    turn_handling=TurnHandlingOptions(
        endpointing={
            "max_delay": 8.0,   # seconds
            "min_delay": 0.5,   # optional
        },
    ),
    # other options...
)
• Node.js / TypeScript
Copy code
import { voice } from '@livekit/agents';

const session = new voice.AgentSession({
  turnHandling: {
    endpointing: {
      maxDelay: 8000, // milliseconds
      minDelay: 500,  // optional
    },
  },
  // other options...
});
Important: turn-handling endpointing values are configured at session creation. They are not changed via `session.update_options`; to change them at runtime you must create a new session (or reinitialize the session with the new
turn_handling
values). If you want, tell me whether you’re using Python or Node.js and whether you need an example showing how to recreate the session safely at runtime. Sources: Turns overview | LiveKit Documentation | LiveKit turn detector plugin | LiveKit Documentation, with interactive elements