Class OpenAiResponsesMetadata
OpenAiResponsesChatModel, and the part attributes it
uses.
There are two groups. What a turn reports is published on the
generation or
response metadata;
what a turn needs to be replayed travels in the
part attributes and
payloads.
The assistant message carries no metadata of its own. What a turn reports beyond its parts describes one response rather than the message, and message metadata is persisted by some chat memory repositories and dropped by others, so nothing that matters may live there.
The openai.responses.* keys are specific to this API. REFUSAL,
ANNOTATIONS and REASONING_CONTENT keep the unprefixed names
OpenAiChatModel publishes on its assistant message, so code moving between the
two beans only has to change where it reads them, not what it looks up.
- Since:
- 2.1.0
- Author:
- Dimitar Proynov
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringCitations attached to the generated text, e.g. from web or file search.static final StringThe response creation timestamp, in seconds since the epoch.static final StringThekindof the payload carried by a reasoning part: theencrypted_contentof areasoningitem, which has to travel back verbatim for the model to keep its train of thought across a tool call or a follow-up turn.static final StringSummary of the tools OpenAI executed server-side within the request, as a list of{type, id, status}maps.static final StringWhy anincompleteresponse stopped:max_output_tokensorcontent_filter.static final StringPart attribute holding theidof the output item a part was mapped from, e.g.static final StringPart attribute holding thestatusof the output item a part was mapped from:in_progress,completedorincomplete.static final StringPart attribute holding thephaseof an assistant message item (commentaryorfinal_answer), which GPT-5.5 and later return to mark whether a message was a final answer or an intermediate update.static final StringTheproviderof every payload and everyUnknownPartthis model produces, and the only one it replays.static final StringReasoning summary text, one line per reasoning item.static final StringThe model's refusal text, or an empty string.static final StringThe response status:completed,incomplete,failed, ... -
Method Summary
-
Field Details
-
PROVIDER
Theproviderof every payload and everyUnknownPartthis model produces, and the only one it replays.The endpoint, not the vendor. Chat Completions and Responses are two OpenAI APIs whose replay payloads are not interchangeable, and a conversation can move between them, so naming the endpoint is what keeps either one from replaying the other's data if their handling of payload-carrying parts ever converges.
- See Also:
-
ENCRYPTED_CONTENT_KIND
Thekindof the payload carried by a reasoning part: theencrypted_contentof areasoningitem, which has to travel back verbatim for the model to keep its train of thought across a tool call or a follow-up turn.- See Also:
-
ITEM_ID_ATTRIBUTE
Part attribute holding theidof the output item a part was mapped from, e.g.rs_...for a reasoning item orfc_...for a function call.This is the item id, which addresses the item's position in the transcript, never the
call_idthat pairs a call with its result. A reasoning part cannot be replayed without it.- See Also:
-
ITEM_STATUS_ATTRIBUTE
Part attribute holding thestatusof the output item a part was mapped from:in_progress,completedorincomplete.- See Also:
-
PHASE_ATTRIBUTE
Part attribute holding thephaseof an assistant message item (commentaryorfinal_answer), which GPT-5.5 and later return to mark whether a message was a final answer or an intermediate update.Replayed so the model does not mistake a prior intermediate update for a final answer.
- See Also:
-
STATUS
The response status:completed,incomplete,failed, ...- See Also:
-
INCOMPLETE_REASON
Why anincompleteresponse stopped:max_output_tokensorcontent_filter.- See Also:
-
HOSTED_TOOL_CALLS
Summary of the tools OpenAI executed server-side within the request, as a list of{type, id, status}maps. These are never surfaced as tool calls.The summary describes activity inside a single request, so it is neither replayed on the next turn nor worth persisting with the conversation. The authoritative copy of each item is the
UnknownPartit was mapped to, which holds the item verbatim and is replayed as-is.- See Also:
-
CREATED_AT
The response creation timestamp, in seconds since the epoch.- See Also:
-
REFUSAL
The model's refusal text, or an empty string.There is no refusal part type, so this is the only place a refusal surfaces. On a stream it is the running total, published on every chunk that extends it, which is what lets it survive aggregation.
- See Also:
-
ANNOTATIONS
Citations attached to the generated text, e.g. from web or file search.The key matches
OpenAiChatModel, but the value shape does not: this model publishes aList<Map<String, Object>>, whereasOpenAiChatModelpublishes the OpenAI SDK's own annotation objects. Code that casts the entries has to be adjusted when swapping one bean for the other.- See Also:
-
REASONING_CONTENT
Reasoning summary text, one line per reasoning item. OpenAI never returns raw reasoning text, only summaries and an encrypted blob.Published under the key
OpenAiChatModeland DeepSeek surface reasoning under. It is a flattened view: the authoritative form is the orderedReasoningParts on the assistant message, which keep each item separate, in place among the tool calls it justified, and carry the encrypted content needed to replay it.- See Also:
-