Skip to content

Commit b93f6bd

Browse files
fix(api): internal openapi updates
1 parent d83922b commit b93f6bd

File tree

12 files changed

+33
-99
lines changed

12 files changed

+33
-99
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 122
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-f59befea071ed7729cbb7bce219e7f837eccfdb57e01698514e6a0bd6052ff60.yml
3-
openapi_spec_hash: 49da48619d37932b2e257c532078b2bb
4-
config_hash: 1af83449a09a3b4f276444dbcdd3eb67
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b062c33330de7e3bbf992fd4f0799afd868c30a66c39418dd2c62f4add3b45b6.yml
3+
openapi_spec_hash: fe067f5b1c0e93799b5ea7fde3c4b1b3
4+
config_hash: 4b6f471b24d659514b86b736c90a0c0a

aliases.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ type CompoundFilterParam = shared.CompoundFilterParam
294294
// This is an alias to an internal type.
295295
type CustomToolInputFormatUnion = shared.CustomToolInputFormatUnion
296296

297-
// Unconstrained free-form text.
298-
//
299297
// This is an alias to an internal type.
300298
type CustomToolInputFormatText = shared.CustomToolInputFormatText
301299

302-
// A grammar defined by the user.
303-
//
304300
// This is an alias to an internal type.
305301
type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
306302

@@ -309,13 +305,9 @@ type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
309305
// This is an alias to an internal type.
310306
type CustomToolInputFormatUnionParam = shared.CustomToolInputFormatUnionParam
311307

312-
// Unconstrained free-form text.
313-
//
314308
// This is an alias to an internal type.
315309
type CustomToolInputFormatTextParam = shared.CustomToolInputFormatTextParam
316310

317-
// A grammar defined by the user.
318-
//
319311
// This is an alias to an internal type.
320312
type CustomToolInputFormatGrammarParam = shared.CustomToolInputFormatGrammarParam
321313

conversations/aliases.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ type CompoundFilterParam = shared.CompoundFilterParam
294294
// This is an alias to an internal type.
295295
type CustomToolInputFormatUnion = shared.CustomToolInputFormatUnion
296296

297-
// Unconstrained free-form text.
298-
//
299297
// This is an alias to an internal type.
300298
type CustomToolInputFormatText = shared.CustomToolInputFormatText
301299

302-
// A grammar defined by the user.
303-
//
304300
// This is an alias to an internal type.
305301
type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
306302

@@ -309,13 +305,9 @@ type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
309305
// This is an alias to an internal type.
310306
type CustomToolInputFormatUnionParam = shared.CustomToolInputFormatUnionParam
311307

312-
// Unconstrained free-form text.
313-
//
314308
// This is an alias to an internal type.
315309
type CustomToolInputFormatTextParam = shared.CustomToolInputFormatTextParam
316310

317-
// A grammar defined by the user.
318-
//
319311
// This is an alias to an internal type.
320312
type CustomToolInputFormatGrammarParam = shared.CustomToolInputFormatGrammarParam
321313

