@@ -1326,6 +1326,9 @@ type ResponseApplyPatchToolCall struct {
13261326 ID string `json:"id,required"`
13271327 // The unique ID of the apply patch tool call generated by the model.
13281328 CallID string `json:"call_id,required"`
1329+ // One of the create_file, delete_file, or update_file operations applied via
1330+ // apply_patch.
1331+ Operation ResponseApplyPatchToolCallOperationUnion `json:"operation,required"`
13291332 // The status of the apply patch tool call. One of `in_progress` or `completed`.
13301333 //
13311334 // Any of "in_progress", "completed".
@@ -1334,17 +1337,14 @@ type ResponseApplyPatchToolCall struct {
13341337 Type constant.ApplyPatchCall `json:"type,required"`
13351338 // The ID of the entity that created this tool call.
13361339 CreatedBy string `json:"created_by"`
1337- // One of the create_file, delete_file, or update_file operations applied via
1338- // apply_patch.
1339- Operation ResponseApplyPatchToolCallOperationUnion `json:"operation"`
13401340 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
13411341 JSON struct {
13421342 ID respjson.Field
13431343 CallID respjson.Field
1344+ Operation respjson.Field
13441345 Status respjson.Field
13451346 Type respjson.Field
13461347 CreatedBy respjson.Field
1347- Operation respjson.Field
13481348 ExtraFields map[string]respjson.Field
13491349 raw string
13501350 } `json:"-"`
@@ -1358,14 +1358,6 @@ func (r *ResponseApplyPatchToolCall) UnmarshalJSON(data []byte) error {
13581358
13591359func (ResponseApplyPatchToolCall) ImplConversationItemUnion() {}
13601360
1361- // The status of the apply patch tool call. One of `in_progress` or `completed`.
1362- type ResponseApplyPatchToolCallStatus string
1363-
1364- const (
1365- ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
1366- ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
1367- )
1368-
13691361// ResponseApplyPatchToolCallOperationUnion contains all possible properties and
13701362// values from [ResponseApplyPatchToolCallOperationCreateFile],
13711363// [ResponseApplyPatchToolCallOperationDeleteFile],
@@ -1511,15 +1503,21 @@ func (r *ResponseApplyPatchToolCallOperationUpdateFile) UnmarshalJSON(data []byt
15111503 return apijson.UnmarshalRoot(data, r)
15121504}
15131505
1506+ // The status of the apply patch tool call. One of `in_progress` or `completed`.
1507+ type ResponseApplyPatchToolCallStatus string
1508+
1509+ const (
1510+ ResponseApplyPatchToolCallStatusInProgress ResponseApplyPatchToolCallStatus = "in_progress"
1511+ ResponseApplyPatchToolCallStatusCompleted ResponseApplyPatchToolCallStatus = "completed"
1512+ )
1513+
15141514// The output emitted by an apply patch tool call.
15151515type ResponseApplyPatchToolCallOutput struct {
15161516 // The unique ID of the apply patch tool call output. Populated when this item is
15171517 // returned via API.
15181518 ID string `json:"id,required"`
15191519 // The unique ID of the apply patch tool call generated by the model.
15201520 CallID string `json:"call_id,required"`
1521- // Optional textual output returned by the apply patch tool.
1522- Output string `json:"output,required"`
15231521 // The status of the apply patch tool call output. One of `completed` or `failed`.
15241522 //
15251523 // Any of "completed", "failed".
@@ -1528,14 +1526,16 @@ type ResponseApplyPatchToolCallOutput struct {
15281526 Type constant.ApplyPatchCallOutput `json:"type,required"`
15291527 // The ID of the entity that created this tool call output.
15301528 CreatedBy string `json:"created_by"`
1529+ // Optional textual output returned by the apply patch tool.
1530+ Output string `json:"output,nullable"`
15311531 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
15321532 JSON struct {
15331533 ID respjson.Field
15341534 CallID respjson.Field
1535- Output respjson.Field
15361535 Status respjson.Field
15371536 Type respjson.Field
15381537 CreatedBy respjson.Field
1538+ Output respjson.Field
15391539 ExtraFields map[string]respjson.Field
15401540 raw string
15411541 } `json:"-"`
@@ -8096,7 +8096,7 @@ type ResponseInputItemApplyPatchCallOutput struct {
80968096 ID string `json:"id,nullable"`
80978097 // Optional human-readable log text from the apply patch tool (e.g., patch results
80988098 // or errors).
8099- Output string `json:"output"`
8099+ Output string `json:"output,nullable "`
81008100 // JSON contains metadata for fields, check presence with [respjson.Field.Valid].
81018101 JSON struct {
81028102 CallID respjson.Field
0 commit comments