pub enum InputItem {
Message {
role: Role,
content: MessageContent,
id: Option<String>,
status: Option<String>,
},
FunctionCall {
call_id: String,
name: Option<String>,
arguments: Option<String>,
id: Option<String>,
},
FunctionCallOutput {
call_id: String,
output: FunctionCallOutputContent,
},
Reasoning {
id: Option<String>,
content: Option<Vec<ReasoningTextPart>>,
summary: Option<Vec<SummaryTextPart>>,
},
WebSearchCall {
id: Option<String>,
action: Option<Value>,
},
CustomToolCall {
call_id: String,
name: String,
input: String,
id: Option<String>,
},
CustomToolCallOutput {
call_id: String,
output: FunctionCallOutputContent,
},
Other(Value),
}Expand description
An item of the input list.
Item types not listed here can be sent through
Self::Other as raw JSON.
Variants§
Message
A message with a role and content.
Fields
content: MessageContentThe message content: plain text or an array of content parts.
FunctionCall
A call to a user-defined function, e.g. returned by a previous
response. Must be paired with a matching
InputItem::FunctionCallOutput.
Fields
FunctionCallOutput
The output of a function call.
Fields
call_id: StringThe ID that pairs this output with the corresponding
InputItem::FunctionCall.
output: FunctionCallOutputContentThe result of the function call: plain text or an array of content parts.
Reasoning
A reasoning item from a previous response.
Fields
content: Option<Vec<ReasoningTextPart>>Plaintext reasoning content parts.
summary: Option<Vec<SummaryTextPart>>Reasoning summaries.
WebSearchCall
A web search call from a previous response, passed back as-is so the server can restore the search results.
Fields
CustomToolCall
A call to a custom tool (e.g. the apply_patch tool used by
Codex-style agents).
Fields
CustomToolCallOutput
The output of a custom tool call.
Fields
call_id: StringThe ID that pairs this output with the corresponding
InputItem::CustomToolCall.
output: FunctionCallOutputContentThe result of the tool call: plain text or an array of content parts.
Other(Value)
An input item of a type not covered by the variants above, sent through as raw JSON.