delegation field of session configuration.
Omitted or
null delegation defaults to client delegation.
Choose a delegation mode
Start with Responses delegation when its managed workflow fits your task. Choose client delegation when you need more control over the backend’s context, execution, or the results that reach GPT-Live.
You choose the mode when you create the session. To change modes, start a new session. In both modes, your application enforces permissions and required confirmations before it runs a tool, and it keeps the authoritative task state.
Configure a delegation mode
Setdelegation in the session object. Client delegation:
delegation.responses.service_tier accepts auto, default, flex, or priority. Replacing delegation in a later session.update requires a complete delegation object—nested fields aren’t patched independently. Set delegation to null to reset to client delegation.
Handle client delegation
With client delegation,session.delegation.created identifies a unit of work with target: "client" and a delegation id. The delegation object carries metadata, not the task text, so use transcript events and your application state to work out what the user wants. Save the id to correlate your result.
session.commentary.append for content the model should say aloud, or session.thinking.append for quiet context. Set delegation_id to the delegation id. Each event takes a plain-string content of up to 500 tokens.
Handle Responses delegation
By using Responses delegation,session.delegation.created identifies the delegation with target: "responses" and a response_id that binds it to the Responses lifecycle. GPT-Live manages the backend call; don’t send a standalone Responses request into the GPT-Live event stream.
response.event envelope. Dispatch on the nested event.type and preserve the outer delegation_id. Don’t treat top-level response.* values as unwrapped Responses events.
Complete a client-actionable function call
Read completed function calls from the nestedresponse.output_item.done event inside a response.event envelope. The finished item contains call_id, name, and arguments.
response.item.create.
response.create. Parallel calls require one result per call.
response.event envelopes until the nested lifecycle reaches a terminal event such as response.completed, or an error.