Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "5.10.3"
".": "5.11.0"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 111
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b2a451656ca64d30d174391ebfd94806b4de3ab76dc55b92843cfb7f1a54ecb6.yml
openapi_spec_hash: 27d9691b400f28c17ef063a1374048b0
config_hash: e822d0c9082c8b312264403949243179
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-721e6ccaa72205ee14c71f8163129920464fb814b95d3df9567a9476bbd9b7fb.yml
openapi_spec_hash: 2115413a21df8b5bf9e4552a74df4312
config_hash: 9606bb315a193bfd8da0459040143242
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog

## 5.11.0 (2025-07-30)

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

### Features

* **api:** manual updates ([442dc25](https://github.com/openai/openai-node/commit/442dc25d7b31a374daf440f32f5694c3b6c20a81))

## 5.10.3 (2025-07-30)

Full Changelog: [v5.10.2...v5.10.3](https://github.com/openai/openai-node/compare/v5.10.2...v5.10.3)
Expand Down
2 changes: 1 addition & 1 deletion jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@openai/openai",
"version": "5.10.3",
"version": "5.11.0",
"exports": {
".": "./index.ts",
"./helpers/zod": "./helpers/zod.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "openai",
"version": "5.10.3",
"version": "5.11.0",
"description": "The official TypeScript library for the OpenAI API",
"author": "OpenAI <[email protected]>",
"types": "dist/index.d.ts",
Expand Down
31 changes: 28 additions & 3 deletions src/resources/chat/completions/completions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1089,6 +1089,12 @@ export interface ChatCompletionStoreMessage extends ChatCompletionMessage {
* The identifier of the chat message.
*/
id: string;

/**
* If a content parts array was provided, this is an array of `text` and
* `image_url` parts. Otherwise, null.
*/
content_parts?: Array<ChatCompletionContentPartText | ChatCompletionContentPartImage> | null;
}

/**
Expand Down Expand Up @@ -1397,6 +1403,13 @@ export interface ChatCompletionCreateParamsBase {
*/
presence_penalty?: number | null;

/**
* Used by OpenAI to cache responses for similar requests to optimize your cache
* hit rates. Replaces the `user` field.
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
*/
prompt_cache_key?: string;

/**
* **o-series models only**
*
Expand Down Expand Up @@ -1424,6 +1437,15 @@ export interface ChatCompletionCreateParamsBase {
| Shared.ResponseFormatJSONSchema
| Shared.ResponseFormatJSONObject;

/**
* A stable identifier used to help detect users of your application that may be
* violating OpenAI's usage policies. The IDs should be a string that uniquely
* identifies each user. We recommend hashing their username or email address, in
* order to avoid sending us any identifying information.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
*/
safety_identifier?: string;

/**
* This feature is in Beta. If specified, our system will make a best effort to
* sample deterministically, such that repeated requests with the same `seed` and
Expand Down Expand Up @@ -1533,9 +1555,12 @@ export interface ChatCompletionCreateParamsBase {
top_p?: number | null;

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

Expand Down
50 changes: 44 additions & 6 deletions src/resources/responses/responses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,13 @@ export interface Response {
*/
prompt?: ResponsePrompt | null;

/**
* Used by OpenAI to cache responses for similar requests to optimize your cache
* hit rates. Replaces the `user` field.
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
*/
prompt_cache_key?: string;

/**
* **o-series models only**
*
Expand All @@ -487,6 +494,15 @@ export interface Response {
*/
reasoning?: Shared.Reasoning | null;

/**
* A stable identifier used to help detect users of your application that may be
* violating OpenAI's usage policies. The IDs should be a string that uniquely
* identifies each user. We recommend hashing their username or email address, in
* order to avoid sending us any identifying information.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
*/
safety_identifier?: string;

/**
* Specifies the latency tier to use for processing the request. This parameter is
* relevant for customers subscribed to the scale tier service:
Expand Down Expand Up @@ -540,9 +556,12 @@ export interface Response {
usage?: ResponseUsage;

/**
* A stable identifier for your end-users. Used to boost cache hit rates by better
* bucketing similar requests and to help OpenAI detect and prevent abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
* @deprecated This field is being replaced by `safety_identifier` and
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
* optimizations. A stable identifier for your end-users. Used to boost cache hit
* rates by better bucketing similar requests and to help OpenAI detect and prevent
* abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
*/
user?: string;
}
Expand Down Expand Up @@ -4836,6 +4855,13 @@ export interface ResponseCreateParamsBase {
*/
prompt?: ResponsePrompt | null;

/**
* Used by OpenAI to cache responses for similar requests to optimize your cache
* hit rates. Replaces the `user` field.
* [Learn more](https://platform.openai.com/docs/guides/prompt-caching).
*/
prompt_cache_key?: string;

/**
* **o-series models only**
*
Expand All @@ -4844,6 +4870,15 @@ export interface ResponseCreateParamsBase {
*/
reasoning?: Shared.Reasoning | null;

/**
* A stable identifier used to help detect users of your application that may be
* violating OpenAI's usage policies. The IDs should be a string that uniquely
* identifies each user. We recommend hashing their username or email address, in
* order to avoid sending us any identifying information.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
*/
safety_identifier?: string;

/**
* Specifies the latency tier to use for processing the request. This parameter is
* relevant for customers subscribed to the scale tier service:
Expand Down Expand Up @@ -4942,9 +4977,12 @@ export interface ResponseCreateParamsBase {
truncation?: 'auto' | 'disabled' | null;

/**
* A stable identifier for your end-users. Used to boost cache hit rates by better
* bucketing similar requests and to help OpenAI detect and prevent abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
* @deprecated This field is being replaced by `safety_identifier` and
* `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching
* optimizations. A stable identifier for your end-users. Used to boost cache hit
* rates by better bucketing similar requests and to help OpenAI detect and prevent
* abuse.
* [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#safety-identifiers).
*/
user?: string;
}
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const VERSION = '5.10.3'; // x-release-please-version
export const VERSION = '5.11.0'; // x-release-please-version
2 changes: 2 additions & 0 deletions tests/api-resources/chat/completions/completions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ describe('resource completions', () => {
parallel_tool_calls: true,
prediction: { content: 'string', type: 'content' },
presence_penalty: -2,
prompt_cache_key: 'prompt-cache-key-1234',
reasoning_effort: 'low',
response_format: { type: 'text' },
safety_identifier: 'safety-identifier-1234',
seed: -9007199254740991,
service_tier: 'auto',
stop: '\n',
Expand Down
Loading