llama-stack-client 0.2.18 → 0.2.19-rc2

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 (118) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/index.d.mts +12 -11
  3. package/index.d.ts +12 -11
  4. package/index.d.ts.map +1 -1
  5. package/index.js +3 -0
  6. package/index.js.map +1 -1
  7. package/index.mjs +6 -3
  8. package/index.mjs.map +1 -1
  9. package/package.json +4 -1
  10. package/pagination.d.ts +19 -0
  11. package/pagination.d.ts.map +1 -1
  12. package/pagination.js +42 -1
  13. package/pagination.js.map +1 -1
  14. package/pagination.mjs +40 -0
  15. package/pagination.mjs.map +1 -1
  16. package/resources/chat/chat.d.ts +2 -2
  17. package/resources/chat/chat.d.ts.map +1 -1
  18. package/resources/chat/chat.js +1 -0
  19. package/resources/chat/chat.js.map +1 -1
  20. package/resources/chat/chat.mjs +2 -1
  21. package/resources/chat/chat.mjs.map +1 -1
  22. package/resources/chat/completions.d.ts +414 -446
  23. package/resources/chat/completions.d.ts.map +1 -1
  24. package/resources/chat/completions.js +7 -2
  25. package/resources/chat/completions.js.map +1 -1
  26. package/resources/chat/completions.mjs +5 -1
  27. package/resources/chat/completions.mjs.map +1 -1
  28. package/resources/chat/index.d.ts +1 -1
  29. package/resources/chat/index.d.ts.map +1 -1
  30. package/resources/chat/index.js +2 -1
  31. package/resources/chat/index.js.map +1 -1
  32. package/resources/chat/index.mjs +1 -1
  33. package/resources/chat/index.mjs.map +1 -1
  34. package/resources/files.d.ts +10 -19
  35. package/resources/files.d.ts.map +1 -1
  36. package/resources/files.js +7 -2
  37. package/resources/files.js.map +1 -1
  38. package/resources/files.mjs +5 -1
  39. package/resources/files.mjs.map +1 -1
  40. package/resources/index.d.ts +4 -4
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +4 -1
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +3 -3
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/inference.d.ts +2 -38
  47. package/resources/inference.d.ts.map +1 -1
  48. package/resources/moderations.d.ts +1 -5
  49. package/resources/moderations.d.ts.map +1 -1
  50. package/resources/responses/index.d.ts +1 -1
  51. package/resources/responses/index.d.ts.map +1 -1
  52. package/resources/responses/index.js +2 -1
  53. package/resources/responses/index.js.map +1 -1
  54. package/resources/responses/index.mjs +1 -1
  55. package/resources/responses/index.mjs.map +1 -1
  56. package/resources/responses/input-items.d.ts +30 -3
  57. package/resources/responses/input-items.d.ts.map +1 -1
  58. package/resources/responses/responses.d.ts +604 -470
  59. package/resources/responses/responses.d.ts.map +1 -1
  60. package/resources/responses/responses.js +10 -2
  61. package/resources/responses/responses.js.map +1 -1
  62. package/resources/responses/responses.mjs +8 -1
  63. package/resources/responses/responses.mjs.map +1 -1
  64. package/resources/scoring-functions.d.ts +12 -3
  65. package/resources/scoring-functions.d.ts.map +1 -1
  66. package/resources/scoring-functions.js.map +1 -1
  67. package/resources/scoring-functions.mjs.map +1 -1
  68. package/resources/shared.d.ts +19 -28
  69. package/resources/shared.d.ts.map +1 -1
  70. package/resources/telemetry.d.ts +98 -1
  71. package/resources/telemetry.d.ts.map +1 -1
  72. package/resources/telemetry.js +6 -0
  73. package/resources/telemetry.js.map +1 -1
  74. package/resources/telemetry.mjs +6 -0
  75. package/resources/telemetry.mjs.map +1 -1
  76. package/resources/vector-stores/files.d.ts +7 -39
  77. package/resources/vector-stores/files.d.ts.map +1 -1
  78. package/resources/vector-stores/files.js +7 -2
  79. package/resources/vector-stores/files.js.map +1 -1
  80. package/resources/vector-stores/files.mjs +5 -1
  81. package/resources/vector-stores/files.mjs.map +1 -1
  82. package/resources/vector-stores/index.d.ts +2 -2
  83. package/resources/vector-stores/index.d.ts.map +1 -1
  84. package/resources/vector-stores/index.js +3 -1
  85. package/resources/vector-stores/index.js.map +1 -1
  86. package/resources/vector-stores/index.mjs +2 -2
  87. package/resources/vector-stores/index.mjs.map +1 -1
  88. package/resources/vector-stores/vector-stores.d.ts +9 -16
  89. package/resources/vector-stores/vector-stores.d.ts.map +1 -1
  90. package/resources/vector-stores/vector-stores.js +11 -2
  91. package/resources/vector-stores/vector-stores.js.map +1 -1
  92. package/resources/vector-stores/vector-stores.mjs +10 -2
  93. package/resources/vector-stores/vector-stores.mjs.map +1 -1
  94. package/src/index.ts +27 -3
  95. package/src/pagination.ts +70 -0
  96. package/src/resources/chat/chat.ts +3 -0
  97. package/src/resources/chat/completions.ts +483 -510
  98. package/src/resources/chat/index.ts +1 -0
  99. package/src/resources/files.ts +14 -22
  100. package/src/resources/index.ts +5 -0
  101. package/src/resources/inference.ts +2 -44
  102. package/src/resources/moderations.ts +1 -5
  103. package/src/resources/responses/index.ts +1 -0
  104. package/src/resources/responses/input-items.ts +33 -1
  105. package/src/resources/responses/responses.ts +700 -532
  106. package/src/resources/scoring-functions.ts +34 -3
  107. package/src/resources/shared.ts +22 -43
  108. package/src/resources/telemetry.ts +128 -0
  109. package/src/resources/vector-stores/files.ts +18 -48
  110. package/src/resources/vector-stores/index.ts +2 -1
  111. package/src/resources/vector-stores/vector-stores.ts +16 -19
  112. package/src/version.ts +1 -1
  113. package/version.d.ts +1 -1
  114. package/version.d.ts.map +1 -1
  115. package/version.js +1 -1
  116. package/version.js.map +1 -1
  117. package/version.mjs +1 -1
  118. package/version.mjs.map +1 -1
@@ -4,6 +4,7 @@ import * as Core from "../../core.js";
4
4
  import * as ResponsesAPI from "./responses.js";
5
5
  import * as InputItemsAPI from "./input-items.js";