conversations/item_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ func TestItemNewWithOptionalParams(t *testing.T) {
4040
Type: responses.EasyInputMessageTypeMessage,
4141
},
4242
}},
43-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
43+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
4444
},
4545
)
4646
if err != nil {
@@ -69,7 +69,7 @@ func TestItemGetWithOptionalParams(t *testing.T) {
6969
"conv_123",
7070
"msg_abc",
7171
conversations.ItemGetParams{
72-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
72+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
7373
},
7474
)
7575
if err != nil {
@@ -98,7 +98,7 @@ func TestItemListWithOptionalParams(t *testing.T) {
9898
"conv_123",
9999
conversations.ItemListParams{
100100
After: openai.String("after"),
101-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
101+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
102102
Limit: openai.Int(0),
103103
Order: conversations.ItemListParamsOrderAsc,
104104
},

image.go

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -960,10 +960,7 @@ type ImageEditParams struct {
960960
//
961961
// Any of "transparent", "opaque", "auto".
962962
Background ImageEditParamsBackground `json:"background,omitzero"`
963-
// Control how much effort the model will exert to match the style and features,
964-
// especially facial features, of input images. This parameter is only supported
965-
// for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
966-
// `low`. Defaults to `low`.
963+
// Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
967964
//
968965
// Any of "high", "low".
969966
InputFidelity ImageEditParamsInputFidelity `json:"input_fidelity,omitzero"`
@@ -1062,10 +1059,7 @@ const (
10621059
ImageEditParamsBackgroundAuto ImageEditParamsBackground = "auto"
10631060
)
10641061

1065-
// Control how much effort the model will exert to match the style and features,
1066-
// especially facial features, of input images. This parameter is only supported
1067-
// for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
1068-
// `low`. Defaults to `low`.
1062+
// Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
10691063
type ImageEditParamsInputFidelity string
10701064

10711065
const (

realtime/aliases.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ type CompoundFilterParam = shared.CompoundFilterParam
294294
// This is an alias to an internal type.
295295
type CustomToolInputFormatUnion = shared.CustomToolInputFormatUnion
296296

297-
// Unconstrained free-form text.
298-
//
299297
// This is an alias to an internal type.
300298
type CustomToolInputFormatText = shared.CustomToolInputFormatText
301299

302-
// A grammar defined by the user.
303-
//
304300
// This is an alias to an internal type.
305301
type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
306302

@@ -309,13 +305,9 @@ type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
309305
// This is an alias to an internal type.
310306
type CustomToolInputFormatUnionParam = shared.CustomToolInputFormatUnionParam
311307

312-
// Unconstrained free-form text.
313-
//
314308
// This is an alias to an internal type.
315309
type CustomToolInputFormatTextParam = shared.CustomToolInputFormatTextParam
316310

317-
// A grammar defined by the user.
318-
//
319311
// This is an alias to an internal type.
320312
type CustomToolInputFormatGrammarParam = shared.CustomToolInputFormatGrammarParam
321313

responses/aliases.go

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,9 @@ type CompoundFilterParam = shared.CompoundFilterParam
294294
// This is an alias to an internal type.
295295
type CustomToolInputFormatUnion = shared.CustomToolInputFormatUnion
296296

297-
// Unconstrained free-form text.
298-
//
299297
// This is an alias to an internal type.
300298
type CustomToolInputFormatText = shared.CustomToolInputFormatText
301299

302-
// A grammar defined by the user.
303-
//
304300
// This is an alias to an internal type.
305301
type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
306302

@@ -309,13 +305,9 @@ type CustomToolInputFormatGrammar = shared.CustomToolInputFormatGrammar
309305
// This is an alias to an internal type.
310306
type CustomToolInputFormatUnionParam = shared.CustomToolInputFormatUnionParam
311307

312-
// Unconstrained free-form text.
313-
//
314308
// This is an alias to an internal type.
315309
type CustomToolInputFormatTextParam = shared.CustomToolInputFormatTextParam
316310

317-
// A grammar defined by the user.
318-
//
319311
// This is an alias to an internal type.
320312
type CustomToolInputFormatGrammarParam = shared.CustomToolInputFormatGrammarParam
321313

responses/inputitem_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestInputItemListWithOptionalParams(t *testing.T) {
3131
"response_id",
3232
responses.InputItemListParams{
3333
After: openai.String("after"),
34-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
34+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
3535
Limit: openai.Int(0),
3636
Order: responses.InputItemListParamsOrderAsc,
3737
},

responses/response.go

Lines changed: 22 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -221,8 +221,6 @@ func (r *ComputerToolParam) UnmarshalJSON(data []byte) error {
221221
return apijson.UnmarshalRoot(data, r)
222222
}
223223

224-
// A custom tool that processes input using a specified format. Learn more about
225-
// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools).
226224
type CustomTool struct {
227225
// The name of the custom tool, used to identify it in tool calls.
228226
Name string `json:"name,required"`
@@ -258,9 +256,6 @@ func (r CustomTool) ToParam() CustomToolParam {
258256
return param.Override[CustomToolParam](json.RawMessage(r.RawJSON()))
259257
}
260258

261-
// A custom tool that processes input using a specified format. Learn more about
262-
// [custom tools](https://platform.openai.com/docs/guides/function-calling#custom-tools).
263-
//
264259
// The properties Name, Type are required.
265260
type CustomToolParam struct {
266261
// The name of the custom tool, used to identify it in tool calls.
@@ -1704,7 +1699,7 @@ func (r *ResponseCodeInterpreterToolCallOutputUnion) UnmarshalJSON(data []byte)
17041699
type ResponseCodeInterpreterToolCallOutputLogs struct {
17051700
// The logs output from the code interpreter.
17061701
Logs string `json:"logs,required"`
1707-
// The type of the output. Always 'logs'.
1702+
// The type of the output. Always `logs`.
17081703
Type constant.Logs `json:"type,required"`
17091704
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
17101705
JSON struct {
@@ -1723,7 +1718,7 @@ func (r *ResponseCodeInterpreterToolCallOutputLogs) UnmarshalJSON(data []byte) e
17231718

17241719
// The image output from the code interpreter.
17251720
type ResponseCodeInterpreterToolCallOutputImage struct {
1726-
// The type of the output. Always 'image'.
1721+
// The type of the output. Always `image`.
17271722
Type constant.Image `json:"type,required"`
17281723
// The URL of the image output from the code interpreter.
17291724
URL string `json:"url,required"`
@@ -1845,7 +1840,7 @@ func (u ResponseCodeInterpreterToolCallOutputUnionParam) GetType() *string {
18451840
type ResponseCodeInterpreterToolCallOutputLogsParam struct {
18461841
// The logs output from the code interpreter.
18471842
Logs string `json:"logs,required"`
1848-
// The type of the output. Always 'logs'.
1843+
// The type of the output. Always `logs`.
18491844
//
18501845
// This field can be elided, and will marshal its zero value as "logs".
18511846
Type constant.Logs `json:"type,required"`
@@ -1866,7 +1861,7 @@ func (r *ResponseCodeInterpreterToolCallOutputLogsParam) UnmarshalJSON(data []by
18661861
type ResponseCodeInterpreterToolCallOutputImageParam struct {
18671862
// The URL of the image output from the code interpreter.
18681863
URL string `json:"url,required"`
1869-
// The type of the output. Always 'image'.
1864+
// The type of the output. Always `image`.
18701865
//
18711866
// This field can be elided, and will marshal its zero value as "image".
18721867
Type constant.Image `json:"type,required"`
@@ -2117,8 +2112,7 @@ type ResponseComputerToolCallActionClick struct {
21172112
//
21182113
// Any of "left", "right", "wheel", "back", "forward".
21192114
Button string `json:"button,required"`
2120-
// Specifies the event type. For a click action, this property is always set to
2121-
// `click`.
2115+
// Specifies the event type. For a click action, this property is always `click`.
21222116
Type constant.Click `json:"type,required"`
21232117
// The x-coordinate where the click occurred.
21242118
X int64 `json:"x,required"`
@@ -2198,7 +2192,7 @@ func (r *ResponseComputerToolCallActionDrag) UnmarshalJSON(data []byte) error {
21982192
return apijson.UnmarshalRoot(data, r)
21992193
}
22002194

2201-
// A series of x/y coordinate pairs in the drag path.
2195+
// An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.
22022196
type ResponseComputerToolCallActionDragPath struct {
22032197
// The x-coordinate.
22042198
X int64 `json:"x,required"`
@@ -2363,9 +2357,9 @@ type ResponseComputerToolCallPendingSafetyCheck struct {
23632357
// The ID of the pending safety check.
23642358
ID string `json:"id,required"`
23652359
// The type of the pending safety check.
2366-
Code string `json:"code,required"`
2360+
Code string `json:"code,nullable"`
23672361
// Details about the pending safety check.
2368-
Message string `json:"message,required"`
2362+
Message string `json:"message,nullable"`
23692363
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
23702364
JSON struct {
23712365
ID respjson.Field
@@ -2601,8 +2595,7 @@ type ResponseComputerToolCallActionClickParam struct {
26012595
X int64 `json:"x,required"`
26022596
// The y-coordinate where the click occurred.
26032597
Y int64 `json:"y,required"`
2604-
// Specifies the event type. For a click action, this property is always set to
2605-
// `click`.
2598+
// Specifies the event type. For a click action, this property is always `click`.
26062599
//
26072600
// This field can be elided, and will marshal its zero value as "click".
26082601
Type constant.Click `json:"type,required"`
@@ -2673,7 +2666,7 @@ func (r *ResponseComputerToolCallActionDragParam) UnmarshalJSON(data []byte) err
26732666
return apijson.UnmarshalRoot(data, r)
26742667
}
26752668

2676-
// A series of x/y coordinate pairs in the drag path.
2669+
// An x/y coordinate pair, e.g. `{ x: 100, y: 200 }`.
26772670
//
26782671
// The properties X, Y are required.
26792672
type ResponseComputerToolCallActionDragPathParam struct {
@@ -2841,14 +2834,14 @@ func (r *ResponseComputerToolCallActionWaitParam) UnmarshalJSON(data []byte) err
28412834

28422835
// A pending safety check for the computer call.
28432836
//
2844-
// The properties ID, Code, Message are required.
2837+
// The property ID is required.
28452838
type ResponseComputerToolCallPendingSafetyCheckParam struct {
28462839
// The ID of the pending safety check.
28472840
ID string `json:"id,required"`
28482841
// The type of the pending safety check.
2849-
Code string `json:"code,required"`
2842+
Code param.Opt[string] `json:"code,omitzero"`
28502843
// Details about the pending safety check.
2851-
Message string `json:"message,required"`
2844+
Message param.Opt[string] `json:"message,omitzero"`
28522845
paramObj
28532846
}
28542847

@@ -2903,9 +2896,9 @@ type ResponseComputerToolCallOutputItemAcknowledgedSafetyCheck struct {
29032896
// The ID of the pending safety check.
29042897
ID string `json:"id,required"`
29052898
// The type of the pending safety check.
2906-
Code string `json:"code,required"`
2899+
Code string `json:"code,nullable"`
29072900
// Details about the pending safety check.
2908-
Message string `json:"message,required"`
2901+
Message string `json:"message,nullable"`
29092902
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
29102903
JSON struct {
29112904
ID respjson.Field
@@ -5586,12 +5579,14 @@ func (r *ResponseInProgressEvent) UnmarshalJSON(data []byte) error {
55865579
type ResponseIncludable string
55875580

55885581
const (
5589-
ResponseIncludableCodeInterpreterCallOutputs ResponseIncludable = "code_interpreter_call.outputs"
5590-
ResponseIncludableComputerCallOutputOutputImageURL ResponseIncludable = "computer_call_output.output.image_url"
55915582
ResponseIncludableFileSearchCallResults ResponseIncludable = "file_search_call.results"
5583+
ResponseIncludableWebSearchCallResults ResponseIncludable = "web_search_call.results"
5584+
ResponseIncludableWebSearchCallActionSources ResponseIncludable = "web_search_call.action.sources"
55925585
ResponseIncludableMessageInputImageImageURL ResponseIncludable = "message.input_image.image_url"
5593-
ResponseIncludableMessageOutputTextLogprobs ResponseIncludable = "message.output_text.logprobs"
5586+
ResponseIncludableComputerCallOutputOutputImageURL ResponseIncludable = "computer_call_output.output.image_url"
5587+
ResponseIncludableCodeInterpreterCallOutputs ResponseIncludable = "code_interpreter_call.outputs"
55945588
ResponseIncludableReasoningEncryptedContent ResponseIncludable = "reasoning.encrypted_content"
5589+
ResponseIncludableMessageOutputTextLogprobs ResponseIncludable = "message.output_text.logprobs"
55955590
)
55965591

55975592
// An event that is emitted when a response finishes as incomplete.
@@ -13503,10 +13498,7 @@ type ToolImageGeneration struct {
1350313498
//
1350413499
// Any of "transparent", "opaque", "auto".
1350513500
Background string `json:"background"`
13506-
// Control how much effort the model will exert to match the style and features,
13507-
// especially facial features, of input images. This parameter is only supported
13508-
// for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
13509-
// `low`. Defaults to `low`.
13501+
// Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
1351013502
//
1351113503
// Any of "high", "low".
1351213504
InputFidelity string `json:"input_fidelity,nullable"`
@@ -13587,7 +13579,6 @@ func (r *ToolImageGenerationInputImageMask) UnmarshalJSON(data []byte) error {
1358713579
return apijson.UnmarshalRoot(data, r)
1358813580
}
1358913581

13590-
// A tool that allows the model to execute shell commands in a local environment.
1359113582
type ToolLocalShell struct {
1359213583
// The type of the local shell tool. Always `local_shell`.
1359313584
Type constant.LocalShell `json:"type,required"`
@@ -14422,10 +14413,7 @@ type ToolImageGenerationParam struct {
1442214413
// Number of partial images to generate in streaming mode, from 0 (default value)
1442314414
// to 3.
1442414415
PartialImages param.Opt[int64] `json:"partial_images,omitzero"`
14425-
// Control how much effort the model will exert to match the style and features,
14426-
// especially facial features, of input images. This parameter is only supported
14427-
// for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and
14428-
// `low`. Defaults to `low`.
14416+
// Control how much effort the model will exert to match the style and features, especially facial features, of input images. This parameter is only supported for `gpt-image-1`. Unsupported for `gpt-image-1-mini`. Supports `high` and `low`. Defaults to `low`.
1442914417
//
1443014418
// Any of "high", "low".
1443114419
InputFidelity string `json:"input_fidelity,omitzero"`
@@ -14523,8 +14511,6 @@ func NewToolLocalShellParam() ToolLocalShellParam {
1452314511
}
1452414512
}
1452514513

14526-
// A tool that allows the model to execute shell commands in a local environment.
14527-
//
1452814514
// This struct has a constant value, construct it with [NewToolLocalShellParam].
1452914515
type ToolLocalShellParam struct {
1453014516
// The type of the local shell tool. Always `local_shell`.

responses/response_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func TestResponseNewWithOptionalParams(t *testing.T) {
3232
Conversation: responses.ResponseNewParamsConversationUnion{
3333
OfString: openai.String("string"),
3434
},
35-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
35+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
3636
Input: responses.ResponseNewParamsInputUnion{
3737
OfString: openai.String("string"),
3838
},
@@ -116,7 +116,7 @@ func TestResponseGetWithOptionalParams(t *testing.T) {
116116
context.TODO(),
117117
"resp_677efb5139a88190b512bc3fef8e535d",
118118
responses.ResponseGetParams{
119-
Include: []responses.ResponseIncludable{responses.ResponseIncludableCodeInterpreterCallOutputs},
119+
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},
120120
IncludeObfuscation: openai.Bool(true),
121121
StartingAfter: openai.Int(0),
122122
},

0 commit comments

Comments
 (0)