Skip to content

Commit 3c33025

Browse files
Merge pull request #1599 from openai/release-please--branches--master--changes--next--components--openai
release: 5.11.0
2 parents 6fbcc43 + b61b248 commit 3c33025

File tree

9 files changed

+89
-16
lines changed

9 files changed

+89
-16
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "5.10.3"
2+
".": "5.11.0"
33
}

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 111
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b2a451656ca64d30d174391ebfd94806b4de3ab76dc55b92843cfb7f1a54ecb6.yml
3-
openapi_spec_hash: 27d9691b400f28c17ef063a1374048b0
4-
config_hash: e822d0c9082c8b312264403949243179
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-721e6ccaa72205ee14c71f8163129920464fb814b95d3df9567a9476bbd9b7fb.yml
3+
openapi_spec_hash: 2115413a21df8b5bf9e4552a74df4312
4+
config_hash: 9606bb315a193bfd8da0459040143242

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# Changelog
22

3+
## 5.11.0 (2025-07-30)
4+
5+
Full Changelog: [v5.10.3...v5.11.0](https://github.com/openai/openai-node/compare/v5.10.3...v5.11.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([442dc25](https://github.com/openai/openai-node/commit/442dc25d7b31a374daf440f32f5694c3b6c20a81))
10+
311
## 5.10.3 (2025-07-30)
412

513
Full Changelog: [v5.10.2...v5.10.3](https://github.com/openai/openai-node/compare/v5.10.2...v5.10.3)

jsr.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@openai/openai",
3-
"version": "5.10.3",
3+
"version": "5.11.0",
44
"exports": {
55
".": "./index.ts",
66
"./helpers/zod": "./helpers/zod.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "openai",
3-
"version": "5.10.3",
3+
"version": "5.11.0",
44
"description": "The official TypeScript library for the OpenAI API",
55
"author": "OpenAI <[email protected]>",
66
"types": "dist/index.d.ts",

src/resources/chat/completions/completions.ts

Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,6 +1089,12 @@ export interface ChatCompletionStoreMessage extends ChatCompletionMessage {
10891089
* The identifier of the chat message.
10901090
*/
10911091
id: string;
1092+
1093+
/**
1094+
* If a content parts array was provided, this is an array of `text` and
1095+
* `image_url` parts. Otherwise, null.
1096+
*/
1097+
content_parts?: Array<ChatCompletionContentPartText | ChatCompletionContentPartImage> | null;
10921098
}
10931099

10941100
/**
@@ -1397,6 +1403,13 @@ export interface ChatCompletionCreateParamsBase {
13971403
*/
13981404
presence_penalty?: number | null;
13991405

1406+
/**
1407+
* Used by OpenAI to cache responses for similar requests to optimize your cache
1408+
* hit rates. Replaces the `user` field.
1409+
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
1410+
*/
1411+
prompt_cache_key?: string;
1412+
14001413
/**
14011414
* **o-series models only**
14021415
*
@@ -1424,6 +1437,15 @@ export interface ChatCompletionCreateParamsBase {
14241437
| Shared.ResponseFormatJSONSchema
14251438
| Shared.ResponseFormatJSONObject;
14261439

1440+
/**
1441+
* A stable identifier used to help detect users of your application that may be
1442+
* violating OpenAI's usage policies. The IDs should be a string that uniquely
1443+
* identifies each user. We recommend hashing their username or email address, in
1444+
* order to avoid sending us any identifying information.
1445+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
1446+
*/
1447+
safety_identifier?: string;
1448+
14271449
/**
14281450
* This feature is in Beta. If specified, our system will make a best effort to
14291451
* sample deterministically, such that repeated requests with the same `seed` and
@@ -1533,9 +1555,12 @@ export interface ChatCompletionCreateParamsBase {
15331555
top_p?: number | null;
15341556

15351557
/**
1536-
* A stable identifier for your end-users. Used to boost cache hit rates by better
1537-
* bucketing similar requests and to help OpenAI detect and prevent abuse.
1538-
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
1558+
* @deprecated This field is being replaced by `safety_identifier` and
1559+
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
1560+
* optimizations. A stable identifier for your end-users. Used to boost cache hit
1561+
* rates by better bucketing similar requests and to help OpenAI detect and prevent
1562+
* abuse.
1563+
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
15391564
*/
15401565
user?: string;
15411566

src/resources/responses/responses.ts

Lines changed: 44 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -479,6 +479,13 @@ export interface Response {
479479
*/
480480
prompt?: ResponsePrompt | null;
481481

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+
482489
/**
483490
* **o-series models only**
484491
*
@@ -487,6 +494,15 @@ export interface Response {
487494
*/
488495
reasoning?: Shared.Reasoning | null;
489496

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+
490506
/**
491507
* Specifies the latency tier to use for processing the request. This parameter is
492508
* relevant for customers subscribed to the scale tier service:
@@ -540,9 +556,12 @@ export interface Response {
540556
usage?: ResponseUsage;
541557

542558
/**
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).
546565
*/
547566
user?: string;
548567
}
@@ -4836,6 +4855,13 @@ export interface ResponseCreateParamsBase {
48364855
*/
48374856
prompt?: ResponsePrompt | null;
48384857

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+
48394865
/**
48404866
* **o-series models only**
48414867
*
@@ -4844,6 +4870,15 @@ export interface ResponseCreateParamsBase {
48444870
*/
48454871
reasoning?: Shared.Reasoning | null;
48464872

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+
48474882
/**
48484883
* Specifies the latency tier to use for processing the request. This parameter is
48494884
* relevant for customers subscribed to the scale tier service:
@@ -4942,9 +4977,12 @@ export interface ResponseCreateParamsBase {
49424977
truncation?: 'auto' | 'disabled' | null;
49434978

49444979
/**
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).
49484986
*/
49494987
user?: string;
49504988
}

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export const VERSION = '5.10.3'; // x-release-please-version
1+
export const VERSION = '5.11.0'; // x-release-please-version

tests/api-resources/chat/completions/completions.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ describe('resource completions', () => {
4040
parallel_tool_calls: true,
4141
prediction: { content: 'string', type: 'content' },
4242
presence_penalty: -2,
43+
prompt_cache_key: 'prompt-cache-key-1234',
4344
reasoning_effort: 'low',
4445
response_format: { type: 'text' },
46+
safety_identifier: 'safety-identifier-1234',
4547
seed: -9007199254740991,
4648
service_tier: 'auto',
4749
stop: '\n',

0 commit comments

Comments
 (0)