openai 7.1.0 → 7.3.0

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 (63) hide show
  1. package/CHANGELOG.md +28 -1
  2. package/README.md +5 -10
  3. package/client.d.mts +3 -0
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +3 -0
  6. package/client.d.ts.map +1 -1
  7. package/client.js +3 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +3 -0
  10. package/client.mjs.map +1 -1
  11. package/internal/uploads.d.mts.map +1 -1
  12. package/internal/uploads.d.ts.map +1 -1
  13. package/internal/uploads.js +9 -3
  14. package/internal/uploads.js.map +1 -1
  15. package/internal/uploads.mjs +9 -3
  16. package/internal/uploads.mjs.map +1 -1
  17. package/package.json +4 -1
  18. package/resources/beta/responses/responses.d.mts +41 -15
  19. package/resources/beta/responses/responses.d.mts.map +1 -1
  20. package/resources/beta/responses/responses.d.ts +41 -15
  21. package/resources/beta/responses/responses.d.ts.map +1 -1
  22. package/resources/beta/responses/responses.js.map +1 -1
  23. package/resources/beta/responses/responses.mjs.map +1 -1
  24. package/resources/chat/completions/completions.d.mts +24 -12
  25. package/resources/chat/completions/completions.d.mts.map +1 -1
  26. package/resources/chat/completions/completions.d.ts +24 -12
  27. package/resources/chat/completions/completions.d.ts.map +1 -1
  28. package/resources/chat/completions/completions.js.map +1 -1
  29. package/resources/chat/completions/completions.mjs.map +1 -1
  30. package/resources/content-provenance-checks.d.mts +103 -0
  31. package/resources/content-provenance-checks.d.mts.map +1 -0
  32. package/resources/content-provenance-checks.d.ts +103 -0
  33. package/resources/content-provenance-checks.d.ts.map +1 -0
  34. package/resources/content-provenance-checks.js +24 -0
  35. package/resources/content-provenance-checks.js.map +1 -0
  36. package/resources/content-provenance-checks.mjs +20 -0
  37. package/resources/content-provenance-checks.mjs.map +1 -0
  38. package/resources/index.d.mts +1 -0
  39. package/resources/index.d.mts.map +1 -1
  40. package/resources/index.d.ts +1 -0
  41. package/resources/index.d.ts.map +1 -1
  42. package/resources/index.js +3 -1
  43. package/resources/index.js.map +1 -1
  44. package/resources/index.mjs +1 -0
  45. package/resources/index.mjs.map +1 -1
  46. package/resources/responses/responses.d.mts +41 -15
  47. package/resources/responses/responses.d.mts.map +1 -1
  48. package/resources/responses/responses.d.ts +41 -15
  49. package/resources/responses/responses.d.ts.map +1 -1
  50. package/resources/responses/responses.js.map +1 -1
  51. package/resources/responses/responses.mjs.map +1 -1
  52. package/src/client.ts +13 -0
  53. package/src/internal/uploads.ts +8 -4
  54. package/src/resources/beta/responses/responses.ts +41 -15
  55. package/src/resources/chat/completions/completions.ts +24 -12
  56. package/src/resources/content-provenance-checks.ts +132 -0
  57. package/src/resources/index.ts +5 -0
  58. package/src/resources/responses/responses.ts +41 -15
  59. package/src/version.ts +1 -1
  60. package/version.d.mts +1 -1
  61. package/version.d.ts +1 -1
  62. package/version.js +1 -1
  63. package/version.mjs +1 -1