6
6
  import { InputItemListParams, InputItemListResponse, InputItems } from "./input-items.js";
7
+ import { OpenAICursorPage, type OpenAICursorPageParams } from "../../pagination.js";
7
8
  import { Stream } from "../../streaming.js";
8
9
  export declare class Responses extends APIResource {
9
10
  inputItems: InputItemsAPI.InputItems;
@@ -20,8 +21,10 @@ export declare class Responses extends APIResource {
20
21
  /**
21
22
  * List all OpenAI responses.
22
23
  */
23
- list(query?: ResponseListParams, options?: Core.RequestOptions): Core.APIPromise<ResponseListResponse>;
24
- list(options?: Core.RequestOptions): Core.APIPromise<ResponseListResponse>;
24
+ list(query?: ResponseListParams, options?: Core.RequestOptions): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
25
+ list(options?: Core.RequestOptions): Core.PagePromise<ResponseListResponsesOpenAICursorPage, ResponseListResponse>;
26
+ }
27
+ export declare class ResponseListResponsesOpenAICursorPage extends OpenAICursorPage<ResponseListResponse> {
25
28
  }
26
29
  /**
27
30
  * Complete OpenAI response object containing generation results and metadata.
@@ -235,9 +238,36 @@ export declare namespace ResponseObject {
235
238
  /**
236
239
  * (Optional) Search results returned by the file search operation
237
240
  */
238
- results?: Array<{
239
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
240
- }>;
241
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
242
+ }
243
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
244
+ /**
245
+ * Search results returned by the file search operation.
246
+ */
247
+ interface Result {
248
+ /**
249
+ * (Optional) Key-value attributes associated with the file
250
+ */
251
+ attributes: {
252
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
253
+ };
254
+ /**
255
+ * Unique identifier of the file containing the result
256
+ */
257
+ file_id: string;
258
+ /**
259
+ * Name of the file containing the result
260
+ */
261
+ filename: string;
262
+ /**
263
+ * Relevance score for this search result (between 0 and 1)
264
+ */
265
+ score: number;
266
+ /**
267
+ * Text content of the search result
268
+ */
269
+ text: string;
270
+ }
241
271
  }
242
272
  /**
243
273
  * Function tool call output message for OpenAI responses.
@@ -591,9 +621,36 @@ export declare namespace ResponseObjectStream {
591
621
  /**
592
622
  * (Optional) Search results returned by the file search operation
593
623
  */
594
- results?: Array<{
595
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
596
- }>;
624
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
625
+ }
626
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
627
+ /**
628
+ * Search results returned by the file search operation.
629
+ */
630
+ interface Result {
631
+ /**
632
+ * (Optional) Key-value attributes associated with the file
633
+ */
634
+ attributes: {
635
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
636
+ };
637
+ /**
638
+ * Unique identifier of the file containing the result
639
+ */
640
+ file_id: string;
641
+ /**
642
+ * Name of the file containing the result
643
+ */
644
+ filename: string;
645
+ /**
646
+ * Relevance score for this search result (between 0 and 1)
647
+ */
648
+ score: number;
649
+ /**
650
+ * Text content of the search result
651
+ */
652
+ text: string;
653
+ }
597
654
  }
598
655
  /**
599
656
  * Function tool call output message for OpenAI responses.
@@ -876,9 +933,36 @@ export declare namespace ResponseObjectStream {
876
933
  /**
877
934
  * (Optional) Search results returned by the file search operation
878
935
  */
879
- results?: Array<{
880
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
881
- }>;
936
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
937
+ }
938
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
939
+ /**
940
+ * Search results returned by the file search operation.
941
+ */
942
+ interface Result {
943
+ /**
944
+ * (Optional) Key-value attributes associated with the file
945
+ */
946
+ attributes: {
947
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
948
+ };
949
+ /**
950
+ * Unique identifier of the file containing the result
951
+ */
952
+ file_id: string;
953
+ /**
954
+ * Name of the file containing the result
955
+ */
956
+ filename: string;
957
+ /**
958
+ * Relevance score for this search result (between 0 and 1)
959
+ */
960
+ score: number;
961
+ /**
962
+ * Text content of the search result
963
+ */
964
+ text: string;
965
+ }
882
966
  }
883
967
  /**
884
968
  * Function tool call output message for OpenAI responses.
@@ -1299,602 +1383,629 @@ export declare namespace ResponseObjectStream {
1299
1383
  }
1300
1384
  }
1301
1385
  /**
1302
- * Paginated list of OpenAI response objects with navigation metadata.
1386
+ * OpenAI response object extended with input context information.
1303
1387
  */
1304
1388
  export interface ResponseListResponse {
1305
1389
  /**
1306
- * List of response objects with their input context
1390
+ * Unique identifier for this response
1391
+ */
1392
+ id: string;
1393
+ /**
1394
+ * Unix timestamp when the response was created
1395
+ */
1396
+ created_at: number;
1397
+ /**
1398
+ * List of input items that led to this response
1399
+ */
1400
+ input: Array<ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall | ResponseListResponse.OpenAIResponseInputFunctionToolCallOutput | ResponseListResponse.OpenAIResponseMessage>;
1401
+ /**
1402
+ * Model identifier used for generation
1403
+ */
1404
+ model: string;
1405
+ /**
1406
+ * Object type identifier, always "response"
1407
+ */
1408
+ object: 'response';
1409
+ /**
1410
+ * List of generated output items (messages, tool calls, etc.)
1411
+ */
1412
+ output: Array<ResponseListResponse.OpenAIResponseMessage | ResponseListResponse.OpenAIResponseOutputMessageWebSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFileSearchToolCall | ResponseListResponse.OpenAIResponseOutputMessageFunctionToolCall | ResponseListResponse.OpenAIResponseOutputMessageMcpCall | ResponseListResponse.OpenAIResponseOutputMessageMcpListTools>;
1413
+ /**
1414
+ * Whether tool calls can be executed in parallel
1415
+ */
1416
+ parallel_tool_calls: boolean;
1417
+ /**
1418
+ * Current status of the response generation
1419
+ */
1420
+ status: string;
1421
+ /**
1422
+ * Text formatting configuration for the response
1423
+ */
1424
+ text: ResponseListResponse.Text;
1425
+ /**
1426
+ * (Optional) Error details if the response generation failed
1307
1427
  */
1308
- data: Array<ResponseListResponse.Data>;
1428
+ error?: ResponseListResponse.Error;
1429
+ /**
1430
+ * (Optional) ID of the previous response in a conversation
1431
+ */
1432
+ previous_response_id?: string;
1309
1433
  /**
1310
- * Identifier of the first item in this page
1434
+ * (Optional) Sampling temperature used for generation
1311
1435
  */
1312
- first_id: string;
1436
+ temperature?: number;
1313
1437
  /**
1314
- * Whether there are more results available beyond this page
1438
+ * (Optional) Nucleus sampling parameter used for generation
1315
1439
  */
1316
- has_more: boolean;
1440
+ top_p?: number;
1317
1441
  /**
1318
- * Identifier of the last item in this page
1442
+ * (Optional) Truncation strategy applied to the response
1319
1443
  */
1320
- last_id: string;
1444
+ truncation?: string;
1321
1445
  /**
1322
- * Object type identifier, always "list"
1446
+ * (Optional) User identifier associated with the request
1323
1447
  */
1324
- object: 'list';
1448
+ user?: string;
1325
1449
  }
