Skip to content
Open
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.17.0"
".": "4.18.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: 136
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-7a6ba5212fa9680f9489f4e73c298e1e8f78106b83a465e76290d45fc2fccb70.yml
openapi_spec_hash: 3d3379b7dbf6af484944bc678ec9bf4c
config_hash: a08002d1759a1d0bde3429dccc58d1ef
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-64c3a646eb5dcad2b7ff7bd976c0e312b886676a542f6ffcd9a6c8503ae24c58.yml
openapi_spec_hash: 91b1b7bf3c1a6b6c9c7507d4cac8fe2a
config_hash: f8e6baff429cf000b8e4ba1da08dff47
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 4.18.0 (2026-02-04)

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

### Features

* **api:** image generation actions for responses; ResponseFunctionCallArgumentsDoneEvent.name ([a0cc1d8](https://github.com/openai/openai-java/commit/a0cc1d81ca67e8618f51df4359b2877d27cba572))


### Bug Fixes

* **client:** undo change to web search Find action ([7b2ebe5](https://github.com/openai/openai-java/commit/7b2ebe54b58b97fbc9ad1bba5cb54cb346606483))
* **client:** update type for `find_in_page` action ([2cde783](https://github.com/openai/openai-java/commit/2cde783b5d33d7498548074ad45ee04d4d9d7c05))


### Chores

* **internal:** allow passing args to `./scripts/test` ([ce2c0ed](https://github.com/openai/openai-java/commit/ce2c0edb51c10779f3c7bb68aef8666057d4e400))

## 4.17.0 (2026-01-30)

Full Changelog: [v4.16.1...v4.17.0](https://github.com/openai/openai-java/compare/v4.16.1...v4.17.0)
Expand Down
14 changes: 7 additions & 7 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.17.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.17.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.17.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.18.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.18.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.18.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.17.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.18.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.17.0")
implementation("com.openai:openai-java:4.18.0")
```

### Maven
Expand All @@ -33,7 +33,7 @@ implementation("com.openai:openai-java:4.17.0")
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>4.17.0</version>
<version>4.18.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.17.0")
implementation("com.openai:openai-java-spring-boot-starter:4.18.0")
```

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

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.17.0" // x-release-please-version
version = "4.18.0" // x-release-please-version
}

subprojects {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ private constructor(
private val callId: JsonField<String>,
private val eventId: JsonField<String>,
private val itemId: JsonField<String>,
private val name: JsonField<String>,
private val outputIndex: JsonField<Long>,
private val responseId: JsonField<String>,
private val type: JsonValue,
Expand All @@ -38,14 +39,25 @@ private constructor(
@JsonProperty("call_id") @ExcludeMissing callId: JsonField<String> = JsonMissing.of(),
@JsonProperty("event_id") @ExcludeMissing eventId: JsonField<String> = JsonMissing.of(),
@JsonProperty("item_id") @ExcludeMissing itemId: JsonField<String> = JsonMissing.of(),
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
@JsonProperty("output_index")
@ExcludeMissing
outputIndex: JsonField<Long> = JsonMissing.of(),
@JsonProperty("response_id")
@ExcludeMissing
responseId: JsonField<String> = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
) : this(arguments, callId, eventId, itemId, outputIndex, responseId, type, mutableMapOf())
) : this(
arguments,
callId,
eventId,
itemId,
name,
outputIndex,
responseId,
type,
mutableMapOf(),
)

/**
* The final arguments as a JSON string.
Expand Down Expand Up @@ -79,6 +91,14 @@ private constructor(
*/
fun itemId(): String = itemId.getRequired("item_id")

/**
* The name of the function that was called.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
* unexpectedly missing or null (e.g. if the server responded with an unexpected value).
*/
fun name(): String = name.getRequired("name")

/**
* The index of the output item in the response.
*
Expand Down Expand Up @@ -136,6 +156,13 @@ private constructor(
*/
@JsonProperty("item_id") @ExcludeMissing fun _itemId(): JsonField<String> = itemId

/**
* Returns the raw JSON value of [name].
*
* Unlike [name], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("name") @ExcludeMissing fun _name(): JsonField<String> = name

/**
* Returns the raw JSON value of [outputIndex].
*
Expand Down Expand Up @@ -174,6 +201,7 @@ private constructor(
* .callId()
* .eventId()
* .itemId()
* .name()
* .outputIndex()
* .responseId()
* ```
Expand All @@ -188,6 +216,7 @@ private constructor(
private var callId: JsonField<String>? = null
private var eventId: JsonField<String>? = null
private var itemId: JsonField<String>? = null
private var name: JsonField<String>? = null
private var outputIndex: JsonField<Long>? = null
private var responseId: JsonField<String>? = null
private var type: JsonValue = JsonValue.from("response.function_call_arguments.done")
Expand All @@ -201,6 +230,7 @@ private constructor(
callId = responseFunctionCallArgumentsDoneEvent.callId
eventId = responseFunctionCallArgumentsDoneEvent.eventId
itemId = responseFunctionCallArgumentsDoneEvent.itemId
name = responseFunctionCallArgumentsDoneEvent.name
outputIndex = responseFunctionCallArgumentsDoneEvent.outputIndex
responseId = responseFunctionCallArgumentsDoneEvent.responseId
type = responseFunctionCallArgumentsDoneEvent.type
Expand Down Expand Up @@ -253,6 +283,17 @@ private constructor(
*/
fun itemId(itemId: JsonField<String>) = apply { this.itemId = itemId }

/** The name of the function that was called. */
fun name(name: String) = name(JsonField.of(name))

/**
* Sets [Builder.name] to an arbitrary JSON value.
*
* You should usually call [Builder.name] with a well-typed [String] value instead. This
* method is primarily for setting the field to an undocumented or not yet supported value.
*/
fun name(name: JsonField<String>) = apply { this.name = name }

/** The index of the output item in the response. */
fun outputIndex(outputIndex: Long) = outputIndex(JsonField.of(outputIndex))

Expand Down Expand Up @@ -321,6 +362,7 @@ private constructor(
* .callId()
* .eventId()
* .itemId()
* .name()
* .outputIndex()
* .responseId()
* ```
Expand All @@ -333,6 +375,7 @@ private constructor(
checkRequired("callId", callId),
checkRequired("eventId", eventId),
checkRequired("itemId", itemId),
checkRequired("name", name),
checkRequired("outputIndex", outputIndex),
checkRequired("responseId", responseId),
type,
Expand All @@ -351,6 +394,7 @@ private constructor(
callId()
eventId()
itemId()
name()
outputIndex()
responseId()
_type().let {
Expand Down Expand Up @@ -380,6 +424,7 @@ private constructor(
(if (callId.asKnown().isPresent) 1 else 0) +
(if (eventId.asKnown().isPresent) 1 else 0) +
(if (itemId.asKnown().isPresent) 1 else 0) +
(if (name.asKnown().isPresent) 1 else 0) +
(if (outputIndex.asKnown().isPresent) 1 else 0) +
(if (responseId.asKnown().isPresent) 1 else 0) +
type.let { if (it == JsonValue.from("response.function_call_arguments.done")) 1 else 0 }
Expand All @@ -394,6 +439,7 @@ private constructor(
callId == other.callId &&
eventId == other.eventId &&
itemId == other.itemId &&
name == other.name &&
outputIndex == other.outputIndex &&
responseId == other.responseId &&
type == other.type &&
Expand All @@ -406,6 +452,7 @@ private constructor(
callId,
eventId,
itemId,
name,
outputIndex,
responseId,
type,
Expand All @@ -416,5 +463,5 @@ private constructor(
override fun hashCode(): Int = hashCode

override fun toString() =
"ResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, callId=$callId, eventId=$eventId, itemId=$itemId, outputIndex=$outputIndex, responseId=$responseId, type=$type, additionalProperties=$additionalProperties}"
"ResponseFunctionCallArgumentsDoneEvent{arguments=$arguments, callId=$callId, eventId=$eventId, itemId=$itemId, name=$name, outputIndex=$outputIndex, responseId=$responseId, type=$type, additionalProperties=$additionalProperties}"
}
Loading