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 @@
{
".": "4.24.1"
".": "4.25.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: 147
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-b879fff3f51e71e4f1ce17f03efc017a46d888a1bfd88eb655a6210a86f02acf.yml
openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9
config_hash: 9c56fcc7ff64785b5cd448d9a754b4b3
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9c802d45a9bf2a896b5fd22ac22bba185e8a145bd40ed242df9bb87a05e954eb.yml
openapi_spec_hash: 97984ed69285e660b7d5c810c69ed449
config_hash: acb0b1eb5d7284bfedaddb29f7f5a691
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## 4.25.0 (2026-03-05)

Full Changelog: [v4.24.1...v4.25.0](https://github.com/openai/openai-java/compare/v4.24.1...v4.25.0)

### Features

* **api:** gpt-5.4, tool search tool, and new computer tool ([18c8870](https://github.com/openai/openai-java/commit/18c8870b9f16b4fb2d87eb10d73797da3ecc6fdf))


### Bug Fixes

* **api:** allow unknown video seconds in responses ([82d67cb](https://github.com/openai/openai-java/commit/82d67cb396925dbe221cd9713afc414c0b9406ad))


### Chores

* **internal:** codegen related update ([42a435d](https://github.com/openai/openai-java/commit/42a435d6e939b6ecf1dc5866d5fce60f50b8b08b))

## 4.24.1 (2026-03-04)

Full Changelog: [v4.24.0...v4.24.1](https://github.com/openai/openai-java/compare/v4.24.0...v4.24.1)
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

<!-- x-release-please-start-version -->

[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.24.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.24.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.24.1)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.25.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.25.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.25.0)

<!-- x-release-please-end -->

The OpenAI Java SDK provides convenient access to the [OpenAI REST API](https://platform.openai.com/docs) from applications written in Java.

<!-- x-release-please-start-version -->

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.24.1).
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.25.0).

<!-- x-release-please-end -->

Expand All @@ -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.24.1")
implementation("com.openai:openai-java:4.25.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.openai:openai-java:4.24.1")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>4.24.1</version>
<version>4.25.0</version>
</dependency>
```

Expand Down Expand Up @@ -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.24.1")
implementation("com.openai:openai-java-spring-boot-starter:4.25.0")
```

#### Maven
Expand All @@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:4.24.1")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java-spring-boot-starter</artifactId>
<version>4.24.1</version>
<version>4.25.0</version>
</dependency>
```

Expand Down Expand Up @@ -1690,7 +1690,7 @@ import com.openai.models.ChatModel;
import com.openai.models.chat.completions.ChatCompletionCreateParams;

ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.model(ChatModel.GPT_5_2)
.model(ChatModel.GPT_5_4)
.messages(JsonMissing.of())
.build();
```
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ repositories {

allprojects {
group = "com.openai"
version = "4.24.1" // x-release-please-version
version = "4.25.0" // x-release-please-version
}

subprojects {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/openai.java.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ tasks.withType<Test>().configureEach {

val palantir by configurations.creating
dependencies {
palantir("com.palantir.javaformat:palantir-java-format:2.73.0")
palantir("com.palantir.javaformat:palantir-java-format:2.89.0")
}

fun registerPalantir(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,13 +214,8 @@ private constructor(
}
}
?.let { retryAfterNanos ->
// If the API asks us to wait a certain amount of time (and it's a reasonable
// amount), just
// do what it says.
val retryAfter = Duration.ofNanos(retryAfterNanos.toLong())
if (retryAfter in Duration.ofNanos(0)..Duration.ofMinutes(1)) {
return retryAfter
}
// If the API asks us to wait a certain amount of time, do what it says.
return Duration.ofNanos(retryAfterNanos.toLong())
}

// Apply exponential backoff, but not more than the max.
Expand Down
12 changes: 12 additions & 0 deletions openai-java-core/src/main/kotlin/com/openai/models/ChatModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St

companion object {

@JvmField val GPT_5_4 = of("gpt-5.4")

@JvmField val GPT_5_3_CHAT_LATEST = of("gpt-5.3-chat-latest")

@JvmField val GPT_5_2 = of("gpt-5.2")

@JvmField val GPT_5_2_2025_12_11 = of("gpt-5.2-2025-12-11")
Expand Down Expand Up @@ -171,6 +175,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St

/** An enum containing [ChatModel]'s known values. */
enum class Known {
GPT_5_4,
GPT_5_3_CHAT_LATEST,
GPT_5_2,
GPT_5_2_2025_12_11,
GPT_5_2_CHAT_LATEST,
Expand Down Expand Up @@ -255,6 +261,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
* - It was constructed with an arbitrary value using the [of] method.
*/
enum class Value {
GPT_5_4,
GPT_5_3_CHAT_LATEST,
GPT_5_2,
GPT_5_2_2025_12_11,
GPT_5_2_CHAT_LATEST,
Expand Down Expand Up @@ -340,6 +348,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
*/
fun value(): Value =
when (this) {
GPT_5_4 -> Value.GPT_5_4
GPT_5_3_CHAT_LATEST -> Value.GPT_5_3_CHAT_LATEST
GPT_5_2 -> Value.GPT_5_2
GPT_5_2_2025_12_11 -> Value.GPT_5_2_2025_12_11
GPT_5_2_CHAT_LATEST -> Value.GPT_5_2_CHAT_LATEST
Expand Down Expand Up @@ -425,6 +435,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
*/
fun known(): Known =
when (this) {
GPT_5_4 -> Known.GPT_5_4
GPT_5_3_CHAT_LATEST -> Known.GPT_5_3_CHAT_LATEST
GPT_5_2 -> Known.GPT_5_2
GPT_5_2_2025_12_11 -> Known.GPT_5_2_2025_12_11
GPT_5_2_CHAT_LATEST -> Known.GPT_5_2_CHAT_LATEST
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2298,7 +2298,9 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add
* to the vector store. There can be a maximum of 10000 files in a vector store.
* to the vector store. For vector stores created before Nov 2025, there can be a
* maximum of 10,000 files in a vector store. For vector stores created starting in
* Nov 2025, the limit is 100,000,000 files.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
Expand Down Expand Up @@ -2423,8 +2425,9 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
* add to the vector store. There can be a maximum of 10000 files in a vector
* store.
* add to the vector store. For vector stores created before Nov 2025, there can
* be a maximum of 10,000 files in a vector store. For vector stores created
* starting in Nov 2025, the limit is 100,000,000 files.
*/
fun fileIds(fileIds: List<String>) = fileIds(JsonField.of(fileIds))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4341,8 +4341,9 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
* add to the vector store. There can be a maximum of 10000 files in a vector
* store.
* add to the vector store. For vector stores created before Nov 2025, there can
* be a maximum of 10,000 files in a vector store. For vector stores created
* starting in Nov 2025, the limit is 100,000,000 files.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type
* (e.g. if the server responded with an unexpected value).
Expand Down Expand Up @@ -4475,8 +4476,10 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files)
* IDs to add to the vector store. There can be a maximum of 10000 files in
* a vector store.
* IDs to add to the vector store. For vector stores created before Nov
* 2025, there can be a maximum of 10,000 files in a vector store. For
* vector stores created starting in Nov 2025, the limit is 100,000,000
* files.
*/
fun fileIds(fileIds: List<String>) = fileIds(JsonField.of(fileIds))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2524,7 +2524,9 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to add
* to the vector store. There can be a maximum of 10000 files in a vector store.
* to the vector store. For vector stores created before Nov 2025, there can be a
* maximum of 10,000 files in a vector store. For vector stores created starting in
* Nov 2025, the limit is 100,000,000 files.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
Expand Down Expand Up @@ -2649,8 +2651,9 @@ private constructor(

/**
* A list of [file](https://platform.openai.com/docs/api-reference/files) IDs to
* add to the vector store. There can be a maximum of 10000 files in a vector
* store.
* add to the vector store. For vector stores created before Nov 2025, there can
* be a maximum of 10,000 files in a vector store. For vector stores created
* starting in Nov 2025, the limit is 100,000,000 files.
*/
fun fileIds(fileIds: List<String>) = fileIds(JsonField.of(fileIds))

Expand Down
Loading