API and agentsAPI reference
AssistantRequest
Either a message (optionally with history and a superseded pending action) or a resolution, never both.
One of:
object
runIdstringrequiredIdentity obtained before submission from POST /api/assistant/runs.
messagestringrequiredcontextAssistantContexthistoryarrayPrior turns as {role, text}; conversations are not stored server-side.
(each item)objectrolestringOne of
user,assistanttextstring
supersedesstringA pending-action id this message abandons (the implicit decline). Unknown ids are ignored.
choiceobjectOptional: the model and the effort this run is sent to, both optional inside it. An omitted model is the instance default; an omitted effort is the selected model's provider-default entry; an empty choice is an omission. GET /api/assistant reports what this instance offers. The first accepted submission binds the pair for the whole run, tool continuations, confirmation continuations and the map check's observation included; a choice supplied on a resolution is ignored, as a context supplied there already is. A malformed choice (400 assistant_choice_invalid), a model this instance does not offer (400 assistant_model_not_offered), an effort the selected model does not offer (400 assistant_effort_not_offered) and a named level for a model that has no levels of its own (400 assistant_effort_not_supported) are each refused before the run binds and before any provider call or product operation, leaving the reservation unbound and reusable. The entry "default" is accepted for every offered model and resolves exactly as omitting the effort does; the two differ only in what provenance.requested.defaulted records.
modelstringAn identity from the status read's models.
effortstringOne of that model's own effort values, "default" among them.
No other keys.
object
Resolve the confirmation a confirm_required event raised, instead of sending a message. Binds to the server-issued pending-action id; at most one resolution ever takes effect. Any context supplied on a resolution is ignored; the run retains its original context while server-owned facts are refreshed.
resolutionobjectrequiredpendingstringrequiredapprovedbooleanrequired
7439201b