diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c032d311..f36ffd45 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.22.0" + ".": "4.22.1" } \ No newline at end of file diff --git a/.stats.yml b/.stats.yml index fe36e289..81b6eba2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 147 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a6dd5f8d7318fb1c5370d5ccb7148bacdfb3f3a665c4b85b7666e6188d9bd909.yml -openapi_spec_hash: c4824e385a81b9021428304ccc96538f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-46434d15307c0a84fad213c705ba29ab7342f27aa377e302d506a51cb784613b.yml +openapi_spec_hash: 4a64f88af6142d69d6e01dc9207f232a config_hash: 948733484caf41e71093c6582dbc319c diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f0c2344..a52de928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 4.22.1 (2026-02-22) + +Full Changelog: [v4.22.0...v4.22.1](https://github.com/openai/openai-java/compare/v4.22.0...v4.22.1) + +### Documentation + +* **api:** add batch size limit to file batch create parameters ([764fd86](https://github.com/openai/openai-java/commit/764fd868ab4d0f9642ae2facb6ca98ef3a491888)) +* **api:** clarify safety_identifier max length in chat completions and responses ([b2735b0](https://github.com/openai/openai-java/commit/b2735b002e3591513ea743062e36d6f965f1fd46)) + ## 4.22.0 (2026-02-19) Full Changelog: [v4.21.0...v4.22.0](https://github.com/openai/openai-java/compare/v4.21.0...v4.22.0) diff --git a/README.md b/README.md index 9ac179be..c72d373c 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ -[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.22.0) -[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.22.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.22.0) +[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.22.1) +[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.22.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.22.1) @@ -11,7 +11,7 @@ The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https:// -The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/4.22.0). +The REST API documentation can be found on [platform.openai.com](https://platform.openai.com/docs). Javadocs are available on [javadoc.io](https://javadoc.io/doc/com.openai/openai-java/4.22.1). @@ -24,7 +24,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor ### Gradle ```kotlin -implementation("com.openai:openai-java:4.22.0") +implementation("com.openai:openai-java:4.22.1") ``` ### Maven @@ -33,7 +33,7 @@ implementation("com.openai:openai-java:4.22.0") com.openai openai-java - 4.22.0 + 4.22.1 ``` @@ -1342,7 +1342,7 @@ If you're using Spring Boot, then you can use the SDK's [Spring Boot starter](ht #### Gradle ```kotlin -implementation("com.openai:openai-java-spring-boot-starter:4.22.0") +implementation("com.openai:openai-java-spring-boot-starter:4.22.1") ``` #### Maven @@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:4.22.0") com.openai openai-java-spring-boot-starter - 4.22.0 + 4.22.1 ``` diff --git a/build.gradle.kts b/build.gradle.kts index 2918ba8a..be3a1bf3 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -8,7 +8,7 @@ repositories { allprojects { group = "com.openai" - version = "4.22.0" // x-release-please-version + version = "4.22.1" // x-release-please-version } subprojects { diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt index 4e66cb42..73fffa0b 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParams.kt @@ -314,9 +314,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with + * a maximum length of 64 characters. 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1484,9 +1484,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, + * with a maximum length of 64 characters. 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). */ fun safetyIdentifier(safetyIdentifier: String) = apply { @@ -2476,9 +2476,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, + * with a maximum length of 64 characters. 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -3822,8 +3822,9 @@ private constructor( /** * 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. + * identifies each user, with a maximum length of 64 characters. 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). */ fun safetyIdentifier(safetyIdentifier: String) = diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt index c2f6a1bf..0eff08c4 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/Response.kt @@ -443,9 +443,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with + * a maximum length of 64 characters. 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1671,9 +1671,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, + * with a maximum length of 64 characters. 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). */ fun safetyIdentifier(safetyIdentifier: String) = diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt index c08c2277..45eaef04 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCreateParams.kt @@ -236,9 +236,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with + * a maximum length of 64 characters. 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -1048,9 +1048,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, + * with a maximum length of 64 characters. 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). */ fun safetyIdentifier(safetyIdentifier: String) = apply { @@ -1964,9 +1964,9 @@ private constructor( /** * 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. + * OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, + * with a maximum length of 64 characters. 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). * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the @@ -2881,8 +2881,9 @@ private constructor( /** * 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. + * identifies each user, with a maximum length of 64 characters. 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). */ fun safetyIdentifier(safetyIdentifier: String) = diff --git a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt index 50d84fa0..ca03a868 100644 --- a/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt +++ b/openai-java-core/src/main/kotlin/com/openai/models/vectorstores/filebatches/FileBatchCreateParams.kt @@ -60,8 +60,8 @@ private constructor( /** * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the vector * store should use. Useful for tools like `file_search` that can access files. If `attributes` - * or `chunking_strategy` are provided, they will be applied to all files in the batch. Mutually - * exclusive with `files`. + * or `chunking_strategy` are provided, they will be applied to all files in the batch. The + * maximum batch size is 2000 files. Mutually exclusive with `files`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -72,7 +72,7 @@ private constructor( * A list of objects that each include a `file_id` plus optional `attributes` or * `chunking_strategy`. Use this when you need to override metadata for specific files. The * global `attributes` or `chunking_strategy` will be ignored and must be specified for each - * file. Mutually exclusive with `file_ids`. + * file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -228,7 +228,7 @@ private constructor( * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the * vector store should use. Useful for tools like `file_search` that can access files. If * `attributes` or `chunking_strategy` are provided, they will be applied to all files in - * the batch. Mutually exclusive with `files`. + * the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. */ fun fileIds(fileIds: List) = apply { body.fileIds(fileIds) } @@ -252,7 +252,7 @@ private constructor( * A list of objects that each include a `file_id` plus optional `attributes` or * `chunking_strategy`. Use this when you need to override metadata for specific files. The * global `attributes` or `chunking_strategy` will be ignored and must be specified for each - * file. Mutually exclusive with `file_ids`. + * file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. */ fun files(files: List) = apply { body.files(files) } @@ -465,7 +465,7 @@ private constructor( * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the * vector store should use. Useful for tools like `file_search` that can access files. If * `attributes` or `chunking_strategy` are provided, they will be applied to all files in - * the batch. Mutually exclusive with `files`. + * the batch. The maximum batch size is 2000 files. Mutually exclusive with `files`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -476,7 +476,7 @@ private constructor( * A list of objects that each include a `file_id` plus optional `attributes` or * `chunking_strategy`. Use this when you need to override metadata for specific files. The * global `attributes` or `chunking_strategy` will be ignored and must be specified for each - * file. Mutually exclusive with `file_ids`. + * file. The maximum batch size is 2000 files. Mutually exclusive with `file_ids`. * * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the * server responded with an unexpected value). @@ -623,7 +623,8 @@ private constructor( * A list of [File](https://platform.openai.com/docs/api-reference/files) IDs that the * vector store should use. Useful for tools like `file_search` that can access files. * If `attributes` or `chunking_strategy` are provided, they will be applied to all - * files in the batch. Mutually exclusive with `files`. + * files in the batch. The maximum batch size is 2000 files. Mutually exclusive with + * `files`. */ fun fileIds(fileIds: List) = fileIds(JsonField.of(fileIds)) @@ -654,7 +655,8 @@ private constructor( * A list of objects that each include a `file_id` plus optional `attributes` or * `chunking_strategy`. Use this when you need to override metadata for specific files. * The global `attributes` or `chunking_strategy` will be ignored and must be specified - * for each file. Mutually exclusive with `file_ids`. + * for each file. The maximum batch size is 2000 files. Mutually exclusive with + * `file_ids`. */ fun files(files: List) = files(JsonField.of(files))