@orq-ai/node 4.7.0-rc.24 → 4.7.0-rc.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/jsr.json +1 -1
  2. package/lib/config.d.ts +2 -2
  3. package/lib/config.js +2 -2
  4. package/models/components/reasoningpart.js +1 -1
  5. package/models/operations/createcontact.js +1 -1
  6. package/models/operations/createdataset.js +1 -1
  7. package/models/operations/createdatasetitem.js +4 -4
  8. package/models/operations/createdatasource.js +1 -1
  9. package/models/operations/createeval.js +16 -16
  10. package/models/operations/createidentity.js +1 -1
  11. package/models/operations/createresponse.d.ts +337 -157
  12. package/models/operations/createresponse.d.ts.map +1 -1
  13. package/models/operations/createresponse.js +224 -101
  14. package/models/operations/createresponse.js.map +1 -1
  15. package/models/operations/createtool.js +6 -6
  16. package/models/operations/getalltools.js +6 -6
  17. package/models/operations/getevals.js +16 -16
  18. package/models/operations/getv2humanevals.js +6 -6
  19. package/models/operations/getv2humanevalsets.js +2 -2
  20. package/models/operations/getv2humanevalsetsid.js +2 -2
  21. package/models/operations/getv2humanevalsid.js +6 -6
  22. package/models/operations/listdatasetdatapoints.js +4 -4
  23. package/models/operations/listdatasets.js +1 -1
  24. package/models/operations/listdatasources.js +1 -1
  25. package/models/operations/listidentities.js +1 -1
  26. package/models/operations/patchv2humanevalsetsid.js +2 -2
  27. package/models/operations/patchv2humanevalsid.js +12 -12
  28. package/models/operations/postv2feedbackevaluation.js +3 -3
  29. package/models/operations/postv2humanevals.js +12 -12
  30. package/models/operations/postv2humanevalsets.js +2 -2
  31. package/models/operations/retrievedatapoint.js +4 -4
  32. package/models/operations/retrievedataset.js +1 -1
  33. package/models/operations/retrievedatasource.js +1 -1
  34. package/models/operations/retrieveidentity.js +1 -1
  35. package/models/operations/retrievetool.js +6 -6
  36. package/models/operations/runagent.js +1 -1
  37. package/models/operations/streamrunagent.js +1 -1
  38. package/models/operations/updatedatapoint.js +4 -4
  39. package/models/operations/updatedataset.js +1 -1
  40. package/models/operations/updatedatasource.js +1 -1
  41. package/models/operations/updateeval.js +16 -16
  42. package/models/operations/updateidentity.js +1 -1
  43. package/models/operations/updatetool.js +7 -7
  44. package/package.json +1 -1
  45. package/src/lib/config.ts +2 -2
  46. package/src/models/components/reasoningpart.ts +1 -1
  47. package/src/models/operations/createcontact.ts +1 -1
  48. package/src/models/operations/createdataset.ts +1 -1
  49. package/src/models/operations/createdatasetitem.ts +4 -4
  50. package/src/models/operations/createdatasource.ts +1 -1
  51. package/src/models/operations/createeval.ts +16 -16
  52. package/src/models/operations/createidentity.ts +1 -1
  53. package/src/models/operations/createresponse.ts +603 -260
  54. package/src/models/operations/createtool.ts +6 -6
  55. package/src/models/operations/getalltools.ts +6 -6
  56. package/src/models/operations/getevals.ts +16 -16
  57. package/src/models/operations/getv2humanevals.ts +6 -6
  58. package/src/models/operations/getv2humanevalsets.ts +2 -2
  59. package/src/models/operations/getv2humanevalsetsid.ts +2 -2
  60. package/src/models/operations/getv2humanevalsid.ts +6 -6
  61. package/src/models/operations/listdatasetdatapoints.ts +4 -4
  62. package/src/models/operations/listdatasets.ts +1 -1
  63. package/src/models/operations/listdatasources.ts +1 -1
  64. package/src/models/operations/listidentities.ts +1 -1
  65. package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
  66. package/src/models/operations/patchv2humanevalsid.ts +12 -12
  67. package/src/models/operations/postv2feedbackevaluation.ts +3 -3
  68. package/src/models/operations/postv2humanevals.ts +12 -12
  69. package/src/models/operations/postv2humanevalsets.ts +2 -2
  70. package/src/models/operations/retrievedatapoint.ts +4 -4
  71. package/src/models/operations/retrievedataset.ts +1 -1
  72. package/src/models/operations/retrievedatasource.ts +1 -1
  73. package/src/models/operations/retrieveidentity.ts +1 -1
  74. package/src/models/operations/retrievetool.ts +6 -6
  75. package/src/models/operations/runagent.ts +1 -1
  76. package/src/models/operations/streamrunagent.ts +1 -1
  77. package/src/models/operations/updatedatapoint.ts +4 -4
  78. package/src/models/operations/updatedataset.ts +1 -1
  79. package/src/models/operations/updatedatasource.ts +1 -1
  80. package/src/models/operations/updateeval.ts +16 -16
  81. package/src/models/operations/updateidentity.ts +1 -1
  82. package/src/models/operations/updatetool.ts +7 -7
@@ -15,26 +15,46 @@ import * as components from "../components/index.js";
15
15
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
16
16
 
17
17
  /**
18
- * The effort level for reasoning (o3-mini model only)
18
+ * The effort level for reasoning
19
19
  */
20
20
  export const Effort = {
21
+ None: "none",
22
+ Minimal: "minimal",
21
23
  Low: "low",
22
24
  Medium: "medium",
23
25
  High: "high",
26
+ Xhigh: "xhigh",
24
27
  } as const;
25
28
  /**
26
- * The effort level for reasoning (o3-mini model only)
29
+ * The effort level for reasoning
27
30
  */
28
31
  export type Effort = ClosedEnum<typeof Effort>;
29
32
 
33
+ /**
34
+ * The summary mode for reasoning output
35
+ */
36
+ export const Summary = {
37
+ Auto: "auto",
38
+ Concise: "concise",
39
+ Detailed: "detailed",
40
+ } as const;
41
+ /**
42
+ * The summary mode for reasoning output
43
+ */
44
+ export type Summary = ClosedEnum<typeof Summary>;
45
+
30
46
  /**
31
47
  * Configuration for reasoning models
32
48
  */
33
49
  export type Reasoning = {
34
50
  /**
35
- * The effort level for reasoning (o3-mini model only)
51
+ * The effort level for reasoning
36
52
  */
37
53
  effort?: Effort | undefined;
54
+ /**
55
+ * The summary mode for reasoning output
56
+ */
57
+ summary?: Summary | null | undefined;
38
58
  };
39
59
 
40
60
  /**
@@ -289,6 +309,8 @@ export const Include = {
289
309
  MessageInputImageImageUrl: "message.input_image.image_url",
290
310
  MessageOutputTextLogprobs: "message.output_text.logprobs",
291
311
  ReasoningEncryptedContent: "reasoning.encrypted_content",
312
+ WebSearchCallResults: "web_search_call.results",
313
+ WebSearchCallActionSources: "web_search_call.action.sources",
292
314
  } as const;
293
315
  export type Include = ClosedEnum<typeof Include>;
294
316
 
@@ -299,6 +321,7 @@ export const ServiceTier = {
299
321
  Auto: "auto",
300
322
  Default: "default",
301
323
  Flex: "flex",
324
+ Scale: "scale",
302
325
  Priority: "priority",
303
326
  } as const;
304
327
  /**
@@ -335,7 +358,7 @@ export type RankingOptions = {
335
358
  /**
336
359
  * Configuration for file search tool
337
360
  */