@@ -1025,9 +1025,13 @@ export interface BetaResponse {
1025
1025
  * will use 'default'.
1026
1026
  * - If set to 'default', then the request will be processed with the standard
1027
1027
  * pricing and performance for the selected model.
1028
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
1029
- * '[priority](https://openai.com/api-priority-processing/)', then the request
1030
- * will be processed with the corresponding service tier.
1028
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
1029
+ * then the request will be processed with the Flex Processing service tier.
1030
+ * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
1031
+ * include the `service_tier=fast` or `service_tier=priority` parameter for
1032
+ * Responses or Chat Completions. The response will show `service_tier=priority`
1033
+ * regardless of if you specify `service_tier=fast` or `priority` in your
1034
+ * request.
1031
1035
  * - When not set, the default behavior is 'auto'.
1032
1036
  *
1033
1037
  * When the `service_tier` parameter is set, the response body will include the
@@ -1035,7 +1039,7 @@ export interface BetaResponse {
1035
1039
  * request. This response value may be different from the value set in the
1036
1040
  * parameter.
1037
1041
  */
1038
- service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
1042
+ service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
1039
1043
  /**
1040
1044
  * The status of the response generation. One of `completed`, `failed`,
1041
1045
  * `in_progress`, `cancelled`, `queued`, or `incomplete`.
@@ -8478,9 +8482,13 @@ export declare namespace BetaResponsesClientEvent {
8478
8482
  * will use 'default'.
8479
8483
  * - If set to 'default', then the request will be processed with the standard
8480
8484
  * pricing and performance for the selected model.
8481
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
8482
- * '[priority](https://openai.com/api-priority-processing/)', then the request
8483
- * will be processed with the corresponding service tier.
8485
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
8486
+ * then the request will be processed with the Flex Processing service tier.
8487
+ * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
8488
+ * include the `service_tier=fast` or `service_tier=priority` parameter for
8489
+ * Responses or Chat Completions. The response will show `service_tier=priority`
8490
+ * regardless of if you specify `service_tier=fast` or `priority` in your
8491
+ * request.
8484
8492
  * - When not set, the default behavior is 'auto'.
8485
8493
  *
8486
8494
  * When the `service_tier` parameter is set, the response body will include the
@@ -8488,7 +8496,7 @@ export declare namespace BetaResponsesClientEvent {
8488
8496
  * request. This response value may be different from the value set in the
8489
8497
  * parameter.
8490
8498
  */
8491
- service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
8499
+ service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
8492
8500
  /**
8493
8501
  * Whether to store the generated model response for later retrieval via API.
8494
8502
  */
@@ -9519,9 +9527,13 @@ export interface ResponseCreateParamsBase {
9519
9527
  * will use 'default'.
9520
9528
  * - If set to 'default', then the request will be processed with the standard
9521
9529
  * pricing and performance for the selected model.
9522
- * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)' or
9523
- * '[priority](https://openai.com/api-priority-processing/)', then the request
9524
- * will be processed with the corresponding service tier.
9530
+ * - If set to '[flex](https://platform.openai.com/docs/guides/flex-processing)',
9531
+ * then the request will be processed with the Flex Processing service tier.
9532
+ * - To opt-in to [Fast mode](/api/docs/guides/fast-mode) at the request level,
9533
+ * include the `service_tier=fast` or `service_tier=priority` parameter for
9534
+ * Responses or Chat Completions. The response will show `service_tier=priority`
9535
+ * regardless of if you specify `service_tier=fast` or `priority` in your
9536
+ * request.
9525
9537
  * - When not set, the default behavior is 'auto'.
9526
9538
  *
9527
9539
  * When the `service_tier` parameter is set, the response body will include the
@@ -9529,7 +9541,7 @@ export interface ResponseCreateParamsBase {
9529
9541
  * request. This response value may be different from the value set in the
9530
9542
  * parameter.
9531
9543
  */
9532
- service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | null;
9544
+ service_tier?: 'auto' | 'default' | 'flex' | 'scale' | 'priority' | 'fast' | null;
9533
9545
  /**
9534
9546
  * Body param: Whether to store the generated model response for later retrieval
9535
9547
  * via API.
@@ -9950,9 +9962,23 @@ export interface ResponseCompactParams {
9950
9962
  */
9951
9963
  prompt_cache_retention?: 'in_memory' | '24h' | null;
9952
9964
  /**
9953
- * Body param: The service tier to use for this request.
9954
- */
9955
- service_tier?: 'auto' | 'default' | 'flex' | 'priority' | null;
9965
+ * Body param: Specifies the processing type used for serving the request. - If set
9966
+ * to 'auto', then the request will be processed with the service tier configured
9967
+ * in the Project settings. Unless otherwise configured, the Project will use
9968
+ * 'default'. - If set to 'default', then the request will be processed with the
9969
+ * standard pricing and performance for the selected model. - If set to
9970
+ * '[flex](https://platform.openai.com/docs/guides/flex-processing)', then the
9971
+ * request will be processed with the Flex Processing service tier. - To opt-in to
9972
+ * [Fast mode](/api/docs/guides/fast-mode) at the request level, include the
9973
+ * `service_tier=fast` or `service_tier=priority` parameter for Responses or Chat
9974
+ * Completions. The response will show `service_tier=priority` regardless of if you
9975
+ * specify `service_tier=fast` or `priority` in your request. - When not set, the
9976
+ * default behavior is 'auto'. When the `service_tier` parameter is set, the
9977
+ * response body will include the `service_tier` value based on the processing mode
9978
+ * actually used to serve the request. This response value may be different from
9979
+ * the value set in the parameter.
9980
+ */
9981
+ service_tier?: 'auto' | 'default' | 'fast' | 'flex' | 'priority' | null;
9956
9982
  /**
9957
9983
  * Header param: Optional beta features to enable for this request.
9958
9984
  */