Skip to main content
higgs-realtime-1.5 calls tools asynchronously. A tool call does not pause the conversation: while it runs, the user can keep talking and the model keeps answering. When the result arrives, the model works it into the conversation. Your existing function tool code works unchanged. This page covers what the model does on its own, and what you can add:
Asynchronous tool calls need higgs-realtime-1.5. higgs-realtime accepts timeout_sec and cancellable on a tool and ignores them: it sends no status items and never cancels a call.

How a call runs

  1. The model calls the tool. It may say a short line first (“Let me check that for you.”). The response ends with response.done carrying the function_call item, as for any tool call.
  2. Your client starts the work. The conversation stays open meanwhile: the user can ask something else, and the model answers it.
  3. Your client returns the result with conversation.item.create (function_call_output) and sends response.create. The model speaks the answer.
Two cases need no handling on your side:
  • The model is still speaking. A response.create that follows a tool result never cuts the model off: the reply starts when it finishes.
  • The user is speaking. The response.create is rejected with an error (code: "user_speech_in_progress"). Don’t retry it: the result is already in the conversation, and the reply to what the user is saying takes it into account.

Return each result as it arrives

The server does not continue by itself after your function tool’s result: as with any function tool, the model replies when you send response.create. What changes with higgs-realtime-1.5 is that you don’t have to collect all of a response’s results first. When a response makes several calls, return each result as soon as you have it and send response.create after each one. The model answers the fast call first and the slow one when it lands. Who starts the model’s reply depends on what arrived: Run each call as its own task, so your receive loop keeps reading events while tools work:

Status updates

When a call has run for 10 seconds without a result, the server adds a function_call_status item to the conversation. The model can then tell the user that it is still working on it.
  • It arrives like any item: conversation.item.added, then conversation.item.done, in the previous_item_id chain.
  • You don’t need to act on it. The server starts the model’s reply by itself, so don’t send response.create for a status. If the model is speaking or the user is talking, the status waits until that turn ends.
  • It is not the tool’s output. Keep the call running, and return its result when you have it.
  • status is not the call’s state. It is the item’s own lifecycle, as on every item, and is always completed. The call’s state is call_status.
  • Server-side tools get them too. A web_search that runs long produces the same in_progress item.
  • Only the server creates them. A conversation.item.create with a function_call_status item is rejected with an error.

Timeouts

A function tool call never times out by default. Set timeout_sec on the tool to give its calls a limit:
  • Value: a number of seconds greater than 0.
  • When a call passes it, the server adds a function_call_status item with call_status: "timed_out", and the model reacts: typically it tells the user, and it may call the tool again. A retry is a new call with its own call_id.
  • A late result is still accepted. If your client returns the function_call_output after the timeout, it is added to the conversation as usual.
  • The model never sees the field. You don’t need to describe the limit in the tool’s description.

Cancellation

Mark a tool cancellable to let the model stop a call of it that is still running:
The model cancels a call when its result is no longer wanted: the user withdrew the request, or corrected it in a way that makes the call’s arguments wrong (“Actually, make that Friday”). It does not cancel a call only because the user interrupted. When it cancels one of your calls, the server sends response.function_call.cancel:
Stop the work for that call_id. You don’t need to return a result or send response.create: the model goes on with the conversation by itself, for example by calling the tool again with the corrected arguments.
  • Mark only tools that are safe to stop. A lookup is. A write that can’t be undone is not: leave cancellable off (the default), and the model lets the call finish.
  • A result that still arrives is accepted. If your client could not stop in time and returns the function_call_output, it is added to the conversation.
  • Don’t describe cancellation yourself. While any tool is cancellable, the server adds a sentence to each tool’s description that tells the model whether it can be cancelled.
  • What you see on the wire: the model cancels through a server-side tool named cancel_task. It appears as a function_call item with executor: "server" and its function_call_output, which need no action. Its arguments name the call by the model’s own short id (such as c3), not by your call_id. Take the call_id from response.function_call.cancel.
  • cancel_task is a reserved name. With higgs-realtime-1.5, a session.update that declares a function tool named cancel_task fails.
  • Function tools only. web_search cannot be marked cancellable.

Session acknowledgements

session.created and session.updated echo your tools without timeout_sec and cancellable. Keep your own tool definitions and send those in later session.update events, not the echoed ones.

Tool use

Declaring function tools and web search, and returning results.

Server events

response.function_call.cancel and the function_call_status item.