338
- export type Tools3 = {
361
+ export type Tools4 = {
339
362
  /**
340
363
  * The type of tool
341
364
  */
@@ -361,38 +384,37 @@ export type Tools3 = {
361
384
  /**
362
385
  * Amount of context to retrieve for each search result
363
386
  */
364
- export const SearchContextSize = {
365
- Small: "small",
387
+ export const ToolsSearchContextSize = {
388
+ Low: "low",
366
389
  Medium: "medium",
367
- Large: "large",
390
+ High: "high",
368
391
  } as const;
369
392
  /**
370
393
  * Amount of context to retrieve for each search result
371
394
  */
372
- export type SearchContextSize = ClosedEnum<typeof SearchContextSize>;
395
+ export type ToolsSearchContextSize = ClosedEnum<typeof ToolsSearchContextSize>;
373
396
 
374
397
  /**
375
398
  * The type of location
376
399
  */
377
- export const CreateResponseToolsRouterResponsesRequestType = {
400
+ export const CreateResponseToolsRouterResponsesRequestRequestBodyType = {
378
401
  Approximate: "approximate",
379
402
  Exact: "exact",
380
403
  } as const;
381
404
  /**
382
405
  * The type of location
383
406
  */
384
- export type CreateResponseToolsRouterResponsesRequestType = ClosedEnum<
385
- typeof CreateResponseToolsRouterResponsesRequestType
386
- >;
407
+ export type CreateResponseToolsRouterResponsesRequestRequestBodyType =
408
+ ClosedEnum<typeof CreateResponseToolsRouterResponsesRequestRequestBodyType>;
387
409
 
388
410
  /**
389
411
  * User location for search localization
390
412
  */
391
- export type UserLocation = {
413
+ export type ToolsUserLocation = {
392
414
  /**
393
415
  * The type of location
394
416
  */
395
- type?: CreateResponseToolsRouterResponsesRequestType | undefined;
417
+ type?: CreateResponseToolsRouterResponsesRequestRequestBodyType | undefined;
396
418
  /**
397
419
  * The city name
398
420
  */
@@ -412,67 +434,110 @@ export type UserLocation = {
412
434
  };
413
435
 
414
436
  /**
415
- * Configuration for web search tool
437
+ * Filters for the web search
416
438
  */
417
- export type Tools2 = {
439
+ export type Filters = {
418
440
  /**
419
- * The type of tool
441
+ * List of allowed domains for search
420
442
  */
421
- type: "web_search_preview";
443
+ allowedDomains?: Array<string> | null | undefined;
444
+ };
445
+
446
+ /**
447
+ * Configuration for web search tool
448
+ */
449
+ export type Tools3 = {
422
450
  /**
423
- * List of domains to restrict search to
451
+ * The type of tool
424
452
  */
425
- domains?: Array<string> | undefined;
453
+ type: "web_search";
426
454
  /**
427
455
  * Amount of context to retrieve for each search result
428
456
  */
429
- searchContextSize?: SearchContextSize | undefined;
457
+ searchContextSize?: ToolsSearchContextSize | undefined;
430
458
  /**
431
459
  * User location for search localization
432
460
  */
433
- userLocation?: UserLocation | undefined;
461
+ userLocation?: ToolsUserLocation | undefined;
462
+ /**
463
+ * Filters for the web search
464
+ */
465
+ filters?: Filters | null | undefined;
434
466
  };
435
467
 
436
468
  /**
437
- * The type of the parameters object
469
+ * Amount of context to retrieve for each search result
438
470
  */
439
- export const CreateResponseToolsType = {
440
- Object: "object",
471
+ export const SearchContextSize = {
472
+ Low: "low",
473
+ Medium: "medium",
474
+ High: "high",
475
+ } as const;
476
+ /**
477
+ * Amount of context to retrieve for each search result
478
+ */
479
+ export type SearchContextSize = ClosedEnum<typeof SearchContextSize>;
480
+
481
+ /**
482
+ * The type of location
483
+ */
484
+ export const CreateResponseToolsRouterResponsesType = {
485
+ Approximate: "approximate",
486
+ Exact: "exact",
441
487
  } as const;
442
488
  /**
443
- * The type of the parameters object
489
+ * The type of location
444
490
  */
445
- export type CreateResponseToolsType = ClosedEnum<
446
- typeof CreateResponseToolsType
491
+ export type CreateResponseToolsRouterResponsesType = ClosedEnum<
492
+ typeof CreateResponseToolsRouterResponsesType
447
493
  >;
448
494
 
449
- export type Properties = {
450
- type: string;
451
- description?: string | undefined;
452
- enum?: Array<string> | undefined;
453
- additionalProperties?: { [k: string]: any } | undefined;
495
+ /**
496
+ * User location for search localization
497
+ */
498
+ export type UserLocation = {
499
+ /**
500
+ * The type of location
501
+ */
502
+ type?: CreateResponseToolsRouterResponsesType | undefined;
503
+ /**
504
+ * The city name
505
+ */
506
+ city?: string | null | undefined;
507
+ /**
508
+ * The country code
509
+ */
510
+ country?: string | undefined;
511
+ /**
512
+ * The region/state
513
+ */
514
+ region?: string | null | undefined;
515
+ /**
516
+ * The timezone
517
+ */
518
+ timezone?: string | null | undefined;
454
519
  };
455
520
 
456
521
  /**
457
- * The parameters the function accepts
522
+ * Configuration for web search preview tool
458
523
  */
459
- export type ToolsParameters = {
524
+ export type Tools2 = {
460
525
  /**
461
- * The type of the parameters object
526
+ * The type of tool
462
527
  */
463
- type: CreateResponseToolsType;
528
+ type: "web_search_preview";
464
529
  /**
465
- * The parameters the function accepts, described as a JSON Schema object
530
+ * List of domains to restrict search to
466
531
  */
467
- properties: { [k: string]: Properties };
532
+ domains?: Array<string> | undefined;
468
533
  /**
469
- * List of required parameter names
534
+ * Amount of context to retrieve for each search result
470
535
  */
471
- required?: Array<string> | undefined;
536
+ searchContextSize?: SearchContextSize | undefined;
472
537
  /**
473
- * Whether to allow properties not defined in the schema
538
+ * User location for search localization
474
539
  */
475
- additionalProperties?: boolean | undefined;
540
+ userLocation?: UserLocation | undefined;
476
541
  };
477
542
 
478
543
  /**
@@ -492,16 +557,16 @@ export type Tools1 = {
492
557
  */
493
558
  description?: string | null | undefined;
494
559
  /**
495
- * The parameters the function accepts
560
+ * The parameters the function accepts as a JSON Schema object
496
561
  */
497
- parameters: ToolsParameters;
562
+ parameters?: { [k: string]: any } | null | undefined;
498
563
  /**
499
564
  * Whether to enable strict schema adherence when generating function calls
500
565
  */
501
- strict?: boolean | undefined;
566
+ strict?: boolean | null | undefined;
502
567
  };
503
568
 
504
- export type CreateResponseTools = Tools1 | Tools2 | Tools3;
569
+ export type CreateResponseTools = Tools1 | Tools2 | Tools3 | Tools4;
505
570
 
506
571
  export const CreateResponseToolChoiceRouterResponsesRequestType = {
507
572
  Mcp: "mcp",
@@ -531,7 +596,11 @@ export type ToolChoice3 = {
531
596
  export const CreateResponseToolChoiceType = {
532
597
  FileSearch: "file_search",
533
598
  WebSearchPreview: "web_search_preview",
599
+ WebSearchPreview20250311: "web_search_preview_2025_03_11",
600
+ WebSearch: "web_search",
534
601
  ComputerUsePreview: "computer_use_preview",
602
+ ComputerUse: "computer_use",
603
+ Computer: "computer",
535
604
  CodeInterpreter: "code_interpreter",
536
605
  ImageGeneration: "image_generation",
537
606
  } as const;
@@ -617,15 +686,7 @@ export type CreateResponseRequestBody = {
617
686
  | string
618
687
  | Array<CreateResponse23 | CreateResponse2RouterResponses2 | Two1>;
619
688
  /**
620
- * Specifies which (potentially large) fields to include in the response. By default, the results of Code Interpreter and file searches are excluded. Available options:
621
- *
622
- * @remarks
623
- * - code_interpreter_call.outputs: Include the outputs of Code Interpreter tool calls
624
- * - computer_call_output.output.image_url: Include the image URLs from computer use tool calls
625
- * - file_search_call.results: Include the results of file search tool calls
626
- * - message.input_image.image_url: Include URLs of input images
627
- * - message.output_text.logprobs: Include log probabilities for output text (when logprobs is enabled)
628
- * - reasoning.encrypted_content: Include encrypted reasoning content for reasoning models
689
+ * Specifies which (potentially large) fields to include in the response.
629
690
  */
630
691
  include?: Array<Include> | null | undefined;
631
692
  /**
@@ -643,7 +704,7 @@ export type CreateResponseRequestBody = {
643
704
  /**
644
705
  * A list of tools the model may call. Use this to provide a list of functions the model may generate JSON inputs for.
645
706
  */
646
- tools?: Array<Tools1 | Tools2 | Tools3> | undefined;
707
+ tools?: Array<Tools1 | Tools2 | Tools3 | Tools4> | undefined;
647
708
  /**
648
709
  * How the model should select which tool (or tools) to use when generating a response. Can be a string (`none`, `auto`, `required`) or an object to force a specific tool.
649
710
  */
@@ -695,6 +756,8 @@ export const CreateResponseStatus = {
695
756
  Completed: "completed",
696
757
  Failed: "failed",
697
758
  InProgress: "in_progress",
759
+ Cancelled: "cancelled",
760
+ Queued: "queued",
698
761
  Incomplete: "incomplete",
699
762
  } as const;
700
763
  /**
@@ -842,6 +905,60 @@ export type CreateResponseOutputStatus = ClosedEnum<
842
905
  typeof CreateResponseOutputStatus
843
906
  >;
844
907
 
908
+ /**
909
+ * The type of web search action
910
+ */
911
+ export const CreateResponseOutputRouterResponsesResponse200ApplicationJSONType =
912
+ {
913
+ Search: "search",
914
+ OpenPage: "open_page",
915
+ Find: "find",
916
+ } as const;
917
+ /**
918
+ * The type of web search action
919
+ */
920
+ export type CreateResponseOutputRouterResponsesResponse200ApplicationJSONType =
921
+ ClosedEnum<
922
+ typeof CreateResponseOutputRouterResponsesResponse200ApplicationJSONType
923
+ >;
924
+
925
+ export type Sources = {
926
+ /**
927
+ * The source URL
928
+ */
929
+ url: string;
930
+ /**
931
+ * The source title
932
+ */
933
+ title: string;
934
+ };
935
+
936
+ /**
937
+ * The action performed by the web search
938
+ */
939
+ export type Action = {
940
+ /**
941
+ * The type of web search action
942
+ */
943
+ type: CreateResponseOutputRouterResponsesResponse200ApplicationJSONType;
944
+ /**
945
+ * The search query (for search action)
946
+ */
947
+ query?: string | undefined;
948
+ /**
949
+ * The URL opened (for open_page action)
950
+ */
951
+ url?: string | undefined;
952
+ /**
953
+ * The pattern to find (for find action)
954
+ */
955
+ pattern?: string | undefined;
956
+ /**
957
+ * Sources from the web search
958
+ */
959
+ sources?: Array<Sources> | undefined;
960
+ };
961
+
845
962
  /**
846
963
  * A web search tool call output
847
964
  */
@@ -858,6 +975,10 @@ export type Output2 = {
858
975
  * The status of the web search
859
976
  */
860
977
  status: CreateResponseOutputStatus;
978
+ /**
979
+ * The action performed by the web search
980
+ */
981
+ action?: Action | undefined;
861
982
  };
862
983
 
863
984
  /**
@@ -886,15 +1007,18 @@ export const OutputStatus = {
886
1007
  export type OutputStatus = ClosedEnum<typeof OutputStatus>;
887
1008
 
888
1009
  /**
889
- * The type of content part
1010
+ * A refusal content part from the model
890
1011
  */
891
- export const ContentType = {
892
- OutputText: "output_text",
893
- } as const;
894
- /**
895
- * The type of content part
896
- */
897
- export type ContentType = ClosedEnum<typeof ContentType>;
1012
+ export type CreateResponseContentRouterResponses2 = {
1013
+ /**
1014
+ * The type of content part
1015
+ */
1016
+ type: "refusal";
1017
+ /**
1018
+ * The refusal message
1019
+ */
1020
+ refusal: string;
1021
+ };
898
1022
 
899
1023
  /**
900
1024
  * A citation to a file
@@ -950,7 +1074,7 @@ export type Content1 = {
950
1074
  /**
951
1075
  * The type of content part
952
1076
  */
953
- type: ContentType;
1077
+ type: "output_text";
954
1078
  /**
955
1079
  * The text content
956
1080
  */
@@ -965,7 +1089,7 @@ export type Content1 = {
965
1089
  logprobs?: Array<any> | undefined;
966
1090
  };
967
1091
 
968
- export type OutputContent = Content1;
1092
+ export type OutputContent = Content1 | CreateResponseContentRouterResponses2;
969
1093
 
970
1094
  /**
971
1095
  * An assistant message output
@@ -990,7 +1114,7 @@ export type Output1 = {
990
1114
  /**
991
1115
  * The content parts of the message
992
1116
  */
993
- content?: Array<Content1> | undefined;
1117
+ content?: Array<Content1 | CreateResponseContentRouterResponses2> | undefined;
994
1118
  };
995
1119
 
996
1120
  export type Output = Output1 | Output2 | Output3 | Output4;
@@ -1110,7 +1234,7 @@ export type ToolsRankingOptions = {
1110
1234
  /**
1111
1235
  * Configuration for file search tool
1112
1236
  */
1113
- export type CreateResponseTools3 = {
1237
+ export type CreateResponseTools4 = {
1114
1238
  /**
1115
1239
  * The type of tool
1116
1240
  */
@@ -1136,20 +1260,22 @@ export type CreateResponseTools3 = {
1136
1260
  /**
1137
1261
  * Amount of context to retrieve for each search result
1138
1262
  */
1139
- export const ToolsSearchContextSize = {
1140
- Small: "small",
1263
+ export const CreateResponseToolsRouterResponsesSearchContextSize = {
1264
+ Low: "low",
1141
1265
  Medium: "medium",
1142
- Large: "large",
1266
+ High: "high",
1143
1267
  } as const;
1144
1268
  /**
1145
1269
  * Amount of context to retrieve for each search result
1146
1270
  */
1147
- export type ToolsSearchContextSize = ClosedEnum<typeof ToolsSearchContextSize>;
1271
+ export type CreateResponseToolsRouterResponsesSearchContextSize = ClosedEnum<
1272
+ typeof CreateResponseToolsRouterResponsesSearchContextSize
1273
+ >;
1148
1274
 
1149
1275
  /**
1150
1276
  * The type of location
1151
1277
  */
1152
- export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType =
1278
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type =
1153
1279
  {
1154
1280
  Approximate: "approximate",
1155
1281
  Exact: "exact",
@@ -1157,20 +1283,20 @@ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONRespons
1157
1283
  /**
1158
1284
  * The type of location
1159
1285
  */
1160
- export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType =
1286
+ export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type =
1161
1287
  ClosedEnum<
1162
- typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
1288
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type
1163
1289
  >;
1164
1290
 
1165
1291
  /**
1166
1292
  * User location for search localization
1167
1293
  */
1168
- export type ToolsUserLocation = {
1294
+ export type CreateResponseToolsRouterResponsesUserLocation = {
1169
1295
  /**
1170
1296
  * The type of location
1171
1297
  */
1172
1298
  type?:
1173
- | CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
1299
+ | CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type
1174
1300
  | undefined;
1175
1301
  /**
1176
1302
  * The city name
@@ -1191,70 +1317,116 @@ export type ToolsUserLocation = {
1191
1317
  };
1192
1318
 
1193
1319
  /**
1194
- * Configuration for web search tool
1320
+ * Filters for the web search
1195
1321
  */
1196
- export type CreateResponseTools2 = {
1322
+ export type ToolsFilters = {
1197
1323
  /**
1198
- * The type of tool
1324
+ * List of allowed domains for search
1199
1325
  */
1200
- type: "web_search_preview";
1326
+ allowedDomains?: Array<string> | null | undefined;
1327
+ };
1328
+
1329
+ /**
1330
+ * Configuration for web search tool
1331
+ */
1332
+ export type CreateResponseTools3 = {
1201
1333
  /**
1202
- * List of domains to restrict search to
1334
+ * The type of tool
1203
1335
  */
1204
- domains?: Array<string> | undefined;
1336
+ type: "web_search";
1205
1337
  /**
1206
1338
  * Amount of context to retrieve for each search result
1207
1339
  */
1208
- searchContextSize: ToolsSearchContextSize;
1340
+ searchContextSize: CreateResponseToolsRouterResponsesSearchContextSize;
1209
1341
  /**
1210
1342
  * User location for search localization
1211
1343
  */
1212
- userLocation?: ToolsUserLocation | undefined;
1344
+ userLocation?: CreateResponseToolsRouterResponsesUserLocation | undefined;
1345
+ /**
1346
+ * Filters for the web search
1347
+ */
1348
+ filters?: ToolsFilters | null | undefined;
1213
1349
  };
1214
1350
 
1215
1351
  /**
1216
- * The type of the parameters object
1352
+ * Amount of context to retrieve for each search result
1353
+ */
1354
+ export const CreateResponseToolsSearchContextSize = {
1355
+ Low: "low",
1356
+ Medium: "medium",
1357
+ High: "high",
1358
+ } as const;
1359
+ /**
1360
+ * Amount of context to retrieve for each search result
1361
+ */
1362
+ export type CreateResponseToolsSearchContextSize = ClosedEnum<
1363
+ typeof CreateResponseToolsSearchContextSize
1364
+ >;
1365
+
1366
+ /**
1367
+ * The type of location
1217
1368
  */
1218
- export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type =
1369
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type =
1219
1370
  {
1220
- Object: "object",
1371
+ Approximate: "approximate",
1372
+ Exact: "exact",
1221
1373
  } as const;
1222
1374
  /**
1223
- * The type of the parameters object
1375
+ * The type of location
1224
1376
  */
1225
- export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type =
1377
+ export type CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type =
1226
1378
  ClosedEnum<
1227
- typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type
1379
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type
1228
1380
  >;
1229
1381
 
1230
- export type ToolsProperties = {
1231
- type: string;
1232
- description?: string | undefined;
1233
- enum?: Array<string> | undefined;
1234
- additionalProperties?: { [k: string]: any } | undefined;
1382
+ /**
1383
+ * User location for search localization
1384
+ */
1385
+ export type CreateResponseToolsUserLocation = {
1386
+ /**
1387
+ * The type of location
1388
+ */
1389
+ type?:
1390
+ | CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type
1391
+ | undefined;
1392
+ /**
1393
+ * The city name
1394
+ */
1395
+ city?: string | null | undefined;
1396
+ /**
1397
+ * The country code
1398
+ */
1399
+ country?: string | undefined;
1400
+ /**
1401
+ * The region/state
1402
+ */
1403
+ region?: string | null | undefined;
1404
+ /**
1405
+ * The timezone
1406
+ */
1407
+ timezone?: string | null | undefined;
1235
1408
  };
1236
1409
 
1237
1410
  /**
1238
- * The parameters the function accepts
1411
+ * Configuration for web search preview tool
1239
1412
  */
1240
- export type CreateResponseToolsParameters = {
1413
+ export type CreateResponseTools2 = {
1241
1414
  /**
1242
- * The type of the parameters object
1415
+ * The type of tool
1243
1416
  */
1244
- type:
1245
- CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type;
1417
+ type: "web_search_preview";
1246
1418
  /**
1247
- * The parameters the function accepts, described as a JSON Schema object
1419
+ * List of domains to restrict search to
1248
1420
  */
1249
- properties: { [k: string]: ToolsProperties };
1421
+ domains?: Array<string> | undefined;
1250
1422
  /**
1251
- * List of required parameter names
1423
+ * Amount of context to retrieve for each search result
1252
1424
  */
1253
- required?: Array<string> | undefined;
1425
+ searchContextSize: CreateResponseToolsSearchContextSize;
1254
1426
  /**
1255
- * Whether to allow properties not defined in the schema
1427
+ * User location for search localization
1256
1428
  */
1257
- additionalProperties?: boolean | undefined;
1429
+ userLocation?: CreateResponseToolsUserLocation | undefined;
1258
1430
  };
1259
1431
 
1260
1432
  /**
@@ -1274,19 +1446,20 @@ export type CreateResponseTools1 = {
1274
1446
  */
1275
1447
  description?: string | null | undefined;
1276
1448
  /**
1277
- * The parameters the function accepts
1449
+ * The parameters the function accepts as a JSON Schema object
1278
1450
  */
1279
- parameters: CreateResponseToolsParameters;
1451
+ parameters?: { [k: string]: any } | null | undefined;
1280
1452
  /**
1281
1453
  * Whether to enable strict schema adherence when generating function calls
1282
1454
  */
1283
- strict: boolean;
1455
+ strict: boolean | null;
1284
1456
  };
1285
1457
 
1286
1458
  export type CreateResponseRouterResponsesTools =
1287
1459
  | CreateResponseTools1
1288
1460
  | CreateResponseTools2
1289
- | CreateResponseTools3;
1461
+ | CreateResponseTools3
1462
+ | CreateResponseTools4;
1290
1463
 
1291
1464
  export type CreateResponseReasoning = {
1292
1465
  effort?: string | null | undefined;
@@ -1358,6 +1531,7 @@ export const CreateResponseServiceTier = {
1358
1531
  Auto: "auto",
1359
1532
  Default: "default",
1360
1533
  Flex: "flex",
1534
+ Scale: "scale",
1361
1535
  Priority: "priority",
1362
1536
  } as const;
1363
1537
  /**
@@ -1429,7 +1603,12 @@ export type CreateResponseResponseBody = {
1429
1603
  | CreateResponseToolChoiceRouterResponses1
1430
1604
  | undefined;
1431
1605
  tools?:
1432
- | Array<CreateResponseTools1 | CreateResponseTools2 | CreateResponseTools3>
1606
+ | Array<
1607
+ | CreateResponseTools1
1608
+ | CreateResponseTools2
1609
+ | CreateResponseTools3
1610
+ | CreateResponseTools4
1611
+ >
1433
1612
  | undefined;
1434
1613
  reasoning?: CreateResponseReasoning | null | undefined;
1435
1614
  store?: boolean | undefined;
@@ -1468,9 +1647,14 @@ export type CreateResponseResponse =
1468
1647
  export const Effort$outboundSchema: z.ZodNativeEnum<typeof Effort> = z
1469
1648
  .nativeEnum(Effort);
1470
1649
 
1650
+ /** @internal */
1651
+ export const Summary$outboundSchema: z.ZodNativeEnum<typeof Summary> = z
1652
+ .nativeEnum(Summary);
1653
+
1471
1654
  /** @internal */
1472
1655
  export type Reasoning$Outbound = {
1473
1656
  effort?: string | undefined;
1657
+ summary?: string | null | undefined;
1474
1658
  };
1475
1659
 
1476
1660
  /** @internal */
@@ -1480,6 +1664,7 @@ export const Reasoning$outboundSchema: z.ZodType<
1480
1664
  Reasoning
1481
1665
  > = z.object({
1482
1666
  effort: Effort$outboundSchema.optional(),
1667
+ summary: z.nullable(Summary$outboundSchema).optional(),
1483
1668
  });
1484
1669
 
1485
1670
  export function reasoningToJSON(reasoning: Reasoning): string {
@@ -1965,7 +2150,7 @@ export function rankingOptionsToJSON(rankingOptions: RankingOptions): string {
1965
2150
  }
1966
2151
 
1967
2152
  /** @internal */
1968
- export type Tools3$Outbound = {
2153
+ export type Tools4$Outbound = {
1969
2154
  type: "file_search";
1970
2155
  vector_store_ids?: Array<string> | undefined;
1971
2156
  max_num_results: number;
@@ -1974,10 +2159,10 @@ export type Tools3$Outbound = {
1974
2159
  };
1975
2160
 
1976
2161
  /** @internal */
1977
- export const Tools3$outboundSchema: z.ZodType<
1978
- Tools3$Outbound,
2162
+ export const Tools4$outboundSchema: z.ZodType<
2163
+ Tools4$Outbound,
1979
2164
  z.ZodTypeDef,
1980
- Tools3
2165
+ Tools4
1981
2166
  > = z.object({
1982
2167
  type: z.literal("file_search"),
1983
2168
  vectorStoreIds: z.array(z.string()).optional(),
@@ -1992,6 +2177,99 @@ export const Tools3$outboundSchema: z.ZodType<
1992
2177
  });
1993
2178
  });
1994
2179
 
2180
+ export function tools4ToJSON(tools4: Tools4): string {
2181
+ return JSON.stringify(Tools4$outboundSchema.parse(tools4));
2182
+ }
2183
+
2184
+ /** @internal */
2185
+ export const ToolsSearchContextSize$outboundSchema: z.ZodNativeEnum<
2186
+ typeof ToolsSearchContextSize
2187
+ > = z.nativeEnum(ToolsSearchContextSize);
2188
+
2189
+ /** @internal */
2190
+ export const CreateResponseToolsRouterResponsesRequestRequestBodyType$outboundSchema:
2191
+ z.ZodNativeEnum<
2192
+ typeof CreateResponseToolsRouterResponsesRequestRequestBodyType
2193
+ > = z.nativeEnum(CreateResponseToolsRouterResponsesRequestRequestBodyType);
2194
+
2195
+ /** @internal */
2196
+ export type ToolsUserLocation$Outbound = {
2197
+ type?: string | undefined;
2198
+ city?: string | null | undefined;
2199
+ country?: string | undefined;
2200
+ region?: string | null | undefined;
2201
+ timezone?: string | null | undefined;
2202
+ };
2203
+
2204
+ /** @internal */
2205
+ export const ToolsUserLocation$outboundSchema: z.ZodType<
2206
+ ToolsUserLocation$Outbound,
2207
+ z.ZodTypeDef,
2208
+ ToolsUserLocation
2209
+ > = z.object({
2210
+ type: CreateResponseToolsRouterResponsesRequestRequestBodyType$outboundSchema
2211
+ .optional(),
2212
+ city: z.nullable(z.string()).optional(),
2213
+ country: z.string().optional(),
2214
+ region: z.nullable(z.string()).optional(),
2215
+ timezone: z.nullable(z.string()).optional(),
2216
+ });
2217
+
2218
+ export function toolsUserLocationToJSON(
2219
+ toolsUserLocation: ToolsUserLocation,
2220
+ ): string {
2221
+ return JSON.stringify(
2222
+ ToolsUserLocation$outboundSchema.parse(toolsUserLocation),
2223
+ );
2224
+ }
2225
+
2226
+ /** @internal */
2227
+ export type Filters$Outbound = {
2228
+ allowed_domains?: Array<string> | null | undefined;
2229
+ };
2230
+
2231
+ /** @internal */
2232
+ export const Filters$outboundSchema: z.ZodType<
2233
+ Filters$Outbound,
2234
+ z.ZodTypeDef,
2235
+ Filters
2236
+ > = z.object({
2237
+ allowedDomains: z.nullable(z.array(z.string())).optional(),
2238
+ }).transform((v) => {
2239
+ return remap$(v, {
2240
+ allowedDomains: "allowed_domains",
2241
+ });
2242
+ });
2243
+
2244
+ export function filtersToJSON(filters: Filters): string {
2245
+ return JSON.stringify(Filters$outboundSchema.parse(filters));
2246
+ }
2247
+
2248
+ /** @internal */
2249
+ export type Tools3$Outbound = {
2250
+ type: "web_search";
2251
+ search_context_size: string;
2252
+ user_location?: ToolsUserLocation$Outbound | undefined;
2253
+ filters?: Filters$Outbound | null | undefined;
2254
+ };
2255
+
2256
+ /** @internal */
2257
+ export const Tools3$outboundSchema: z.ZodType<
2258
+ Tools3$Outbound,
2259
+ z.ZodTypeDef,
2260
+ Tools3
2261
+ > = z.object({
2262
+ type: z.literal("web_search"),
2263
+ searchContextSize: ToolsSearchContextSize$outboundSchema.default("medium"),
2264
+ userLocation: z.lazy(() => ToolsUserLocation$outboundSchema).optional(),
2265
+ filters: z.nullable(z.lazy(() => Filters$outboundSchema)).optional(),
2266
+ }).transform((v) => {
2267
+ return remap$(v, {
2268
+ searchContextSize: "search_context_size",
2269
+ userLocation: "user_location",
2270
+ });
2271
+ });
2272
+
1995
2273
  export function tools3ToJSON(tools3: Tools3): string {
1996
2274
  return JSON.stringify(Tools3$outboundSchema.parse(tools3));
1997
2275
  }
@@ -2002,9 +2280,10 @@ export const SearchContextSize$outboundSchema: z.ZodNativeEnum<
2002
2280
  > = z.nativeEnum(SearchContextSize);
2003
2281
 
2004
2282
  /** @internal */
2005
- export const CreateResponseToolsRouterResponsesRequestType$outboundSchema:
2006
- z.ZodNativeEnum<typeof CreateResponseToolsRouterResponsesRequestType> = z
2007
- .nativeEnum(CreateResponseToolsRouterResponsesRequestType);
2283
+ export const CreateResponseToolsRouterResponsesType$outboundSchema:
2284
+ z.ZodNativeEnum<typeof CreateResponseToolsRouterResponsesType> = z.nativeEnum(
2285
+ CreateResponseToolsRouterResponsesType,
2286
+ );
2008
2287
 
2009
2288
  /** @internal */
2010
2289
  export type UserLocation$Outbound = {
@@ -2021,7 +2300,7 @@ export const UserLocation$outboundSchema: z.ZodType<
2021
2300
  z.ZodTypeDef,
2022
2301
  UserLocation
2023
2302
  > = z.object({
2024
- type: CreateResponseToolsRouterResponsesRequestType$outboundSchema.optional(),
2303
+ type: CreateResponseToolsRouterResponsesType$outboundSchema.optional(),
2025
2304
  city: z.nullable(z.string()).optional(),
2026
2305
  country: z.string().optional(),
2027
2306
  region: z.nullable(z.string()).optional(),
@@ -2061,75 +2340,13 @@ export function tools2ToJSON(tools2: Tools2): string {
2061
2340
  return JSON.stringify(Tools2$outboundSchema.parse(tools2));
2062
2341
  }
2063
2342
 
2064
- /** @internal */
2065
- export const CreateResponseToolsType$outboundSchema: z.ZodNativeEnum<
2066
- typeof CreateResponseToolsType
2067
- > = z.nativeEnum(CreateResponseToolsType);
2068
-
2069
- /** @internal */
2070
- export type Properties$Outbound = {
2071
- type: string;
2072
- description?: string | undefined;
2073
- enum?: Array<string> | undefined;
2074
- [additionalProperties: string]: unknown;
2075
- };
2076
-
2077
- /** @internal */
2078
- export const Properties$outboundSchema: z.ZodType<
2079
- Properties$Outbound,
2080
- z.ZodTypeDef,
2081
- Properties
2082
- > = z.object({
2083
- type: z.string(),
2084
- description: z.string().optional(),
2085
- enum: z.array(z.string()).optional(),
2086
- additionalProperties: z.record(z.any()).optional(),
2087
- }).transform((v) => {
2088
- return {
2089
- ...v.additionalProperties,
2090
- ...remap$(v, {
2091
- additionalProperties: null,
2092
- }),
2093
- };
2094
- });
2095
-
2096
- export function propertiesToJSON(properties: Properties): string {
2097
- return JSON.stringify(Properties$outboundSchema.parse(properties));
2098
- }
2099
-
2100
- /** @internal */
2101
- export type ToolsParameters$Outbound = {
2102
- type: string;
2103
- properties: { [k: string]: Properties$Outbound };
2104
- required?: Array<string> | undefined;
2105
- additionalProperties?: boolean | undefined;
2106
- };
2107
-
2108
- /** @internal */
2109
- export const ToolsParameters$outboundSchema: z.ZodType<
2110
- ToolsParameters$Outbound,
2111
- z.ZodTypeDef,
2112
- ToolsParameters
2113
- > = z.object({
2114
- type: CreateResponseToolsType$outboundSchema,
2115
- properties: z.record(z.lazy(() => Properties$outboundSchema)),
2116
- required: z.array(z.string()).optional(),
2117
- additionalProperties: z.boolean().optional(),
2118
- });
2119
-
2120
- export function toolsParametersToJSON(
2121
- toolsParameters: ToolsParameters,
2122
- ): string {
2123
- return JSON.stringify(ToolsParameters$outboundSchema.parse(toolsParameters));
2124
- }
2125
-
2126
2343
  /** @internal */
2127
2344
  export type Tools1$Outbound = {
2128
2345
  type: "function";
2129
2346
  name: string;
2130
2347
  description?: string | null | undefined;
2131
- parameters: ToolsParameters$Outbound;
2132
- strict: boolean;
2348
+ parameters?: { [k: string]: any } | null | undefined;
2349
+ strict: boolean | null;
2133
2350
  };
2134
2351
 
2135
2352
  /** @internal */
@@ -2141,8 +2358,8 @@ export const Tools1$outboundSchema: z.ZodType<
2141
2358
  type: z.literal("function"),
2142
2359
  name: z.string(),
2143
2360
  description: z.nullable(z.string()).optional(),
2144
- parameters: z.lazy(() => ToolsParameters$outboundSchema),
2145
- strict: z.boolean().default(true),
2361
+ parameters: z.nullable(z.record(z.any())).optional(),
2362
+ strict: z.nullable(z.boolean().default(true)),
2146
2363
  });
2147
2364
 
2148
2365
  export function tools1ToJSON(tools1: Tools1): string {
@@ -2153,7 +2370,8 @@ export function tools1ToJSON(tools1: Tools1): string {
2153
2370
  export type CreateResponseTools$Outbound =
2154
2371
  | Tools1$Outbound
2155
2372
  | Tools2$Outbound
2156
- | Tools3$Outbound;
2373
+ | Tools3$Outbound
2374
+ | Tools4$Outbound;
2157
2375
 
2158
2376
  /** @internal */
2159
2377
  export const CreateResponseTools$outboundSchema: z.ZodType<
@@ -2164,6 +2382,7 @@ export const CreateResponseTools$outboundSchema: z.ZodType<
2164
2382
  z.lazy(() => Tools1$outboundSchema),
2165
2383
  z.lazy(() => Tools2$outboundSchema),
2166
2384
  z.lazy(() => Tools3$outboundSchema),
2385
+ z.lazy(() => Tools4$outboundSchema),
2167
2386
  ]);
2168
2387
 
2169
2388
  export function createResponseToolsToJSON(
@@ -2318,7 +2537,9 @@ export type CreateResponseRequestBody$Outbound = {
2318
2537
  store: boolean | null;
2319
2538
  service_tier?: string | null | undefined;
2320
2539
  tools?:
2321
- | Array<Tools1$Outbound | Tools2$Outbound | Tools3$Outbound>
2540
+ | Array<
2541
+ Tools1$Outbound | Tools2$Outbound | Tools3$Outbound | Tools4$Outbound
2542
+ >
2322
2543
  | undefined;
2323
2544
  tool_choice?:
2324
2545
  | ToolChoice3$Outbound
@@ -2368,6 +2589,7 @@ export const CreateResponseRequestBody$outboundSchema: z.ZodType<
2368
2589
  z.lazy(() => Tools1$outboundSchema),
2369
2590
  z.lazy(() => Tools2$outboundSchema),
2370
2591
  z.lazy(() => Tools3$outboundSchema),
2592
+ z.lazy(() => Tools4$outboundSchema),
2371
2593
  ]),
2372
2594
  ).optional(),
2373
2595
  toolChoice: z.union([
@@ -2562,12 +2784,59 @@ export const CreateResponseOutputStatus$inboundSchema: z.ZodNativeEnum<
2562
2784
  typeof CreateResponseOutputStatus
2563
2785
  > = z.nativeEnum(CreateResponseOutputStatus);
2564
2786
 
2787
+ /** @internal */
2788
+ export const CreateResponseOutputRouterResponsesResponse200ApplicationJSONType$inboundSchema:
2789
+ z.ZodNativeEnum<
2790
+ typeof CreateResponseOutputRouterResponsesResponse200ApplicationJSONType
2791
+ > = z.nativeEnum(
2792
+ CreateResponseOutputRouterResponsesResponse200ApplicationJSONType,
2793
+ );
2794
+
2795
+ /** @internal */
2796
+ export const Sources$inboundSchema: z.ZodType<Sources, z.ZodTypeDef, unknown> =
2797
+ z.object({
2798
+ url: z.string(),
2799
+ title: z.string(),
2800
+ });
2801
+
2802
+ export function sourcesFromJSON(
2803
+ jsonString: string,
2804
+ ): SafeParseResult<Sources, SDKValidationError> {
2805
+ return safeParse(
2806
+ jsonString,
2807
+ (x) => Sources$inboundSchema.parse(JSON.parse(x)),
2808
+ `Failed to parse 'Sources' from JSON`,
2809
+ );
2810
+ }
2811
+
2812
+ /** @internal */
2813
+ export const Action$inboundSchema: z.ZodType<Action, z.ZodTypeDef, unknown> = z
2814
+ .object({
2815
+ type:
2816
+ CreateResponseOutputRouterResponsesResponse200ApplicationJSONType$inboundSchema,
2817
+ query: z.string().optional(),
2818
+ url: z.string().optional(),
2819
+ pattern: z.string().optional(),
2820
+ sources: z.array(z.lazy(() => Sources$inboundSchema)).optional(),
2821
+ });
2822
+
2823
+ export function actionFromJSON(
2824
+ jsonString: string,
2825
+ ): SafeParseResult<Action, SDKValidationError> {
2826
+ return safeParse(
2827
+ jsonString,
2828
+ (x) => Action$inboundSchema.parse(JSON.parse(x)),
2829
+ `Failed to parse 'Action' from JSON`,
2830
+ );
2831
+ }
2832
+
2565
2833
  /** @internal */
2566
2834
  export const Output2$inboundSchema: z.ZodType<Output2, z.ZodTypeDef, unknown> =
2567
2835
  z.object({
2568
2836
  id: z.string(),
2569
2837
  type: z.literal("web_search_call"),
2570
2838
  status: CreateResponseOutputStatus$inboundSchema,
2839
+ action: z.lazy(() => Action$inboundSchema).optional(),
2571
2840
  });
2572
2841
 
2573
2842
  export function output2FromJSON(
@@ -2589,8 +2858,25 @@ export const OutputStatus$inboundSchema: z.ZodNativeEnum<typeof OutputStatus> =
2589
2858
  z.nativeEnum(OutputStatus);
2590
2859
 
2591
2860
  /** @internal */
2592
- export const ContentType$inboundSchema: z.ZodNativeEnum<typeof ContentType> = z
2593
- .nativeEnum(ContentType);
2861
+ export const CreateResponseContentRouterResponses2$inboundSchema: z.ZodType<
2862
+ CreateResponseContentRouterResponses2,
2863
+ z.ZodTypeDef,
2864
+ unknown
2865
+ > = z.object({
2866
+ type: z.literal("refusal"),
2867
+ refusal: z.string(),
2868
+ });
2869
+
2870
+ export function createResponseContentRouterResponses2FromJSON(
2871
+ jsonString: string,
2872
+ ): SafeParseResult<CreateResponseContentRouterResponses2, SDKValidationError> {
2873
+ return safeParse(
2874
+ jsonString,
2875
+ (x) =>
2876
+ CreateResponseContentRouterResponses2$inboundSchema.parse(JSON.parse(x)),
2877
+ `Failed to parse 'CreateResponseContentRouterResponses2' from JSON`,
2878
+ );
2879
+ }
2594
2880
 
2595
2881
  /** @internal */
2596
2882
  export const Annotations2$inboundSchema: z.ZodType<
@@ -2672,7 +2958,7 @@ export const Content1$inboundSchema: z.ZodType<
2672
2958
  z.ZodTypeDef,
2673
2959
  unknown
2674
2960
  > = z.object({
2675
- type: ContentType$inboundSchema,
2961
+ type: z.literal("output_text"),
2676
2962
  text: z.string(),
2677
2963
  annotations: z.array(
2678
2964
  z.union([
@@ -2698,7 +2984,10 @@ export const OutputContent$inboundSchema: z.ZodType<
2698
2984
  OutputContent,
2699
2985
  z.ZodTypeDef,
2700
2986
  unknown
2701
- > = z.lazy(() => Content1$inboundSchema);
2987
+ > = z.union([
2988
+ z.lazy(() => Content1$inboundSchema),
2989
+ z.lazy(() => CreateResponseContentRouterResponses2$inboundSchema),
2990
+ ]);
2702
2991
 
2703
2992
  export function outputContentFromJSON(
2704
2993
  jsonString: string,
@@ -2717,7 +3006,12 @@ export const Output1$inboundSchema: z.ZodType<Output1, z.ZodTypeDef, unknown> =
2717
3006
  type: z.literal("message"),
2718
3007
  role: OutputRole$inboundSchema,
2719
3008
  status: OutputStatus$inboundSchema,
2720
- content: z.array(z.lazy(() => Content1$inboundSchema)).optional(),
3009
+ content: z.array(
3010
+ z.union([
3011
+ z.lazy(() => Content1$inboundSchema),
3012
+ z.lazy(() => CreateResponseContentRouterResponses2$inboundSchema),
3013
+ ]),
3014
+ ).optional(),
2721
3015
  });
2722
3016
 
2723
3017
  export function output1FromJSON(
@@ -2943,8 +3237,8 @@ export function toolsRankingOptionsFromJSON(
2943
3237
  }
2944
3238
 
2945
3239
  /** @internal */
2946
- export const CreateResponseTools3$inboundSchema: z.ZodType<
2947
- CreateResponseTools3,
3240
+ export const CreateResponseTools4$inboundSchema: z.ZodType<
3241
+ CreateResponseTools4,
2948
3242
  z.ZodTypeDef,
2949
3243
  unknown
2950
3244
  > = z.object({
@@ -2961,64 +3255,99 @@ export const CreateResponseTools3$inboundSchema: z.ZodType<
2961
3255
  });
2962
3256
  });
2963
3257
 
2964
- export function createResponseTools3FromJSON(
3258
+ export function createResponseTools4FromJSON(
2965
3259
  jsonString: string,
2966
- ): SafeParseResult<CreateResponseTools3, SDKValidationError> {
3260
+ ): SafeParseResult<CreateResponseTools4, SDKValidationError> {
2967
3261
  return safeParse(
2968
3262
  jsonString,
2969
- (x) => CreateResponseTools3$inboundSchema.parse(JSON.parse(x)),
2970
- `Failed to parse 'CreateResponseTools3' from JSON`,
3263
+ (x) => CreateResponseTools4$inboundSchema.parse(JSON.parse(x)),
3264
+ `Failed to parse 'CreateResponseTools4' from JSON`,
2971
3265
  );
2972
3266
  }
2973
3267
 
2974
3268
  /** @internal */
2975
- export const ToolsSearchContextSize$inboundSchema: z.ZodNativeEnum<
2976
- typeof ToolsSearchContextSize
2977
- > = z.nativeEnum(ToolsSearchContextSize);
3269
+ export const CreateResponseToolsRouterResponsesSearchContextSize$inboundSchema:
3270
+ z.ZodNativeEnum<typeof CreateResponseToolsRouterResponsesSearchContextSize> =
3271
+ z.nativeEnum(CreateResponseToolsRouterResponsesSearchContextSize);
2978
3272
 
2979
3273
  /** @internal */
2980
- export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema:
3274
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type$inboundSchema:
2981
3275
  z.ZodNativeEnum<
2982
- typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType
3276
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type
2983
3277
  > = z.nativeEnum(
2984
- CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType,
3278
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type,
2985
3279
  );
2986
3280
 
2987
3281
  /** @internal */
2988
- export const ToolsUserLocation$inboundSchema: z.ZodType<
2989
- ToolsUserLocation,
3282
+ export const CreateResponseToolsRouterResponsesUserLocation$inboundSchema:
3283
+ z.ZodType<
3284
+ CreateResponseToolsRouterResponsesUserLocation,
3285
+ z.ZodTypeDef,
3286
+ unknown
3287
+ > = z.object({
3288
+ type:
3289
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody3Type$inboundSchema
3290
+ .optional(),
3291
+ city: z.nullable(z.string()).optional(),
3292
+ country: z.string().optional(),
3293
+ region: z.nullable(z.string()).optional(),
3294
+ timezone: z.nullable(z.string()).optional(),
3295
+ });
3296
+
3297
+ export function createResponseToolsRouterResponsesUserLocationFromJSON(
3298
+ jsonString: string,
3299
+ ): SafeParseResult<
3300
+ CreateResponseToolsRouterResponsesUserLocation,
3301
+ SDKValidationError
3302
+ > {
3303
+ return safeParse(
3304
+ jsonString,
3305
+ (x) =>
3306
+ CreateResponseToolsRouterResponsesUserLocation$inboundSchema.parse(
3307
+ JSON.parse(x),
3308
+ ),
3309
+ `Failed to parse 'CreateResponseToolsRouterResponsesUserLocation' from JSON`,
3310
+ );
3311
+ }
3312
+
3313
+ /** @internal */
3314
+ export const ToolsFilters$inboundSchema: z.ZodType<
3315
+ ToolsFilters,
2990
3316
  z.ZodTypeDef,
2991
3317
  unknown
2992
3318
  > = z.object({
2993
- type:
2994
- CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBodyType$inboundSchema
2995
- .optional(),
2996
- city: z.nullable(z.string()).optional(),
2997
- country: z.string().optional(),
2998
- region: z.nullable(z.string()).optional(),
2999
- timezone: z.nullable(z.string()).optional(),
3319
+ allowed_domains: z.nullable(z.array(z.string())).optional(),
3320
+ }).transform((v) => {
3321
+ return remap$(v, {
3322
+ "allowed_domains": "allowedDomains",
3323
+ });
3000
3324
  });
3001
3325
 
3002
- export function toolsUserLocationFromJSON(
3326
+ export function toolsFiltersFromJSON(
3003
3327
  jsonString: string,
3004
- ): SafeParseResult<ToolsUserLocation, SDKValidationError> {
3328
+ ): SafeParseResult<ToolsFilters, SDKValidationError> {
3005
3329
  return safeParse(
3006
3330
  jsonString,
3007
- (x) => ToolsUserLocation$inboundSchema.parse(JSON.parse(x)),
3008
- `Failed to parse 'ToolsUserLocation' from JSON`,
3331
+ (x) => ToolsFilters$inboundSchema.parse(JSON.parse(x)),
3332
+ `Failed to parse 'ToolsFilters' from JSON`,
3009
3333
  );
3010
3334
  }
3011
3335
 
3012
3336
  /** @internal */
3013
- export const CreateResponseTools2$inboundSchema: z.ZodType<
3014
- CreateResponseTools2,
3337
+ export const CreateResponseTools3$inboundSchema: z.ZodType<
3338
+ CreateResponseTools3,
3015
3339
  z.ZodTypeDef,
3016
3340
  unknown
3017
3341
  > = z.object({
3018
- type: z.literal("web_search_preview"),
3019
- domains: z.array(z.string()).optional(),
3020
- search_context_size: ToolsSearchContextSize$inboundSchema.default("medium"),
3021
- user_location: z.lazy(() => ToolsUserLocation$inboundSchema).optional(),
3342
+ type: z.literal("web_search"),
3343
+ search_context_size:
3344
+ CreateResponseToolsRouterResponsesSearchContextSize$inboundSchema.default(
3345
+ "medium",
3346
+ ),
3347
+ user_location: z.lazy(() =>
3348
+ CreateResponseToolsRouterResponsesUserLocation$inboundSchema
3349
+ ).optional(),
3350
+ filters: z.nullable(z.lazy(() => ToolsFilters$inboundSchema)).optional(),
3022
3351
  }).transform((v) => {
3023
3352
  return remap$(v, {
3024
3353
  "search_context_size": "searchContextSize",
@@ -3026,69 +3355,81 @@ export const CreateResponseTools2$inboundSchema: z.ZodType<
3026
3355
  });
3027
3356
  });
3028
3357
 
3029
- export function createResponseTools2FromJSON(
3358
+ export function createResponseTools3FromJSON(
3030
3359
  jsonString: string,
3031
- ): SafeParseResult<CreateResponseTools2, SDKValidationError> {
3360
+ ): SafeParseResult<CreateResponseTools3, SDKValidationError> {
3032
3361
  return safeParse(
3033
3362
  jsonString,
3034
- (x) => CreateResponseTools2$inboundSchema.parse(JSON.parse(x)),
3035
- `Failed to parse 'CreateResponseTools2' from JSON`,
3363
+ (x) => CreateResponseTools3$inboundSchema.parse(JSON.parse(x)),
3364
+ `Failed to parse 'CreateResponseTools3' from JSON`,
3036
3365
  );
3037
3366
  }
3038
3367
 
3039
3368
  /** @internal */
3040
- export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type$inboundSchema:
3369
+ export const CreateResponseToolsSearchContextSize$inboundSchema:
3370
+ z.ZodNativeEnum<typeof CreateResponseToolsSearchContextSize> = z.nativeEnum(
3371
+ CreateResponseToolsSearchContextSize,
3372
+ );
3373
+
3374
+ /** @internal */
3375
+ export const CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type$inboundSchema:
3041
3376
  z.ZodNativeEnum<
3042
- typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type
3377
+ typeof CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type
3043
3378
  > = z.nativeEnum(
3044
- CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type,
3379
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type,
3045
3380
  );
3046
3381
 
3047
3382
  /** @internal */
3048
- export const ToolsProperties$inboundSchema: z.ZodType<
3049
- ToolsProperties,
3383
+ export const CreateResponseToolsUserLocation$inboundSchema: z.ZodType<
3384
+ CreateResponseToolsUserLocation,
3050
3385
  z.ZodTypeDef,
3051
3386
  unknown
3052
- > = collectExtraKeys$(
3053
- z.object({
3054
- type: z.string(),
3055
- description: z.string().optional(),
3056
- enum: z.array(z.string()).optional(),
3057
- }).catchall(z.any()),
3058
- "additionalProperties",
3059
- true,
3060
- );
3387
+ > = z.object({
3388
+ type:
3389
+ CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody2Type$inboundSchema
3390
+ .optional(),
3391
+ city: z.nullable(z.string()).optional(),
3392
+ country: z.string().optional(),
3393
+ region: z.nullable(z.string()).optional(),
3394
+ timezone: z.nullable(z.string()).optional(),
3395
+ });
3061
3396
 
3062
- export function toolsPropertiesFromJSON(
3397
+ export function createResponseToolsUserLocationFromJSON(
3063
3398
  jsonString: string,
3064
- ): SafeParseResult<ToolsProperties, SDKValidationError> {
3399
+ ): SafeParseResult<CreateResponseToolsUserLocation, SDKValidationError> {
3065
3400
  return safeParse(
3066
3401
  jsonString,
3067
- (x) => ToolsProperties$inboundSchema.parse(JSON.parse(x)),
3068
- `Failed to parse 'ToolsProperties' from JSON`,
3402
+ (x) => CreateResponseToolsUserLocation$inboundSchema.parse(JSON.parse(x)),
3403
+ `Failed to parse 'CreateResponseToolsUserLocation' from JSON`,
3069
3404
  );
3070
3405
  }
3071
3406
 
3072
3407
  /** @internal */
3073
- export const CreateResponseToolsParameters$inboundSchema: z.ZodType<
3074
- CreateResponseToolsParameters,
3408
+ export const CreateResponseTools2$inboundSchema: z.ZodType<
3409
+ CreateResponseTools2,
3075
3410
  z.ZodTypeDef,
3076
3411
  unknown
3077
3412
  > = z.object({
3078
- type:
3079
- CreateResponseToolsRouterResponsesResponse200ApplicationJSONResponseBody1Type$inboundSchema,
3080
- properties: z.record(z.lazy(() => ToolsProperties$inboundSchema)),
3081
- required: z.array(z.string()).optional(),
3082
- additionalProperties: z.boolean().optional(),
3413
+ type: z.literal("web_search_preview"),
3414
+ domains: z.array(z.string()).optional(),
3415
+ search_context_size: CreateResponseToolsSearchContextSize$inboundSchema
3416
+ .default("medium"),
3417
+ user_location: z.lazy(() => CreateResponseToolsUserLocation$inboundSchema)
3418
+ .optional(),
3419
+ }).transform((v) => {
3420
+ return remap$(v, {
3421
+ "search_context_size": "searchContextSize",
3422
+ "user_location": "userLocation",
3423
+ });
3083
3424
  });
3084
3425
 
3085
- export function createResponseToolsParametersFromJSON(
3426
+ export function createResponseTools2FromJSON(
3086
3427
  jsonString: string,
3087
- ): SafeParseResult<CreateResponseToolsParameters, SDKValidationError> {
3428
+ ): SafeParseResult<CreateResponseTools2, SDKValidationError> {
3088
3429
  return safeParse(
3089
3430
  jsonString,
3090
- (x) => CreateResponseToolsParameters$inboundSchema.parse(JSON.parse(x)),
3091
- `Failed to parse 'CreateResponseToolsParameters' from JSON`,
3431
+ (x) => CreateResponseTools2$inboundSchema.parse(JSON.parse(x)),
3432
+ `Failed to parse 'CreateResponseTools2' from JSON`,
3092
3433
  );
3093
3434
  }
3094
3435
 
@@ -3101,8 +3442,8 @@ export const CreateResponseTools1$inboundSchema: z.ZodType<
3101
3442
  type: z.literal("function"),
3102
3443
  name: z.string(),
3103
3444
  description: z.nullable(z.string()).optional(),
3104
- parameters: z.lazy(() => CreateResponseToolsParameters$inboundSchema),
3105
- strict: z.boolean().default(true),
3445
+ parameters: z.nullable(z.record(z.any())).optional(),
3446
+ strict: z.nullable(z.boolean().default(true)),
3106
3447
  });
3107
3448
 
3108
3449
  export function createResponseTools1FromJSON(
@@ -3124,6 +3465,7 @@ export const CreateResponseRouterResponsesTools$inboundSchema: z.ZodType<
3124
3465
  z.lazy(() => CreateResponseTools1$inboundSchema),
3125
3466
  z.lazy(() => CreateResponseTools2$inboundSchema),
3126
3467
  z.lazy(() => CreateResponseTools3$inboundSchema),
3468
+ z.lazy(() => CreateResponseTools4$inboundSchema),
3127
3469
  ]);
3128
3470
 
3129
3471
  export function createResponseRouterResponsesToolsFromJSON(
@@ -3311,6 +3653,7 @@ export const CreateResponseResponseBody$inboundSchema: z.ZodType<
3311
3653
  z.lazy(() => CreateResponseTools1$inboundSchema),
3312
3654
  z.lazy(() => CreateResponseTools2$inboundSchema),
3313
3655
  z.lazy(() => CreateResponseTools3$inboundSchema),
3656
+ z.lazy(() => CreateResponseTools4$inboundSchema),
3314
3657
  ]),
3315
3658
  ).optional(),
3316
3659
  reasoning: z.nullable(z.lazy(() => CreateResponseReasoning$inboundSchema))