Hold a function call until the user’s turn is confirmed
The agent begins building a reply before speech-to-text confirms the user has finished speaking. Agent audio is held until that confirmation, but function calls have always dispatched as soon as the LLM emitted them. For a function with an irreversible side effect, such as ending a call or booking an appointment, that meant the action could run for a turn the user then continued.
defer_until_eot
Add defer_until_eot: true to any function in agent.think.functions to hold it until the turn is confirmed. If the user keeps speaking and the turn resumes, the call is discarded before it does anything.
The default is false, so existing agents are unchanged. Deferring one function does not delay the others: a function that did not opt in still dispatches immediately, even with a deferred call ahead of it in the same turn.
defer_until_eot applies to every listen provider, not only Flux.
FunctionCallCancelled
Clients now receive an explicit signal when a client-side function call they were sent is cancelled because the user started speaking again, either inside the speculative window (the turn resumed) or after the turn was confirmed (barge-in). Only calls the client already received are announced.
Stop work on that id and send no FunctionCallResponse for it.
For details, see Speculative Replies & Turn Confirmation, Function Call Cancelled, and Configure the Voice Agent.