Skip to content
Closed
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.49.0"
".": "4.49.1"
}
6 changes: 3 additions & 3 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 278
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-31fcc3c97e5c432754bf0b72c5d5abbe1493573f0ca888af914baf81188b453e.yml
openapi_spec_hash: f867849a0c2a9c9b838d21f1c720a9e3
config_hash: fce3820c4f95b555e486349bc7d297d8
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai/openai-109bc94104d50d22b22a44ea4d9fdf9ee5ecb09fe8cafbab10c4651cfb1b7d23.yml
openapi_spec_hash: d342651bd77c6cd6ea10a9d889b35bb8
config_hash: 017f3e1596129b7f06acd753e8a0d6e2
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 4.49.1 (2026-08-03)

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

### Chores

* **api:** disable stainless codeflow ([7f0cbd5](https://github.com/openai/openai-java/commit/7f0cbd55a6e7cbfb587d10380f9d891e3c0309ea))
* **internal:** codegen related update ([eec196b](https://github.com/openai/openai-java/commit/eec196b75822485c4507f37f2eed0a503e276d99))
* remove retired Spring Boot 2 starter ([#827](https://github.com/openai/openai-java/issues/827)) ([52e3c64](https://github.com/openai/openai-java/commit/52e3c64215b647aeebe1e9123c1c857a7bbe95af))

## 4.49.0 (2026-07-31)

Full Changelog: [v4.48.0...v4.49.0](https://github.com/openai/openai-java/compare/v4.48.0...v4.49.0)
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,14 @@ Then in your project's `build.gradle.kts` or `pom.xml`, reference the locally pu
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java:2.9.1")
implementation("com.openai:openai-java:4.49.1")
```

```xml
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java</artifactId>
<version>2.9.1</version>
<version>4.49.1</version>
</dependency>
```

Expand Down
12 changes: 6 additions & 6 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.49.0)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.49.0/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.49.0)
[![Maven Central](https://img.shields.io/maven-central/v/com.openai/openai-java)](https://central.sonatype.com/artifact/com.openai/openai-java/4.49.1)
[![javadoc](https://javadoc.io/badge2/com.openai/openai-java/4.49.1/javadoc.svg)](https://javadoc.io/doc/com.openai/openai-java/4.49.1)

<!-- 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.49.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.49.1).

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

Expand All @@ -22,7 +22,7 @@ The REST API documentation can be found on [platform.openai.com](https://platfor
### Gradle

```kotlin
implementation("com.openai:openai-java:4.49.0")
implementation("com.openai:openai-java:4.49.1")
```

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

Expand Down Expand Up @@ -94,7 +94,7 @@ with normal AWS credentials:
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java-bedrock:4.49.0")
implementation("com.openai:openai-java-bedrock:4.49.1")
```

<!-- x-release-please-end -->
Expand Down
4 changes: 2 additions & 2 deletions bedrock.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ Use this artifact instead of adding AWS dependencies to the base OpenAI package
<!-- x-release-please-start-version -->

```kotlin
implementation("com.openai:openai-java-bedrock:4.49.0")
implementation("com.openai:openai-java-bedrock:4.49.1")
```

```xml
<dependency>
<groupId>com.openai</groupId>
<artifactId>openai-java-bedrock</artifactId>
<version>4.49.0</version>
<version>4.49.1</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 @@ -30,7 +30,7 @@ repositories {

allprojects {
group = "com.openai"
version = "4.49.0" // x-release-please-version
version = "4.49.1" // x-release-please-version

// Dokka 2.1.0 depends on Jackson 2.15.3. Keep its isolated build-tool classpaths on a
// secure, internally aligned Jackson release without changing the SDK's published or
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St

@JvmField val GPT_5_6_LUNA = of("gpt-5.6-luna")

@JvmField val GPT_5_5 = of("gpt-5.5")

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

@JvmField val GPT_5_4_MINI = of("gpt-5.4-mini")
Expand Down Expand Up @@ -192,6 +194,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_5_6_SOL,
GPT_5_6_TERRA,
GPT_5_6_LUNA,
GPT_5_5,
GPT_5_4,
GPT_5_4_MINI,
GPT_5_4_NANO,
Expand Down Expand Up @@ -285,6 +288,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_5_6_SOL,
GPT_5_6_TERRA,
GPT_5_6_LUNA,
GPT_5_5,
GPT_5_4,
GPT_5_4_MINI,
GPT_5_4_NANO,
Expand Down Expand Up @@ -379,6 +383,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_5_6_SOL -> Value.GPT_5_6_SOL
GPT_5_6_TERRA -> Value.GPT_5_6_TERRA
GPT_5_6_LUNA -> Value.GPT_5_6_LUNA
GPT_5_5 -> Value.GPT_5_5
GPT_5_4 -> Value.GPT_5_4
GPT_5_4_MINI -> Value.GPT_5_4_MINI
GPT_5_4_NANO -> Value.GPT_5_4_NANO
Expand Down Expand Up @@ -473,6 +478,7 @@ class ChatModel @JsonCreator private constructor(private val value: JsonField<St
GPT_5_6_SOL -> Known.GPT_5_6_SOL
GPT_5_6_TERRA -> Known.GPT_5_6_TERRA
GPT_5_6_LUNA -> Known.GPT_5_6_LUNA
GPT_5_5 -> Known.GPT_5_5
GPT_5_4 -> Known.GPT_5_4
GPT_5_4_MINI -> Known.GPT_5_4_MINI
GPT_5_4_NANO -> Known.GPT_5_4_NANO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2970,6 +2970,8 @@ private constructor(

@JvmField val GPT_5_6_LUNA = of("gpt-5.6-luna")

@JvmField val GPT_5_5 = of("gpt-5.5")

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

@JvmField val GPT_5_4_MINI = of("gpt-5.4-mini")
Expand Down Expand Up @@ -3164,6 +3166,7 @@ private constructor(
GPT_5_6_SOL,
GPT_5_6_TERRA,
GPT_5_6_LUNA,
GPT_5_5,
GPT_5_4,
GPT_5_4_MINI,
GPT_5_4_NANO,
Expand Down Expand Up @@ -3271,6 +3274,7 @@ private constructor(
GPT_5_6_SOL,
GPT_5_6_TERRA,
GPT_5_6_LUNA,
GPT_5_5,
GPT_5_4,
GPT_5_4_MINI,
GPT_5_4_NANO,
Expand Down Expand Up @@ -3379,6 +3383,7 @@ private constructor(
GPT_5_6_SOL -> Value.GPT_5_6_SOL
GPT_5_6_TERRA -> Value.GPT_5_6_TERRA
GPT_5_6_LUNA -> Value.GPT_5_6_LUNA
GPT_5_5 -> Value.GPT_5_5
GPT_5_4 -> Value.GPT_5_4
GPT_5_4_MINI -> Value.GPT_5_4_MINI
GPT_5_4_NANO -> Value.GPT_5_4_NANO
Expand Down Expand Up @@ -3488,6 +3493,7 @@ private constructor(
GPT_5_6_SOL -> Known.GPT_5_6_SOL
GPT_5_6_TERRA -> Known.GPT_5_6_TERRA
GPT_5_6_LUNA -> Known.GPT_5_6_LUNA
GPT_5_5 -> Known.GPT_5_5
GPT_5_4 -> Known.GPT_5_4
GPT_5_4_MINI -> Known.GPT_5_4_MINI
GPT_5_4_NANO -> Known.GPT_5_4_NANO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ private constructor(
private val agent: JsonField<Agent>,
private val caller: JsonField<Caller>,
private val createdBy: JsonField<String>,
private val name: JsonField<String>,
private val namespace: JsonField<String>,
private val additionalProperties: MutableMap<String, JsonValue>,
) {

Expand All @@ -54,7 +56,21 @@ private constructor(
@JsonProperty("agent") @ExcludeMissing agent: JsonField<Agent> = JsonMissing.of(),
@JsonProperty("caller") @ExcludeMissing caller: JsonField<Caller> = JsonMissing.of(),
@JsonProperty("created_by") @ExcludeMissing createdBy: JsonField<String> = JsonMissing.of(),
) : this(id, callId, output, status, type, agent, caller, createdBy, mutableMapOf())
@JsonProperty("name") @ExcludeMissing name: JsonField<String> = JsonMissing.of(),
@JsonProperty("namespace") @ExcludeMissing namespace: JsonField<String> = JsonMissing.of(),
) : this(
id,
callId,
output,
status,
type,
agent,
caller,
createdBy,
name,
namespace,
mutableMapOf(),
)

/**
* The unique ID of the function call tool output.
Expand Down Expand Up @@ -127,6 +143,22 @@ private constructor(
*/
fun createdBy(): Optional<String> = createdBy.getOptional("created_by")

/**
* The name of the tool that produced the output.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun name(): Optional<String> = name.getOptional("name")

/**
* The namespace of the tool that produced the output.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
fun namespace(): Optional<String> = namespace.getOptional("namespace")

/**
* Returns the raw JSON value of [id].
*
Expand Down Expand Up @@ -176,6 +208,20 @@ private constructor(
*/
@JsonProperty("created_by") @ExcludeMissing fun _createdBy(): JsonField<String> = createdBy

/**
* 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 [namespace].
*
* Unlike [namespace], this method doesn't throw if the JSON field has an unexpected type.
*/
@JsonProperty("namespace") @ExcludeMissing fun _namespace(): JsonField<String> = namespace

@JsonAnySetter
private fun putAdditionalProperty(key: String, value: JsonValue) {
additionalProperties.put(key, value)
Expand Down Expand Up @@ -216,6 +262,8 @@ private constructor(
private var agent: JsonField<Agent> = JsonMissing.of()
private var caller: JsonField<Caller> = JsonMissing.of()
private var createdBy: JsonField<String> = JsonMissing.of()
private var name: JsonField<String> = JsonMissing.of()
private var namespace: JsonField<String> = JsonMissing.of()
private var additionalProperties: MutableMap<String, JsonValue> = mutableMapOf()

@JvmSynthetic
Expand All @@ -230,6 +278,8 @@ private constructor(
agent = betaResponseFunctionToolCallOutputItem.agent
caller = betaResponseFunctionToolCallOutputItem.caller
createdBy = betaResponseFunctionToolCallOutputItem.createdBy
name = betaResponseFunctionToolCallOutputItem.name
namespace = betaResponseFunctionToolCallOutputItem.namespace
additionalProperties =
betaResponseFunctionToolCallOutputItem.additionalProperties.toMutableMap()
}
Expand Down Expand Up @@ -362,6 +412,29 @@ private constructor(
*/
fun createdBy(createdBy: JsonField<String>) = apply { this.createdBy = createdBy }

/** The name of the tool that produced the output. */
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 namespace of the tool that produced the output. */
fun namespace(namespace: String) = namespace(JsonField.of(namespace))

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

fun additionalProperties(additionalProperties: Map<String, JsonValue>) = apply {
this.additionalProperties.clear()
putAllAdditionalProperties(additionalProperties)
Expand Down Expand Up @@ -406,6 +479,8 @@ private constructor(
agent,
caller,
createdBy,
name,
namespace,
additionalProperties.toMutableMap(),
)
}
Expand Down Expand Up @@ -437,6 +512,8 @@ private constructor(
agent().ifPresent { it.validate() }
caller().ifPresent { it.validate() }
createdBy()
name()
namespace()
validated = true
}

Expand All @@ -462,7 +539,9 @@ private constructor(
type.let { if (it == JsonValue.from("function_call_output")) 1 else 0 } +
(agent.asKnown().getOrNull()?.validity() ?: 0) +
(caller.asKnown().getOrNull()?.validity() ?: 0) +
(if (createdBy.asKnown().isPresent) 1 else 0)
(if (createdBy.asKnown().isPresent) 1 else 0) +
(if (name.asKnown().isPresent) 1 else 0) +
(if (namespace.asKnown().isPresent) 1 else 0)

/**
* The output from the function call generated by your code. Can be a string or an list of
Expand Down Expand Up @@ -1743,6 +1822,8 @@ private constructor(
agent == other.agent &&
caller == other.caller &&
createdBy == other.createdBy &&
name == other.name &&
namespace == other.namespace &&
additionalProperties == other.additionalProperties
}

Expand All @@ -1756,12 +1837,14 @@ private constructor(
agent,
caller,
createdBy,
name,
namespace,
additionalProperties,
)
}

override fun hashCode(): Int = hashCode

override fun toString() =
"BetaResponseFunctionToolCallOutputItem{id=$id, callId=$callId, output=$output, status=$status, type=$type, agent=$agent, caller=$caller, createdBy=$createdBy, additionalProperties=$additionalProperties}"
"BetaResponseFunctionToolCallOutputItem{id=$id, callId=$callId, output=$output, status=$status, type=$type, agent=$agent, caller=$caller, createdBy=$createdBy, name=$name, namespace=$namespace, additionalProperties=$additionalProperties}"
}
Loading
Loading