openai 6.42.0 → 6.43.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 (70) hide show
  1. package/CHANGELOG.md +22 -1
  2. package/README.md +1 -1
  3. package/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
  4. package/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
  5. package/lib/AbstractChatCompletionRunner.js +6 -1
  6. package/lib/AbstractChatCompletionRunner.js.map +1 -1
  7. package/lib/AbstractChatCompletionRunner.mjs +6 -1
  8. package/lib/AbstractChatCompletionRunner.mjs.map +1 -1
  9. package/package.json +2 -11
  10. package/resources/admin/organization/admin-api-keys.d.mts +9 -0
  11. package/resources/admin/organization/admin-api-keys.d.mts.map +1 -1
  12. package/resources/admin/organization/admin-api-keys.d.ts +9 -0
  13. package/resources/admin/organization/admin-api-keys.d.ts.map +1 -1
  14. package/resources/admin/organization/audit-logs.d.mts +113 -3
  15. package/resources/admin/organization/audit-logs.d.mts.map +1 -1
  16. package/resources/admin/organization/audit-logs.d.ts +113 -3
  17. package/resources/admin/organization/audit-logs.d.ts.map +1 -1
  18. package/resources/admin/organization/projects/index.d.mts +1 -1
  19. package/resources/admin/organization/projects/index.d.mts.map +1 -1
  20. package/resources/admin/organization/projects/index.d.ts +1 -1
  21. package/resources/admin/organization/projects/index.d.ts.map +1 -1
  22. package/resources/admin/organization/projects/index.js.map +1 -1
  23. package/resources/admin/organization/projects/index.mjs.map +1 -1
  24. package/resources/admin/organization/projects/projects.d.mts +2 -2
  25. package/resources/admin/organization/projects/projects.d.mts.map +1 -1
  26. package/resources/admin/organization/projects/projects.d.ts +2 -2
  27. package/resources/admin/organization/projects/projects.d.ts.map +1 -1
  28. package/resources/admin/organization/projects/projects.js.map +1 -1
  29. package/resources/admin/organization/projects/projects.mjs.map +1 -1
  30. package/resources/admin/organization/projects/spend-alerts.d.mts +20 -1
  31. package/resources/admin/organization/projects/spend-alerts.d.mts.map +1 -1
  32. package/resources/admin/organization/projects/spend-alerts.d.ts +20 -1
  33. package/resources/admin/organization/projects/spend-alerts.d.ts.map +1 -1
  34. package/resources/admin/organization/projects/spend-alerts.js +19 -0
  35. package/resources/admin/organization/projects/spend-alerts.js.map +1 -1
  36. package/resources/admin/organization/projects/spend-alerts.mjs +19 -0
  37. package/resources/admin/organization/projects/spend-alerts.mjs.map +1 -1
  38. package/resources/admin/organization/spend-alerts.d.mts +12 -0
  39. package/resources/admin/organization/spend-alerts.d.mts.map +1 -1
  40. package/resources/admin/organization/spend-alerts.d.ts +12 -0
  41. package/resources/admin/organization/spend-alerts.d.ts.map +1 -1
  42. package/resources/admin/organization/spend-alerts.js +17 -0
  43. package/resources/admin/organization/spend-alerts.js.map +1 -1
  44. package/resources/admin/organization/spend-alerts.mjs +17 -0
  45. package/resources/admin/organization/spend-alerts.mjs.map +1 -1
  46. package/resources/responses/input-tokens.d.mts +6 -5
  47. package/resources/responses/input-tokens.d.mts.map +1 -1
  48. package/resources/responses/input-tokens.d.ts +6 -5
  49. package/resources/responses/input-tokens.d.ts.map +1 -1
  50. package/resources/responses/responses.d.mts +2 -2
  51. package/resources/responses/responses.d.ts +2 -2
  52. package/resources/shared.d.mts +6 -0
  53. package/resources/shared.d.mts.map +1 -1
  54. package/resources/shared.d.ts +6 -0
  55. package/resources/shared.d.ts.map +1 -1
  56. package/src/lib/AbstractChatCompletionRunner.ts +6 -1
  57. package/src/resources/admin/organization/admin-api-keys.ts +11 -0
  58. package/src/resources/admin/organization/audit-logs.ts +148 -1
  59. package/src/resources/admin/organization/projects/index.ts +1 -0
  60. package/src/resources/admin/organization/projects/projects.ts +2 -0
  61. package/src/resources/admin/organization/projects/spend-alerts.ts +32 -0
  62. package/src/resources/admin/organization/spend-alerts.ts +18 -0
  63. package/src/resources/responses/input-tokens.ts +6 -5
  64. package/src/resources/responses/responses.ts +2 -2
  65. package/src/resources/shared.ts +7 -0
  66. package/src/version.ts +1 -1
  67. package/version.d.mts +1 -1
  68. package/version.d.ts +1 -1
  69. package/version.js +1 -1
  70. package/version.mjs +1 -1
@@ -43,6 +43,30 @@ export class SpendAlerts extends APIResource {
43
43
  });
44
44
  }
45
45
 
