@@ -958,6 +958,13 @@ type EasyInputMessage struct {
958958 //
959959 // Any of "user", "assistant", "system", "developer".
960960 Role EasyInputMessageRole `json:"role" api:"required"`
961+ // Labels an assistant message as intermediate commentary ("commentary") or the
962+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
963+ // sending follow-up requests, preserve and resend phase on all assistant messages
964+ // — dropping it can degrade performance. Not used for user messages.
965+ //
966+ // Any of "commentary".
967+ Phase EasyInputMessagePhase `json:"phase" api:"nullable"`
961968 // The type of the message input. Always `message`.
962969 //
963970 // Any of "message".
@@ -966,6 +973,7 @@ type EasyInputMessage struct {
966973 JSON struct {
967974 Content respjson.Field
968975 Role respjson.Field
976+ Phase respjson.Field
969977 Type respjson.Field
970978 ExtraFields map[string]respjson.Field
971979 raw string
@@ -1035,6 +1043,16 @@ const (
10351043 EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
10361044)
10371045
1046+ // Labels an assistant message as intermediate commentary ("commentary") or the
1047+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
1048+ // sending follow-up requests, preserve and resend phase on all assistant messages
1049+ // — dropping it can degrade performance. Not used for user messages.
1050+ type EasyInputMessagePhase string
1051+
1052+ const (
1053+ EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
1054+ )
1055+
10381056// The type of the message input. Always `message`.
10391057type EasyInputMessageType string
10401058
@@ -1058,6 +1076,13 @@ type EasyInputMessageParam struct {
10581076 //
10591077 // Any of "user", "assistant", "system", "developer".
10601078 Role EasyInputMessageRole `json:"role,omitzero" api:"required"`
1079+ // Labels an assistant message as intermediate commentary ("commentary") or the
1080+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
1081+ // sending follow-up requests, preserve and resend phase on all assistant messages
1082+ // — dropping it can degrade performance. Not used for user messages.
1083+ //
1084+ // Any of "commentary".
1085+ Phase EasyInputMessagePhase `json:"phase,omitzero"`
10611086 // The type of the message input. Always `message`.
10621087 //
10631088 // Any of "message".
@@ -8270,6 +8295,7 @@ type ResponseInputItemUnion struct {
82708295 // [[]ResponseReasoningItemContent]
82718296 Content ResponseInputItemUnionContent `json:"content"`
82728297 Role string `json:"role"`
8298+ Phase string `json:"phase"`
82738299 // Any of "message", "message", "message", "file_search_call", "computer_call",
82748300 // "computer_call_output", "web_search_call", "function_call",
82758301 // "function_call_output", "reasoning", "compaction", "image_generation_call",
@@ -8332,6 +8358,7 @@ type ResponseInputItemUnion struct {
83328358 JSON struct {
83338359 Content respjson.Field
83348360 Role respjson.Field
8361+ Phase respjson.Field
83358362 Type respjson.Field
83368363 Status respjson.Field
83378364 ID respjson.Field
@@ -10098,6 +10125,16 @@ func (u ResponseInputItemUnionParam) GetRole() *string {
1009810125 return nil
1009910126}
1010010127
10128+ // Returns a pointer to the underlying variant's property, if present.
10129+ func (u ResponseInputItemUnionParam) GetPhase() *string {
10130+ if vt := u.OfMessage; vt != nil {
10131+ return (*string)(&vt.Phase)
10132+ } else if vt := u.OfOutputMessage; vt != nil {
10133+ return (*string)(&vt.Phase)
10134+ }
10135+ return nil
10136+ }
10137+
1010110138// Returns a pointer to the underlying variant's property, if present.
1010210139func (u ResponseInputItemUnionParam) GetType() *string {
1010310140 if vt := u.OfMessage; vt != nil {
@@ -11759,6 +11796,8 @@ type ResponseItemUnion struct {
1175911796 // "shell_call_output", "apply_patch_call", "apply_patch_call_output",
1176011797 // "mcp_list_tools", "mcp_approval_request", "mcp_approval_response", "mcp_call".
1176111798 Type string `json:"type"`
11799+ // This field is from variant [ResponseOutputMessage].
11800+ Phase ResponseOutputMessagePhase `json:"phase"`
1176211801 // This field is from variant [ResponseFileSearchToolCall].
1176311802 Queries []string `json:"queries"`
1176411803 // This field is from variant [ResponseFileSearchToolCall].
@@ -11808,6 +11847,7 @@ type ResponseItemUnion struct {
1180811847 Role respjson.Field
1180911848 Status respjson.Field
1181011849 Type respjson.Field
11850+ Phase respjson.Field
1181111851 Queries respjson.Field
1181211852 Results respjson.Field
1181311853 Action respjson.Field
@@ -12737,6 +12777,8 @@ type ResponseOutputItemUnion struct {
1273712777 // "apply_patch_call", "apply_patch_call_output", "mcp_call", "mcp_list_tools",
1273812778 // "mcp_approval_request", "custom_tool_call".
1273912779 Type string `json:"type"`
12780+ // This field is from variant [ResponseOutputMessage].
12781+ Phase ResponseOutputMessagePhase `json:"phase"`
1274012782 // This field is from variant [ResponseFileSearchToolCall].
1274112783 Queries []string `json:"queries"`
1274212784 // This field is from variant [ResponseFileSearchToolCall].
@@ -12785,6 +12827,7 @@ type ResponseOutputItemUnion struct {
1278512827 Role respjson.Field
1278612828 Status respjson.Field
1278712829 Type respjson.Field
12830+ Phase respjson.Field
1278812831 Queries respjson.Field
1278912832 Results respjson.Field
1279012833 Arguments respjson.Field
@@ -13398,13 +13441,21 @@ type ResponseOutputMessage struct {
1339813441 Status ResponseOutputMessageStatus `json:"status" api:"required"`
1339913442 // The type of the output message. Always `message`.
1340013443 Type constant.Message `json:"type" api:"required"`
13444+ // Labels an assistant message as intermediate commentary ("commentary") or the
13445+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
13446+ // sending follow-up requests, preserve and resend phase on all assistant messages
13447+ // — dropping it can degrade performance. Not used for user messages.
13448+ //
13449+ // Any of "commentary".
13450+ Phase ResponseOutputMessagePhase `json:"phase" api:"nullable"`
1340113451 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
1340213452 JSON struct {
1340313453 ID respjson.Field
1340413454 Content respjson.Field
1340513455 Role respjson.Field
1340613456 Status respjson.Field
1340713457 Type respjson.Field
13458+ Phase respjson.Field
1340813459 ExtraFields map[string]respjson.Field
1340913460 raw string
1341013461 } `json:"-"`
@@ -13508,6 +13559,16 @@ const (
1350813559 ResponseOutputMessageStatusIncomplete ResponseOutputMessageStatus = "incomplete"
1350913560)
1351013561
13562+ // Labels an assistant message as intermediate commentary ("commentary") or the
13563+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
13564+ // sending follow-up requests, preserve and resend phase on all assistant messages
13565+ // — dropping it can degrade performance. Not used for user messages.
13566+ type ResponseOutputMessagePhase string
13567+
13568+ const (
13569+ ResponseOutputMessagePhaseCommentary ResponseOutputMessagePhase = "commentary"
13570+ )
13571+
1351113572// An output message from the model.
1351213573//
1351313574// The properties ID, Content, Role, Status, Type are required.
@@ -13521,6 +13582,13 @@ type ResponseOutputMessageParam struct {
1352113582 //
1352213583 // Any of "in_progress", "completed", "incomplete".
1352313584 Status ResponseOutputMessageStatus `json:"status,omitzero" api:"required"`
13585+ // Labels an assistant message as intermediate commentary ("commentary") or the
13586+ // final answer ("final_answer"). For models like gpt-5.3-codex and beyond, when
13587+ // sending follow-up requests, preserve and resend phase on all assistant messages
13588+ // — dropping it can degrade performance. Not used for user messages.
13589+ //
13590+ // Any of "commentary".
13591+ Phase ResponseOutputMessagePhase `json:"phase,omitzero"`
1352413592 // The role of the output message. Always `assistant`.
1352513593 //
1352613594 // This field can be elided, and will marshal its zero value as "assistant".
@@ -19509,6 +19577,8 @@ type ResponseCompactParams struct {
1950919577 // [conversation state](https://platform.openai.com/docs/guides/conversation-state).
1951019578 // Cannot be used in conjunction with `conversation`.
1951119579 PreviousResponseID param.Opt[string] `json:"previous_response_id,omitzero"`
19580+ // A key to use when reading from or writing to the prompt cache.
19581+ PromptCacheKey param.Opt[string] `json:"prompt_cache_key,omitzero"`
1951219582 // Text, image, or file inputs to the model, used to generate a response
1951319583 Input ResponseCompactParamsInputUnion `json:"input,omitzero"`
1951419584 paramObj
0 commit comments