1326
1450
  export declare namespace ResponseListResponse {
1327
1451
  /**
1328
- * OpenAI response object extended with input context information.
1452
+ * Web search tool call output message for OpenAI responses.
1329
1453
  */
1330
- interface Data {
1454
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
1331
1455
  /**
1332
- * Unique identifier for this response
1456
+ * Unique identifier for this tool call
1333
1457
  */
1334
1458
  id: string;
1335
1459
  /**
1336
- * Unix timestamp when the response was created
1460
+ * Current status of the web search operation
1337
1461
  */
1338
- created_at: number;
1462
+ status: string;
1339
1463
  /**
1340
- * List of input items that led to this response
1464
+ * Tool call type identifier, always "web_search_call"
1341
1465
  */
1342
- input: Array<Data.OpenAIResponseOutputMessageWebSearchToolCall | Data.OpenAIResponseOutputMessageFileSearchToolCall | Data.OpenAIResponseOutputMessageFunctionToolCall | Data.OpenAIResponseInputFunctionToolCallOutput | Data.OpenAIResponseMessage>;
1466
+ type: 'web_search_call';
1467
+ }
1468
+ /**
1469
+ * File search tool call output message for OpenAI responses.
1470
+ */
1471
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
1343
1472
  /**
1344
- * Model identifier used for generation
1473
+ * Unique identifier for this tool call
1345
1474
  */
1346
- model: string;
1475
+ id: string;
1347
1476
  /**
1348
- * Object type identifier, always "response"
1477
+ * List of search queries executed
1349
1478
  */
1350
- object: 'response';
1479
+ queries: Array<string>;
1351
1480
  /**
1352
- * List of generated output items (messages, tool calls, etc.)
1481
+ * Current status of the file search operation
1353
1482
  */
1354
- output: Array<Data.OpenAIResponseMessage | Data.OpenAIResponseOutputMessageWebSearchToolCall | Data.OpenAIResponseOutputMessageFileSearchToolCall | Data.OpenAIResponseOutputMessageFunctionToolCall | Data.OpenAIResponseOutputMessageMcpCall | Data.OpenAIResponseOutputMessageMcpListTools>;
1483
+ status: string;
1355
1484
  /**
1356
- * Whether tool calls can be executed in parallel
1485
+ * Tool call type identifier, always "file_search_call"
1357
1486
  */
1358
- parallel_tool_calls: boolean;
1487
+ type: 'file_search_call';
1359
1488
  /**
1360
- * Current status of the response generation
1489
+ * (Optional) Search results returned by the file search operation
1361
1490
  */
1362
- status: string;
1491
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
1492
+ }
1493
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
1363
1494
  /**
1364
- * Text formatting configuration for the response
1495
+ * Search results returned by the file search operation.
1365
1496
  */
1366
- text: Data.Text;
1497
+ interface Result {
1498
+ /**
1499
+ * (Optional) Key-value attributes associated with the file
1500
+ */
1501
+ attributes: {
1502
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1503
+ };
1504
+ /**
1505
+ * Unique identifier of the file containing the result
1506
+ */
1507
+ file_id: string;
1508
+ /**
1509
+ * Name of the file containing the result
1510
+ */
1511
+ filename: string;
1512
+ /**
1513
+ * Relevance score for this search result (between 0 and 1)
1514
+ */
1515
+ score: number;
1516
+ /**
1517
+ * Text content of the search result
1518
+ */
1519
+ text: string;
1520
+ }
1521
+ }
1522
+ /**
1523
+ * Function tool call output message for OpenAI responses.
1524
+ */
1525
+ interface OpenAIResponseOutputMessageFunctionToolCall {
1367
1526
  /**
1368
- * (Optional) Error details if the response generation failed
1527
+ * JSON string containing the function arguments
1369
1528
  */
1370
- error?: Data.Error;
1529
+ arguments: string;
1371
1530
  /**
1372
- * (Optional) ID of the previous response in a conversation
1531
+ * Unique identifier for the function call
1373
1532
  */
1374
- previous_response_id?: string;
1533
+ call_id: string;
1375
1534
  /**
1376
- * (Optional) Sampling temperature used for generation
1535
+ * Name of the function being called
1377
1536
  */
1378
- temperature?: number;
1537
+ name: string;
1379
1538
  /**
1380
- * (Optional) Nucleus sampling parameter used for generation
1539
+ * Tool call type identifier, always "function_call"
1381
1540
  */
1382
- top_p?: number;
1541
+ type: 'function_call';
1383
1542
  /**
1384
- * (Optional) Truncation strategy applied to the response
1543
+ * (Optional) Additional identifier for the tool call
1385
1544
  */
1386
- truncation?: string;
1545
+ id?: string;
1387
1546
  /**
1388
- * (Optional) User identifier associated with the request
1547
+ * (Optional) Current status of the function call execution
1389
1548
  */
1390
- user?: string;
1549
+ status?: string;
1550
+ }
1551
+ /**
1552
+ * This represents the output of a function call that gets passed back to the
1553
+ * model.
1554
+ */
1555
+ interface OpenAIResponseInputFunctionToolCallOutput {
1556
+ call_id: string;
1557
+ output: string;
1558
+ type: 'function_call_output';
1559
+ id?: string;
1560
+ status?: string;
1561
+ }
1562
+ /**
1563
+ * Corresponds to the various Message types in the Responses API. They are all
1564
+ * under one type because the Responses API gives them all the same "type" value,
1565
+ * and there is no way to tell them apart in certain scenarios.
1566
+ */
1567
+ interface OpenAIResponseMessage {
1568
+ content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage> | Array<OpenAIResponseMessage.UnionMember2>;
1569
+ role: 'system' | 'developer' | 'user' | 'assistant';
1570
+ type: 'message';
1571
+ id?: string;
1572
+ status?: string;
1391
1573
  }
