pub struct InputReasoningItem {
pub id: Option<String>,
pub summary: Vec<SummaryPart>,
pub content: Option<Vec<ReasoningTextContent>>,
pub encrypted_content: Option<String>,
pub status: Option<OutputStatus>,
}Expand description
A reasoning item echoed back as input for a subsequent turn. Relaxed
compared to upstream ReasoningItem: id and summary are both optional.
Upstream marks id (and a present summary array) as required, but real
clients omit them when round-tripping a prior reasoning turn as input:
Codex / OpenCode / agent SDKs send reasoning items carrying only
encrypted_content (and sometimes a summary) with no id. OpenAI’s own
hosted API accepts this; the OpenAPI spec is wrong. Upstream fixed id in
64bit/async-openai#535 (merged after our pinned async-openai), so we
mirror that one-line relaxation here rather than chase a crate bump.
Named InputReasoningItem (not ReasoningItem) because upstream’s
ReasoningItem is dual-side: it is the canonical output-side type in
OutputItem::Reasoning(..) / Response.output, which must stay strict.
Same naming discipline as InputOutputMessage vs OutputMessage.
Fields§
§id: Option<String>Optional on input — upstream requires it; clients drop it on echo.
summary: Vec<SummaryPart>Defaults to empty when absent — upstream requires a present array.
content: Option<Vec<ReasoningTextContent>>§encrypted_content: Option<String>§status: Option<OutputStatus>Trait Implementations§
Source§impl Clone for InputReasoningItem
impl Clone for InputReasoningItem
Source§fn clone(&self) -> InputReasoningItem
fn clone(&self) -> InputReasoningItem
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more