@@ -479,6 +479,13 @@ export interface Response {
479
479
*/
480
480
prompt ?: ResponsePrompt | null ;
481
481
482
+ /**
483
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
484
+ * hit rates. Replaces the `user` field.
485
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
486
+ */
487
+ prompt_cache_key ?: string ;
488
+
482
489
/**
483
490
* **o-series models only**
484
491
*
@@ -487,6 +494,15 @@ export interface Response {
487
494
*/
488
495
reasoning ?: Shared . Reasoning | null ;
489
496
497
+ /**
498
+ * A stable identifier used to help detect users of your application that may be
499
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
500
+ * identifies each user. We recommend hashing their username or email address, in
501
+ * order to avoid sending us any identifying information.
502
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
503
+ */
504
+ safety_identifier ?: string ;
505
+
490
506
/**
491
507
* Specifies the latency tier to use for processing the request. This parameter is
492
508
* relevant for customers subscribed to the scale tier service:
@@ -540,9 +556,12 @@ export interface Response {
540
556
usage ?: ResponseUsage ;
541
557
542
558
/**
543
- * A stable identifier for your end-users. Used to boost cache hit rates by better
544
- * bucketing similar requests and to help OpenAI detect and prevent abuse.
545
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
559
+ * @deprecated This field is being replaced by `safety_identifier` and
560
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
561
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
562
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
563
+ * abuse.
564
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
546
565
*/
547
566
user ?: string ;
548
567
}
@@ -4836,6 +4855,13 @@ export interface ResponseCreateParamsBase {
4836
4855
*/
4837
4856
prompt ?: ResponsePrompt | null ;
4838
4857
4858
+ /**
4859
+ * Used by OpenAI to cache responses for similar requests to optimize your cache
4860
+ * hit rates. Replaces the `user` field.
4861
+ * [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
4862
+ */
4863
+ prompt_cache_key ?: string ;
4864
+
4839
4865
/**
4840
4866
* **o-series models only**
4841
4867
*
@@ -4844,6 +4870,15 @@ export interface ResponseCreateParamsBase {
4844
4870
*/
4845
4871
reasoning ?: Shared . Reasoning | null ;
4846
4872
4873
+ /**
4874
+ * A stable identifier used to help detect users of your application that may be
4875
+ * violating OpenAI's usage policies. The IDs should be a string that uniquely
4876
+ * identifies each user. We recommend hashing their username or email address, in
4877
+ * order to avoid sending us any identifying information.
4878
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
4879
+ */
4880
+ safety_identifier ?: string ;
4881
+
4847
4882
/**
4848
4883
* Specifies the latency tier to use for processing the request. This parameter is
4849
4884
* relevant for customers subscribed to the scale tier service:
@@ -4942,9 +4977,12 @@ export interface ResponseCreateParamsBase {
4942
4977
truncation ?: 'auto' | 'disabled' | null ;
4943
4978
4944
4979
/**
4945
- * A stable identifier for your end-users. Used to boost cache hit rates by better
4946
- * bucketing similar requests and to help OpenAI detect and prevent abuse.
4947
- * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
4980
+ * @deprecated This field is being replaced by `safety_identifier` and
4981
+ * `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
4982
+ * optimizations. A stable identifier for your end-users. Used to boost cache hit
4983
+ * rates by better bucketing similar requests and to help OpenAI detect and prevent
4984
+ * abuse.
4985
+ * [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
4948
4986
*/
4949
4987
user ?: string ;
4950
4988
}
0 commit comments