1392
- namespace Data {
1574
+ namespace OpenAIResponseMessage {
1393
1575
  /**
1394
- * Web search tool call output message for OpenAI responses.
1576
+ * Text content for input messages in OpenAI response format.
1395
1577
  */
1396
- interface OpenAIResponseOutputMessageWebSearchToolCall {
1397
- /**
1398
- * Unique identifier for this tool call
1399
- */
1400
- id: string;
1578
+ interface OpenAIResponseInputMessageContentText {
1401
1579
  /**
1402
- * Current status of the web search operation
1580
+ * The text content of the input message
1403
1581
  */
1404
- status: string;
1582
+ text: string;
1405
1583
  /**
1406
- * Tool call type identifier, always "web_search_call"
1584
+ * Content type identifier, always "input_text"
1407
1585
  */
1408
- type: 'web_search_call';
1586
+ type: 'input_text';
1409
1587
  }
1410
1588
  /**
1411
- * File search tool call output message for OpenAI responses.
1589
+ * Image content for input messages in OpenAI response format.
1412
1590
  */
1413
- interface OpenAIResponseOutputMessageFileSearchToolCall {
1414
- /**
1415
- * Unique identifier for this tool call
1416
- */
1417
- id: string;
1418
- /**
1419
- * List of search queries executed
1420
- */
1421
- queries: Array<string>;
1591
+ interface OpenAIResponseInputMessageContentImage {
1422
1592
  /**
1423
- * Current status of the file search operation
1593
+ * Level of detail for image processing, can be "low", "high", or "auto"
1424
1594
  */
1425
- status: string;
1595
+ detail: 'low' | 'high' | 'auto';
1426
1596
  /**
1427
- * Tool call type identifier, always "file_search_call"
1597
+ * Content type identifier, always "input_image"
1428
1598
  */
1429
- type: 'file_search_call';
1599
+ type: 'input_image';
1430
1600
  /**
1431
- * (Optional) Search results returned by the file search operation
1601
+ * (Optional) URL of the image content
1432
1602
  */
1433
- results?: Array<{
1434
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1435
- }>;
1603
+ image_url?: string;
1436
1604
  }
1437
- /**
1438
- * Function tool call output message for OpenAI responses.
1439
- */
1440
- interface OpenAIResponseOutputMessageFunctionToolCall {
1605
+ interface UnionMember2 {
1606
+ annotations: Array<UnionMember2.OpenAIResponseAnnotationFileCitation | UnionMember2.OpenAIResponseAnnotationCitation | UnionMember2.OpenAIResponseAnnotationContainerFileCitation | UnionMember2.OpenAIResponseAnnotationFilePath>;
1607
+ text: string;
1608
+ type: 'output_text';
1609
+ }
1610
+ namespace UnionMember2 {
1441
1611
  /**
1442
- * JSON string containing the function arguments
1612
+ * File citation annotation for referencing specific files in response content.
1443
1613
  */
1444
- arguments: string;
1614
+ interface OpenAIResponseAnnotationFileCitation {
1615
+ /**
1616
+ * Unique identifier of the referenced file
1617
+ */
1618
+ file_id: string;
1619
+ /**
1620
+ * Name of the referenced file
1621
+ */
1622
+ filename: string;
1623
+ /**
1624
+ * Position index of the citation within the content
1625
+ */
1626
+ index: number;
1627
+ /**
1628
+ * Annotation type identifier, always "file_citation"
1629
+ */
1630
+ type: 'file_citation';
1631
+ }
1445
1632
  /**
1446
- * Unique identifier for the function call
1633
+ * URL citation annotation for referencing external web resources.
1447
1634
  */
1448
- call_id: string;
1449
- /**
1450
- * Name of the function being called
1451
- */
1452
- name: string;
1453
- /**
1454
- * Tool call type identifier, always "function_call"
1455
- */
1456
- type: 'function_call';
1457
- /**
1458
- * (Optional) Additional identifier for the tool call
1459
- */
1460
- id?: string;
1461
- /**
1462
- * (Optional) Current status of the function call execution
1463
- */
1464
- status?: string;
1465
- }
1466
- /**
1467
- * This represents the output of a function call that gets passed back to the
1468
- * model.
1469
- */
1470
- interface OpenAIResponseInputFunctionToolCallOutput {
1471
- call_id: string;
1472
- output: string;
1473
- type: 'function_call_output';
1474
- id?: string;
1475
- status?: string;
1476
- }
1477
- /**
1478
- * Corresponds to the various Message types in the Responses API. They are all
1479
- * under one type because the Responses API gives them all the same "type" value,
1480
- * and there is no way to tell them apart in certain scenarios.
1481
- */
1482
- interface OpenAIResponseMessage {
1483
- content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage> | Array<OpenAIResponseMessage.UnionMember2>;
1484
- role: 'system' | 'developer' | 'user' | 'assistant';
1485
- type: 'message';
1486
- id?: string;
1487
- status?: string;
1488
- }
1489
- namespace OpenAIResponseMessage {
1490
- /**
1491
- * Text content for input messages in OpenAI response format.
1492
- */
1493
- interface OpenAIResponseInputMessageContentText {
1635
+ interface OpenAIResponseAnnotationCitation {
1494
1636
  /**
1495
- * The text content of the input message
1637
+ * End position of the citation span in the content
1496
1638
  */
1497
- text: string;
1639
+ end_index: number;
1498
1640
  /**
1499
- * Content type identifier, always "input_text"
1641
+ * Start position of the citation span in the content
1500
1642
  */
1501
- type: 'input_text';
1502
- }
1503
- /**
1504
- * Image content for input messages in OpenAI response format.
1505
- */
1506
- interface OpenAIResponseInputMessageContentImage {
1643
+ start_index: number;
1507
1644
  /**
1508
- * Level of detail for image processing, can be "low", "high", or "auto"
1645
+ * Title of the referenced web resource
1509
1646
  */
1510
- detail: 'low' | 'high' | 'auto';
1647
+ title: string;
1511
1648
  /**
1512
- * Content type identifier, always "input_image"
1649
+ * Annotation type identifier, always "url_citation"
1513
1650
  */
1514
- type: 'input_image';
1651
+ type: 'url_citation';
1515
1652
  /**
1516
- * (Optional) URL of the image content
1653
+ * URL of the referenced web resource
1517
1654
  */
1518
- image_url?: string;
1655
+ url: string;
1519
1656
  }
1520
- interface UnionMember2 {
1521
- annotations: Array<UnionMember2.OpenAIResponseAnnotationFileCitation | UnionMember2.OpenAIResponseAnnotationCitation | UnionMember2.OpenAIResponseAnnotationContainerFileCitation | UnionMember2.OpenAIResponseAnnotationFilePath>;
1522
- text: string;
1523
- type: 'output_text';
1657
+ interface OpenAIResponseAnnotationContainerFileCitation {
1658
+ container_id: string;
1659
+ end_index: number;
1660
+ file_id: string;
1661
+ filename: string;
1662
+ start_index: number;
1663
+ type: 'container_file_citation';
1524
1664
  }
1525
- namespace UnionMember2 {
1526
- /**
1527
- * File citation annotation for referencing specific files in response content.
1528
- */
1529
- interface OpenAIResponseAnnotationFileCitation {
1530
- /**
1531
- * Unique identifier of the referenced file
1532
- */
1533
- file_id: string;
1534
- /**
1535
- * Name of the referenced file
1536
- */
1537
- filename: string;
1538
- /**
1539
- * Position index of the citation within the content
1540
- */
1541
- index: number;
1542
- /**
1543
- * Annotation type identifier, always "file_citation"
1544
- */
1545
- type: 'file_citation';
1546
- }
1547
- /**
1548
- * URL citation annotation for referencing external web resources.
1549
- */
1550
- interface OpenAIResponseAnnotationCitation {
1551
- /**
1552
- * End position of the citation span in the content
1553
- */
1554
- end_index: number;
1555
- /**
1556
- * Start position of the citation span in the content
1557
- */
1558
- start_index: number;
1559
- /**
1560
- * Title of the referenced web resource
1561
- */
1562
- title: string;
1563
- /**
1564
- * Annotation type identifier, always "url_citation"
1565
- */
1566
- type: 'url_citation';
1567
- /**
1568
- * URL of the referenced web resource
1569
- */
1570
- url: string;
1571
- }
1572
- interface OpenAIResponseAnnotationContainerFileCitation {
1573
- container_id: string;
1574
- end_index: number;
1575
- file_id: string;
1576
- filename: string;
1577
- start_index: number;
1578
- type: 'container_file_citation';
1579
- }
1580
- interface OpenAIResponseAnnotationFilePath {
1581
- file_id: string;
1582
- index: number;
1583
- type: 'file_path';
1584
- }
1665
+ interface OpenAIResponseAnnotationFilePath {
1666
+ file_id: string;
1667
+ index: number;
1668
+ type: 'file_path';
1585
1669
  }
1586
1670
  }
1671
+ }
1672
+ /**
1673
+ * Corresponds to the various Message types in the Responses API. They are all
1674
+ * under one type because the Responses API gives them all the same "type" value,
1675
+ * and there is no way to tell them apart in certain scenarios.
1676
+ */
1677
+ interface OpenAIResponseMessage {
1678
+ content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage> | Array<OpenAIResponseMessage.UnionMember2>;
1679
+ role: 'system' | 'developer' | 'user' | 'assistant';
1680
+ type: 'message';
1681
+ id?: string;
1682
+ status?: string;
1683
+ }
1684
+ namespace OpenAIResponseMessage {
1587
1685
  /**
1588
- * Corresponds to the various Message types in the Responses API. They are all
1589
- * under one type because the Responses API gives them all the same "type" value,
1590
- * and there is no way to tell them apart in certain scenarios.
1686
+ * Text content for input messages in OpenAI response format.
1591
1687
  */
1592
- interface OpenAIResponseMessage {
1593
- content: string | Array<OpenAIResponseMessage.OpenAIResponseInputMessageContentText | OpenAIResponseMessage.OpenAIResponseInputMessageContentImage> | Array<OpenAIResponseMessage.UnionMember2>;
1594
- role: 'system' | 'developer' | 'user' | 'assistant';
1595
- type: 'message';
1596
- id?: string;
1597
- status?: string;
1688
+ interface OpenAIResponseInputMessageContentText {
1689
+ /**
1690
+ * The text content of the input message
1691
+ */
1692
+ text: string;
1693
+ /**
1694
+ * Content type identifier, always "input_text"
1695
+ */
1696
+ type: 'input_text';
1598
1697
  }
1599
- namespace OpenAIResponseMessage {
1698
+ /**
1699
+ * Image content for input messages in OpenAI response format.
1700
+ */
1701
+ interface OpenAIResponseInputMessageContentImage {
1600
1702
  /**
1601
- * Text content for input messages in OpenAI response format.
1703
+ * Level of detail for image processing, can be "low", "high", or "auto"
1602
1704
  */
1603
- interface OpenAIResponseInputMessageContentText {
1705
+ detail: 'low' | 'high' | 'auto';
1706
+ /**
1707
+ * Content type identifier, always "input_image"
1708
+ */
1709
+ type: 'input_image';
1710
+ /**
1711
+ * (Optional) URL of the image content
1712
+ */
1713
+ image_url?: string;
1714
+ }
1715
+ interface UnionMember2 {
1716
+ annotations: Array<UnionMember2.OpenAIResponseAnnotationFileCitation | UnionMember2.OpenAIResponseAnnotationCitation | UnionMember2.OpenAIResponseAnnotationContainerFileCitation | UnionMember2.OpenAIResponseAnnotationFilePath>;
1717
+ text: string;
1718
+ type: 'output_text';
1719
+ }
1720
+ namespace UnionMember2 {
1721
+ /**
1722
+ * File citation annotation for referencing specific files in response content.
1723
+ */
1724
+ interface OpenAIResponseAnnotationFileCitation {
1604
1725
  /**
1605
- * The text content of the input message
1726
+ * Unique identifier of the referenced file
1606
1727
  */
1607
- text: string;
1728
+ file_id: string;
1608
1729
  /**
1609
- * Content type identifier, always "input_text"
1730
+ * Name of the referenced file
1610
1731
  */
1611
- type: 'input_text';
1732
+ filename: string;
1733
+ /**
1734
+ * Position index of the citation within the content
1735
+ */
1736
+ index: number;
1737
+ /**
1738
+ * Annotation type identifier, always "file_citation"
1739
+ */
1740
+ type: 'file_citation';
1612
1741
  }
1613
1742
  /**
1614
- * Image content for input messages in OpenAI response format.
1743
+ * URL citation annotation for referencing external web resources.
1615
1744
  */
1616
- interface OpenAIResponseInputMessageContentImage {
1745
+ interface OpenAIResponseAnnotationCitation {
1617
1746
  /**
1618
- * Level of detail for image processing, can be "low", "high", or "auto"
1747
+ * End position of the citation span in the content
1619
1748
  */
1620
- detail: 'low' | 'high' | 'auto';
1749
+ end_index: number;
1621
1750
  /**
1622
- * Content type identifier, always "input_image"
1751
+ * Start position of the citation span in the content
1623
1752
  */
1624
- type: 'input_image';
1753
+ start_index: number;
1625
1754
  /**
1626
- * (Optional) URL of the image content
1755
+ * Title of the referenced web resource
1627
1756
  */
1628
- image_url?: string;
1629
- }
1630
- interface UnionMember2 {
1631
- annotations: Array<UnionMember2.OpenAIResponseAnnotationFileCitation | UnionMember2.OpenAIResponseAnnotationCitation | UnionMember2.OpenAIResponseAnnotationContainerFileCitation | UnionMember2.OpenAIResponseAnnotationFilePath>;
1632
- text: string;
1633
- type: 'output_text';
1634
- }
1635
- namespace UnionMember2 {
1757
+ title: string;
1636
1758
  /**
1637
- * File citation annotation for referencing specific files in response content.
1759
+ * Annotation type identifier, always "url_citation"
1638
1760
  */
1639
- interface OpenAIResponseAnnotationFileCitation {
1640
- /**
1641
- * Unique identifier of the referenced file
1642
- */
1643
- file_id: string;
1644
- /**
1645
- * Name of the referenced file
1646
- */
1647
- filename: string;
1648
- /**
1649
- * Position index of the citation within the content
1650
- */
1651
- index: number;
1652
- /**
1653
- * Annotation type identifier, always "file_citation"
1654
- */
1655
- type: 'file_citation';
1656
- }
1761
+ type: 'url_citation';
1657
1762
  /**
1658
- * URL citation annotation for referencing external web resources.
1763
+ * URL of the referenced web resource
1659
1764
  */
1660
- interface OpenAIResponseAnnotationCitation {
1661
- /**
1662
- * End position of the citation span in the content
1663
- */
1664
- end_index: number;
1665
- /**
1666
- * Start position of the citation span in the content
1667
- */
1668
- start_index: number;
1669
- /**
1670
- * Title of the referenced web resource
1671
- */
1672
- title: string;
1673
- /**
1674
- * Annotation type identifier, always "url_citation"
1675
- */
1676
- type: 'url_citation';
1677
- /**
1678
- * URL of the referenced web resource
1679
- */
1680
- url: string;
1681
- }
1682
- interface OpenAIResponseAnnotationContainerFileCitation {
1683
- container_id: string;
1684
- end_index: number;
1685
- file_id: string;
1686
- filename: string;
1687
- start_index: number;
1688
- type: 'container_file_citation';
1689
- }
1690
- interface OpenAIResponseAnnotationFilePath {
1691
- file_id: string;
1692
- index: number;
1693
- type: 'file_path';
1694
- }
1765
+ url: string;
1766
+ }
1767
+ interface OpenAIResponseAnnotationContainerFileCitation {
1768
+ container_id: string;
1769
+ end_index: number;
1770
+ file_id: string;
1771
+ filename: string;
1772
+ start_index: number;
1773
+ type: 'container_file_citation';
1774
+ }
1775
+ interface OpenAIResponseAnnotationFilePath {
1776
+ file_id: string;
1777
+ index: number;
1778
+ type: 'file_path';
1695
1779
  }
1696
1780
  }
1781
+ }
1782
+ /**
1783
+ * Web search tool call output message for OpenAI responses.
1784
+ */
1785
+ interface OpenAIResponseOutputMessageWebSearchToolCall {
1697
1786
  /**
1698
- * Web search tool call output message for OpenAI responses.
1787
+ * Unique identifier for this tool call
1699
1788
  */
1700
- interface OpenAIResponseOutputMessageWebSearchToolCall {
1701
- /**
1702
- * Unique identifier for this tool call
1703
- */
1704
- id: string;
1705
- /**
1706
- * Current status of the web search operation
1707
- */
1708
- status: string;
1709
- /**
1710
- * Tool call type identifier, always "web_search_call"
1711
- */
1712
- type: 'web_search_call';
1713
- }
1789
+ id: string;
1714
1790
  /**
1715
- * File search tool call output message for OpenAI responses.
1791
+ * Current status of the web search operation
1716
1792
  */
1717
- interface OpenAIResponseOutputMessageFileSearchToolCall {
1718
- /**
1719
- * Unique identifier for this tool call
1720
- */
1721
- id: string;
1722
- /**
1723
- * List of search queries executed
1724
- */
1725
- queries: Array<string>;
1726
- /**
1727
- * Current status of the file search operation
1728
- */
1729
- status: string;
1730
- /**
1731
- * Tool call type identifier, always "file_search_call"
1732
- */
1733
- type: 'file_search_call';
1734
- /**
1735
- * (Optional) Search results returned by the file search operation
1736
- */
1737
- results?: Array<{
1738
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1739
- }>;
1740
- }
1793
+ status: string;
1794
+ /**
1795
+ * Tool call type identifier, always "web_search_call"
1796
+ */
1797
+ type: 'web_search_call';
1798
+ }
1799
+ /**
1800
+ * File search tool call output message for OpenAI responses.
1801
+ */
1802
+ interface OpenAIResponseOutputMessageFileSearchToolCall {
1803
+ /**
1804
+ * Unique identifier for this tool call
1805
+ */
1806
+ id: string;
1807
+ /**
1808
+ * List of search queries executed
1809
+ */
1810
+ queries: Array<string>;
1811
+ /**
1812
+ * Current status of the file search operation
1813
+ */
1814
+ status: string;
1815
+ /**
1816
+ * Tool call type identifier, always "file_search_call"
1817
+ */
1818
+ type: 'file_search_call';
1741
1819
  /**
1742
- * Function tool call output message for OpenAI responses.
1820
+ * (Optional) Search results returned by the file search operation
1743
1821
  */
1744
- interface OpenAIResponseOutputMessageFunctionToolCall {
1745
- /**
1746
- * JSON string containing the function arguments
1747
- */
1748
- arguments: string;
1822
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
1823
+ }
1824
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
1825
+ /**
1826
+ * Search results returned by the file search operation.
1827
+ */
1828
+ interface Result {
1749
1829
  /**
1750
- * Unique identifier for the function call
1830
+ * (Optional) Key-value attributes associated with the file
1751
1831
  */
1752
- call_id: string;
1832
+ attributes: {
1833
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1834
+ };
1753
1835
  /**
1754
- * Name of the function being called
1836
+ * Unique identifier of the file containing the result
1755
1837
  */
1756
- name: string;
1838
+ file_id: string;
1757
1839
  /**
1758
- * Tool call type identifier, always "function_call"
1840
+ * Name of the file containing the result
1759
1841
  */
1760
- type: 'function_call';
1842
+ filename: string;
1761
1843
  /**
1762
- * (Optional) Additional identifier for the tool call
1844
+ * Relevance score for this search result (between 0 and 1)
1763
1845
  */
1764
- id?: string;
1846
+ score: number;
1765
1847
  /**
1766
- * (Optional) Current status of the function call execution
1848
+ * Text content of the search result
1767
1849
  */
1768
- status?: string;
1850
+ text: string;
1769
1851
  }
1852
+ }
1853
+ /**
1854
+ * Function tool call output message for OpenAI responses.
1855
+ */
1856
+ interface OpenAIResponseOutputMessageFunctionToolCall {
1770
1857
  /**
1771
- * Model Context Protocol (MCP) call output message for OpenAI responses.
1858
+ * JSON string containing the function arguments
1772
1859
  */
1773
- interface OpenAIResponseOutputMessageMcpCall {
1774
- /**
1775
- * Unique identifier for this MCP call
1776
- */
1777
- id: string;
1860
+ arguments: string;
1861
+ /**
1862
+ * Unique identifier for the function call
1863
+ */
1864
+ call_id: string;
1865
+ /**
1866
+ * Name of the function being called
1867
+ */
1868
+ name: string;
1869
+ /**
1870
+ * Tool call type identifier, always "function_call"
1871
+ */
1872
+ type: 'function_call';
1873
+ /**
1874
+ * (Optional) Additional identifier for the tool call
1875
+ */
1876
+ id?: string;
1877
+ /**
1878
+ * (Optional) Current status of the function call execution
1879
+ */
1880
+ status?: string;
1881
+ }
1882
+ /**
1883
+ * Model Context Protocol (MCP) call output message for OpenAI responses.
1884
+ */
1885
+ interface OpenAIResponseOutputMessageMcpCall {
1886
+ /**
1887
+ * Unique identifier for this MCP call
1888
+ */
1889
+ id: string;
1890
+ /**
1891
+ * JSON string containing the MCP call arguments
1892
+ */
1893
+ arguments: string;
1894
+ /**
1895
+ * Name of the MCP method being called
1896
+ */
1897
+ name: string;
1898
+ /**
1899
+ * Label identifying the MCP server handling the call
1900
+ */
1901
+ server_label: string;
1902
+ /**
1903
+ * Tool call type identifier, always "mcp_call"
1904
+ */
1905
+ type: 'mcp_call';
1906
+ /**
1907
+ * (Optional) Error message if the MCP call failed
1908
+ */
1909
+ error?: string;
1910
+ /**
1911
+ * (Optional) Output result from the successful MCP call
1912
+ */
1913
+ output?: string;
1914
+ }
1915
+ /**
1916
+ * MCP list tools output message containing available tools from an MCP server.
1917
+ */
1918
+ interface OpenAIResponseOutputMessageMcpListTools {
1919
+ /**
1920
+ * Unique identifier for this MCP list tools operation
1921
+ */
1922
+ id: string;
1923
+ /**
1924
+ * Label identifying the MCP server providing the tools
1925
+ */
1926
+ server_label: string;
1927
+ /**
1928
+ * List of available tools provided by the MCP server
1929
+ */
1930
+ tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1931
+ /**
1932
+ * Tool call type identifier, always "mcp_list_tools"
1933
+ */
1934
+ type: 'mcp_list_tools';
1935
+ }
1936
+ namespace OpenAIResponseOutputMessageMcpListTools {
1937
+ /**
1938
+ * Tool definition returned by MCP list tools operation.
1939
+ */
1940
+ interface Tool {
1778
1941
  /**
1779
- * JSON string containing the MCP call arguments
1942
+ * JSON schema defining the tool's input parameters
1780
1943
  */
1781
- arguments: string;
1944
+ input_schema: {
1945
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1946
+ };
1782
1947
  /**
1783
- * Name of the MCP method being called
1948
+ * Name of the tool
1784
1949
  */
1785
1950
  name: string;
1786
1951
  /**
1787
- * Label identifying the MCP server handling the call
1788
- */
1789
- server_label: string;
1790
- /**
1791
- * Tool call type identifier, always "mcp_call"
1792
- */
1793
- type: 'mcp_call';
1794
- /**
1795
- * (Optional) Error message if the MCP call failed
1796
- */
1797
- error?: string;
1798
- /**
1799
- * (Optional) Output result from the successful MCP call
1952
+ * (Optional) Description of what the tool does
1800
1953
  */
1801
- output?: string;
1954
+ description?: string;
1802
1955
  }
1956
+ }
1957
+ /**
1958
+ * Text formatting configuration for the response
1959
+ */
1960
+ interface Text {
1803
1961
  /**
1804
- * MCP list tools output message containing available tools from an MCP server.
1962
+ * (Optional) Text format configuration specifying output format requirements
1805
1963
  */
1806
- interface OpenAIResponseOutputMessageMcpListTools {
1964
+ format?: Text.Format;
1965
+ }
1966
+ namespace Text {
1967
+ /**
1968
+ * (Optional) Text format configuration specifying output format requirements
1969
+ */
1970
+ interface Format {
1807
1971
  /**
1808
- * Unique identifier for this MCP list tools operation
1972
+ * Must be "text", "json_schema", or "json_object" to identify the format type
1809
1973
  */
1810
- id: string;
1974
+ type: 'text' | 'json_schema' | 'json_object';
1811
1975
  /**
1812
- * Label identifying the MCP server providing the tools
1976
+ * (Optional) A description of the response format. Only used for json_schema.
1813
1977
  */
1814
- server_label: string;
1978
+ description?: string;
1815
1979
  /**
1816
- * List of available tools provided by the MCP server
1980
+ * The name of the response format. Only used for json_schema.
1817
1981
  */
1818
- tools: Array<OpenAIResponseOutputMessageMcpListTools.Tool>;
1982
+ name?: string;
1819
1983
  /**
1820
- * Tool call type identifier, always "mcp_list_tools"
1984
+ * The JSON schema the response should conform to. In a Python SDK, this is often a
1985
+ * `pydantic` model. Only used for json_schema.
1821
1986
  */
1822
- type: 'mcp_list_tools';
1823
- }
1824
- namespace OpenAIResponseOutputMessageMcpListTools {
1987
+ schema?: {
1988
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1989
+ };
1825
1990
  /**
1826
- * Tool definition returned by MCP list tools operation.
1991
+ * (Optional) Whether to strictly enforce the JSON schema. If true, the response
1992
+ * must match the schema exactly. Only used for json_schema.
1827
1993
  */
1828
- interface Tool {
1829
- /**
1830
- * JSON schema defining the tool's input parameters
1831
- */
1832
- input_schema: {
1833
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1834
- };
1835
- /**
1836
- * Name of the tool
1837
- */
1838
- name: string;
1839
- /**
1840
- * (Optional) Description of what the tool does
1841
- */
1842
- description?: string;
1843
- }
1994
+ strict?: boolean;
1844
1995
  }
1996
+ }
1997
+ /**
1998
+ * (Optional) Error details if the response generation failed
1999
+ */
2000
+ interface Error {
1845
2001
  /**
1846
- * Text formatting configuration for the response
2002
+ * Error code identifying the type of failure
1847
2003
  */
1848
- interface Text {
1849
- /**
1850
- * (Optional) Text format configuration specifying output format requirements
1851
- */
1852
- format?: Text.Format;
1853
- }
1854
- namespace Text {
1855
- /**
1856
- * (Optional) Text format configuration specifying output format requirements
1857
- */
1858
- interface Format {
1859
- /**
1860
- * Must be "text", "json_schema", or "json_object" to identify the format type
1861
- */
1862
- type: 'text' | 'json_schema' | 'json_object';
1863
- /**
1864
- * (Optional) A description of the response format. Only used for json_schema.
1865
- */
1866
- description?: string;
1867
- /**
1868
- * The name of the response format. Only used for json_schema.
1869
- */
1870
- name?: string;
1871
- /**
1872
- * The JSON schema the response should conform to. In a Python SDK, this is often a
1873
- * `pydantic` model. Only used for json_schema.
1874
- */
1875
- schema?: {
1876
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1877
- };
1878
- /**
1879
- * (Optional) Whether to strictly enforce the JSON schema. If true, the response
1880
- * must match the schema exactly. Only used for json_schema.
1881
- */
1882
- strict?: boolean;
1883
- }
1884
- }
2004
+ code: string;
1885
2005
  /**
1886
- * (Optional) Error details if the response generation failed
2006
+ * Human-readable error message describing the failure
1887
2007
  */
1888
- interface Error {
1889
- /**
1890
- * Error code identifying the type of failure
1891
- */
1892
- code: string;
1893
- /**
1894
- * Human-readable error message describing the failure
1895
- */
1896
- message: string;
1897
- }
2008
+ message: string;
1898
2009
  }
1899
2010
  }
1900
2011
  export type ResponseCreateParams = ResponseCreateParamsNonStreaming | ResponseCreateParamsStreaming;
@@ -1907,6 +2018,10 @@ export interface ResponseCreateParamsBase {
1907
2018
  * The underlying LLM used for completions.
1908
2019
  */
1909
2020
  model: string;
2021
+ /**
2022
+ * (Optional) Additional fields to include in the response.
2023
+ */
2024
+ include?: Array<string>;
1910
2025
  instructions?: string;
1911
2026
  max_infer_iters?: number;
1912
2027
  /**
@@ -1965,9 +2080,36 @@ export declare namespace ResponseCreateParams {
1965
2080
  /**
1966
2081
  * (Optional) Search results returned by the file search operation
1967
2082
  */
1968
- results?: Array<{
1969
- [key: string]: boolean | number | string | Array<unknown> | unknown | null;
1970
- }>;
2083
+ results?: Array<OpenAIResponseOutputMessageFileSearchToolCall.Result>;
2084
+ }
2085
+ namespace OpenAIResponseOutputMessageFileSearchToolCall {
2086
+ /**
2087
+ * Search results returned by the file search operation.
2088
+ */
2089
+ interface Result {
2090
+ /**
2091
+ * (Optional) Key-value attributes associated with the file
2092
+ */
2093
+ attributes: {
2094
+ [key: string]: boolean | number | string | Array<unknown> | unknown | null;
2095
+ };
2096
+ /**
2097
+ * Unique identifier of the file containing the result
2098
+ */
2099
+ file_id: string;
2100
+ /**
2101
+ * Name of the file containing the result
2102
+ */
2103
+ filename: string;
2104
+ /**
2105
+ * Relevance score for this search result (between 0 and 1)
2106
+ */
2107
+ score: number;
2108
+ /**
2109
+ * Text content of the search result
2110
+ */
2111
+ text: string;
2112
+ }
1971
2113
  }
1972
2114
  /**
1973
2115
  * Function tool call output message for OpenAI responses.
@@ -2305,15 +2447,7 @@ export interface ResponseCreateParamsNonStreaming extends ResponseCreateParamsBa
2305
2447
  export interface ResponseCreateParamsStreaming extends ResponseCreateParamsBase {
2306
2448
  stream: true;
2307
2449
  }
2308
- export interface ResponseListParams {
2309
- /**
2310
- * The ID of the last response to return.
2311
- */
2312
- after?: string;
2313
- /**
2314
- * The number of responses to return.
2315
- */
2316
- limit?: number;
2450
+ export interface ResponseListParams extends OpenAICursorPageParams {
2317
2451
  /**
2318
2452
  * The model to filter responses by.
2319
2453
  */
@@ -2324,7 +2458,7 @@ export interface ResponseListParams {
2324
2458
  order?: 'asc' | 'desc';
2325
2459
  }
2326
2460
  export declare namespace Responses {
2327
- export { type ResponseObject as ResponseObject, type ResponseObjectStream as ResponseObjectStream, type ResponseListResponse as ResponseListResponse, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseListParams as ResponseListParams, };
2461
+ export { type ResponseObject as ResponseObject, type ResponseObjectStream as ResponseObjectStream, type ResponseListResponse as ResponseListResponse, ResponseListResponsesOpenAICursorPage as ResponseListResponsesOpenAICursorPage, type ResponseCreateParams as ResponseCreateParams, type ResponseCreateParamsNonStreaming as ResponseCreateParamsNonStreaming, type ResponseCreateParamsStreaming as ResponseCreateParamsStreaming, type ResponseListParams as ResponseListParams, };
2328
2462
  export { InputItems as InputItems, type InputItemListResponse as InputItemListResponse, type InputItemListParams as InputItemListParams, };
2329
2463
  }
2330
2464
  //# sourceMappingURL=responses.d.ts.map