openai.internal._commentary_output

The output that a `commentary` message holds, or null.

Reference version

Signature

function openai.internal._commentary_output(
output_type: reflect.Type
) -> ai.ParsedOutput | null throws never

The output that a commentary message holds, or null.

Models from gpt-5.3-codex on can answer in several messages, labeled by phase: commentary messages for the model's next step, then a final_answer. When the output is prompted as text and the response makes no native tool call, the model writes that step as the commentary (for example the tool calls of a prompted action schema), then writes the final_answer as if the step had already run. So the first commentary message that parses into the output type is the turn's output: the runner takes it and does not parse the final answer.

Null for a text-shaped output type: any text parses as a string, so a commentary preamble would replace the answer.

Source:<builtin>/openai/ns_internal/responses.bamlbytes 38139–39034