46
+ /**
47
+ * Retrieves a project spend alert.
48
+ *
49
+ * @example
50
+ * ```ts
51
+ * const projectSpendAlert =
52
+ * await client.admin.organization.projects.spendAlerts.retrieve(
53
+ * 'alert_id',
54
+ * { project_id: 'project_id' },
55
+ * );
56
+ * ```
57
+ */
58
+ retrieve(
59
+ alertID: string,
60
+ params: SpendAlertRetrieveParams,
61
+ options?: RequestOptions,
62
+ ): APIPromise<ProjectSpendAlert> {
63
+ const { project_id } = params;
64
+ return this._client.get(path`/organization/projects/${project_id}/spend_alerts/${alertID}`, {
65
+ ...options,
66
+ __security: { adminAPIKeyAuth: true },
67
+ });
68
+ }
69
+
46
70
  /**
47
71
  * Updates a project spend alert.
48
72
  *
@@ -250,6 +274,13 @@ export namespace SpendAlertCreateParams {
250
274
  }
251
275
  }
252
276
 
277
+ export interface SpendAlertRetrieveParams {
278
+ /**
279
+ * The ID of the project.
280
+ */
281
+ project_id: string;
282
+ }
283
+
253
284
  export interface SpendAlertUpdateParams {
254
285
  /**
255
286
  * Path param: The ID of the project to update.
@@ -325,6 +356,7 @@ export declare namespace SpendAlerts {
325
356
  type ProjectSpendAlertDeleted as ProjectSpendAlertDeleted,
326
357
  type ProjectSpendAlertsPage as ProjectSpendAlertsPage,
327
358
  type SpendAlertCreateParams as SpendAlertCreateParams,
359
+ type SpendAlertRetrieveParams as SpendAlertRetrieveParams,
328
360
  type SpendAlertUpdateParams as SpendAlertUpdateParams,
329
361
  type SpendAlertListParams as SpendAlertListParams,
330
362
  type SpendAlertDeleteParams as SpendAlertDeleteParams,
@@ -36,6 +36,24 @@ export class SpendAlerts extends APIResource {
36
36
  });
37
37
  }
38
38
 
39
+ /**
40
+ * Retrieves an organization spend alert.
41
+ *
42
+ * @example
43
+ * ```ts
44
+ * const organizationSpendAlert =
45
+ * await client.admin.organization.spendAlerts.retrieve(
46
+ * 'alert_id',
47
+ * );
48
+ * ```
49
+ */
50
+ retrieve(alertID: string, options?: RequestOptions): APIPromise<OrganizationSpendAlert> {
51
+ return this._client.get(path`/organization/spend_alerts/${alertID}`, {
52
+ ...options,
53
+ __security: { adminAPIKeyAuth: true },
54
+ });
55
+ }
56
+
39
57
  /**
40
58
  * Updates an organization spend alert.
41
59
  *
@@ -123,11 +123,12 @@ export interface InputTokenCountParams {
123
123
  tools?: Array<ResponsesAPI.Tool> | null;
124
124
 
125
125
  /**
126
- * The truncation strategy to use for the model response. - `auto`: If the input to
127
- * this Response exceeds the model's context window size, the model will truncate
128
- * the response to fit the context window by dropping items from the beginning of
129
- * the conversation. - `disabled` (default): If the input size will exceed the
130
- * context window size for a model, the request will fail with a 400 error.
126
+ * @deprecated The truncation strategy to use for the model response. - `auto`: If
127
+ * the input to this Response exceeds the model's context window size, the model
128
+ * will truncate the response to fit the context window by dropping items from the
129
+ * beginning of the conversation. - `disabled` (default): If the input size will
130
+ * exceed the context window size for a model, the request will fail with a 400
131
+ * error.
131
132
  */
132
133
  truncation?: 'auto' | 'disabled';
133
134
  }
@@ -6954,7 +6954,7 @@ export interface ResponsesClientEvent {
6954
6954
  top_p?: number | null;
6955
6955
 
6956
6956
  /**
6957
- * The truncation strategy to use for the model response.
6957
+ * @deprecated The truncation strategy to use for the model response.
6958
6958
  *
6959
6959
  * - `auto`: If the input to this Response exceeds the model's context window size,
6960
6960
  * the model will truncate the response to fit the context window by dropping
@@ -8024,7 +8024,7 @@ export interface ResponseCreateParamsBase {
8024
8024
  top_p?: number | null;
8025
8025
 
8026
8026
  /**
8027
- * The truncation strategy to use for the model response.
8027
+ * @deprecated The truncation strategy to use for the model response.
8028
8028
  *
8029
8029
  * - `auto`: If the input to this Response exceeds the model's context window size,
8030
8030
  * the model will truncate the response to fit the context window by dropping
@@ -257,6 +257,13 @@ export type OAuthErrorCode = 'invalid_grant' | 'invalid_subject_token' | (string
257
257
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning).
258
258
  */
259
259
  export interface Reasoning {
260
+ /**
261
+ * Controls which reasoning items are rendered back to the model on later turns.
262
+ * When returned on a response, this is the effective reasoning context mode used
263
+ * for the response.
264
+ */
265
+ context?: 'auto' | 'current_turn' | 'all_turns' | null;
266
+
260
267
  /**
261
268
  * Constrains effort on reasoning for
262
269
  * [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '6.42.0'; // x-release-please-version
1
+ export const VERSION = '6.43.0'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.42.0";
1
+ export declare const VERSION = "6.43.0";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "6.42.0";
1
+ export declare const VERSION = "6.43.0";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '6.42.0'; // x-release-please-version
4
+ exports.VERSION = '6.43.0'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '6.42.0'; // x-release-please-version
1
+ export const VERSION = '6.43.0'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map