diff --git a/.release-please-manifest.json b/.release-please-manifest.json
index a817334f6..34f6b4141 100644
--- a/.release-please-manifest.json
+++ b/.release-please-manifest.json
@@ -1,3 +1,3 @@
{
- ".": "4.14.0"
+ ".": "4.15.0"
}
\ No newline at end of file
diff --git a/.stats.yml b/.stats.yml
index eb957d45d..e77bbf6d8 100644
--- a/.stats.yml
+++ b/.stats.yml
@@ -1,4 +1,4 @@
configured_endpoints: 136
-openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-75926226b642ebb2cb415694da9dff35e8ab40145ac1b791cefb82a83809db4d.yml
-openapi_spec_hash: 6a0e391b0ba5747b6b4a3e5fe21de4da
-config_hash: adcf23ecf5f84d3cadf1d71e82ec636a
+openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-9442fa9212dd61aac2bb0edd19744bee381e75888712f9098bc6ebb92c52b557.yml
+openapi_spec_hash: f87823d164b7a8f72a42eba04e482a99
+config_hash: ad7136f7366fddec432ec378939e58a7
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 65797c0ee..91228518a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,24 @@
# Changelog
+## 4.15.0 (2026-01-09)
+
+Full Changelog: [v4.14.0...v4.15.0](https://github.com/openai/openai-java/compare/v4.14.0...v4.15.0)
+
+### Features
+
+* **api:** add new Response completed_at prop ([703a651](https://github.com/openai/openai-java/commit/703a6511f98fd016a0a27e0694fccf1d81cc3280))
+* **client:** allow configuring dispatcher executor service ([8e579d9](https://github.com/openai/openai-java/commit/8e579d9db0c7fde0da3abb180f5bc72c2798ede4))
+
+
+### Bug Fixes
+
+* **client:** allow `withOptions` to modify credentials ([#674](https://github.com/openai/openai-java/issues/674)) ([1d5a8f9](https://github.com/openai/openai-java/commit/1d5a8f9dda2420d3dfe916bb90f07ee596886511))
+
+
+### Chores
+
+* **internal:** use different example values for some enums ([d8c6ed4](https://github.com/openai/openai-java/commit/d8c6ed431b65bbf6746731de3052a3a2f3a6aaa8))
+
## 4.14.0 (2026-01-06)
Full Changelog: [v4.13.0...v4.14.0](https://github.com/openai/openai-java/compare/v4.13.0...v4.14.0)
diff --git a/README.md b/README.md
index 71cba80c7..69697494b 100644
--- a/README.md
+++ b/README.md
@@ -2,8 +2,8 @@
-[](https://central.sonatype.com/artifact/com.openai/openai-java/4.14.0)
-[](https://javadoc.io/doc/com.openai/openai-java/4.14.0)
+[](https://central.sonatype.com/artifact/com.openai/openai-java/4.15.0)
+[](https://javadoc.io/doc/com.openai/openai-java/4.15.0)
@@ -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.14.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.15.0).
@@ -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.14.0")
+implementation("com.openai:openai-java:4.15.0")
```
### Maven
@@ -33,7 +33,7 @@ implementation("com.openai:openai-java:4.14.0")
com.openai
openai-java
- 4.14.0
+ 4.15.0
```
@@ -82,7 +82,7 @@ OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.addUserMessage("Say this is a test")
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build();
ChatCompletion chatCompletion = client.chat().completions().create(params);
```
@@ -188,7 +188,7 @@ OpenAIClient client = OpenAIOkHttpClient.fromEnv();
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.addUserMessage("Say this is a test")
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build();
CompletableFuture chatCompletion = client.async().chat().completions().create(params);
```
@@ -209,7 +209,7 @@ OpenAIClientAsync client = OpenAIOkHttpClientAsync.fromEnv();
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.addUserMessage("Say this is a test")
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build();
CompletableFuture chatCompletion = client.chat().completions().create(params);
```
@@ -1143,7 +1143,7 @@ import com.openai.models.chat.completions.ChatCompletionCreateParams;
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.addUserMessage("Say this is a test")
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build();
HttpResponseFor chatCompletion = client.chat().completions().withRawResponse().create(params);
@@ -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.14.0")
+implementation("com.openai:openai-java-spring-boot-starter:4.15.0")
```
#### Maven
@@ -1351,7 +1351,7 @@ implementation("com.openai:openai-java-spring-boot-starter:4.14.0")
com.openai
openai-java-spring-boot-starter
- 4.14.0
+ 4.15.0
```
@@ -1616,7 +1616,7 @@ import com.openai.models.chat.completions.ChatCompletionCreateParams;
ChatCompletionCreateParams params = ChatCompletionCreateParams.builder()
.messages(JsonValue.from(42))
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build();
```
@@ -1669,7 +1669,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_4O)
.messages(JsonMissing.of())
.build();
```
diff --git a/build.gradle.kts b/build.gradle.kts
index a4f6abafb..ac9a8561c 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -8,7 +8,7 @@ repositories {
allprojects {
group = "com.openai"
- version = "4.14.0" // x-release-please-version
+ version = "4.15.0" // x-release-please-version
}
subprojects {
diff --git a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OkHttpClient.kt b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OkHttpClient.kt
index f036cbd2b..944888a63 100644
--- a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OkHttpClient.kt
+++ b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OkHttpClient.kt
@@ -15,11 +15,13 @@ import java.net.Proxy
import java.time.Duration
import java.util.concurrent.CancellationException
import java.util.concurrent.CompletableFuture
+import java.util.concurrent.ExecutorService
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
import okhttp3.Call
import okhttp3.Callback
+import okhttp3.Dispatcher
import okhttp3.HttpUrl.Companion.toHttpUrl
import okhttp3.MediaType
import okhttp3.MediaType.Companion.toMediaType
@@ -198,6 +200,7 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
private var timeout: Timeout = Timeout.default()
private var proxy: Proxy? = null
+ private var dispatcherExecutorService: ExecutorService? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
@@ -208,6 +211,10 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
+ fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
+ this.dispatcherExecutorService = dispatcherExecutorService
+ }
+
fun sslSocketFactory(sslSocketFactory: SSLSocketFactory?) = apply {
this.sslSocketFactory = sslSocketFactory
}
@@ -229,6 +236,8 @@ private constructor(@JvmSynthetic internal val okHttpClient: okhttp3.OkHttpClien
.callTimeout(timeout.request())
.proxy(proxy)
.apply {
+ dispatcherExecutorService?.let { dispatcher(Dispatcher(it)) }
+
val sslSocketFactory = sslSocketFactory
val trustManager = trustManager
if (sslSocketFactory != null && trustManager != null) {
diff --git a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt
index 818d0f824..717fa06ab 100644
--- a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt
+++ b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClient.kt
@@ -20,6 +20,7 @@ import java.time.Clock
import java.time.Duration
import java.util.Optional
import java.util.concurrent.Executor
+import java.util.concurrent.ExecutorService
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
@@ -48,11 +49,31 @@ class OpenAIOkHttpClient private constructor() {
class Builder internal constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
+ private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
+ /**
+ * The executor service to use for running HTTP requests.
+ *
+ * Defaults to OkHttp's
+ * [default executor service](https://github.com/square/okhttp/blob/ace792f443b2ffb17974f5c0d1cecdf589309f26/okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt#L98-L104).
+ *
+ * This class takes ownership of the executor service and shuts it down when closed.
+ */
+ fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
+ this.dispatcherExecutorService = dispatcherExecutorService
+ }
+
+ /**
+ * Alias for calling [Builder.dispatcherExecutorService] with
+ * `dispatcherExecutorService.orElse(null)`.
+ */
+ fun dispatcherExecutorService(dispatcherExecutorService: Optional) =
+ dispatcherExecutorService(dispatcherExecutorService.getOrNull())
+
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
@@ -339,6 +360,7 @@ class OpenAIOkHttpClient private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
.hostnameVerifier(hostnameVerifier)
diff --git a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt
index bb3352e39..5ece67a8a 100644
--- a/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt
+++ b/openai-java-client-okhttp/src/main/kotlin/com/openai/client/okhttp/OpenAIOkHttpClientAsync.kt
@@ -20,6 +20,7 @@ import java.time.Clock
import java.time.Duration
import java.util.Optional
import java.util.concurrent.Executor
+import java.util.concurrent.ExecutorService
import javax.net.ssl.HostnameVerifier
import javax.net.ssl.SSLSocketFactory
import javax.net.ssl.X509TrustManager
@@ -48,11 +49,31 @@ class OpenAIOkHttpClientAsync private constructor() {
class Builder internal constructor() {
private var clientOptions: ClientOptions.Builder = ClientOptions.builder()
+ private var dispatcherExecutorService: ExecutorService? = null
private var proxy: Proxy? = null
private var sslSocketFactory: SSLSocketFactory? = null
private var trustManager: X509TrustManager? = null
private var hostnameVerifier: HostnameVerifier? = null
+ /**
+ * The executor service to use for running HTTP requests.
+ *
+ * Defaults to OkHttp's
+ * [default executor service](https://github.com/square/okhttp/blob/ace792f443b2ffb17974f5c0d1cecdf589309f26/okhttp/src/commonJvmAndroid/kotlin/okhttp3/Dispatcher.kt#L98-L104).
+ *
+ * This class takes ownership of the executor service and shuts it down when closed.
+ */
+ fun dispatcherExecutorService(dispatcherExecutorService: ExecutorService?) = apply {
+ this.dispatcherExecutorService = dispatcherExecutorService
+ }
+
+ /**
+ * Alias for calling [Builder.dispatcherExecutorService] with
+ * `dispatcherExecutorService.orElse(null)`.
+ */
+ fun dispatcherExecutorService(dispatcherExecutorService: Optional) =
+ dispatcherExecutorService(dispatcherExecutorService.getOrNull())
+
fun proxy(proxy: Proxy?) = apply { this.proxy = proxy }
/** Alias for calling [Builder.proxy] with `proxy.orElse(null)`. */
@@ -339,6 +360,7 @@ class OpenAIOkHttpClientAsync private constructor() {
OkHttpClient.builder()
.timeout(clientOptions.timeout())
.proxy(proxy)
+ .dispatcherExecutorService(dispatcherExecutorService)
.sslSocketFactory(sslSocketFactory)
.trustManager(trustManager)
.hostnameVerifier(hostnameVerifier)
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt
index 9df7f0a94..f3be773de 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/audio/speech/SpeechCreateParams.kt
@@ -47,9 +47,9 @@ private constructor(
fun model(): SpeechModel = body.model()
/**
- * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`,
- * `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the
- * voices are available in the
+ * The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and
+ * `cedar`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
@@ -228,9 +228,9 @@ private constructor(
fun model(value: String) = apply { body.model(value) }
/**
- * The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
- * Previews of the voices are available in the
+ * The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`,
+ * and `cedar`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*/
fun voice(voice: Voice) = apply { body.voice(voice) }
@@ -520,9 +520,9 @@ private constructor(
fun model(): SpeechModel = model.getRequired("model")
/**
- * The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
- * Previews of the voices are available in the
+ * The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`,
+ * and `cedar`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type or is
@@ -713,9 +713,9 @@ private constructor(
fun model(value: String) = model(SpeechModel.of(value))
/**
- * The voice to use when generating the audio. Supported voices are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`.
- * Previews of the voices are available in the
+ * The voice to use when generating the audio. Supported built-in voices are `alloy`,
+ * `ash`, `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`,
+ * `verse`, `marin`, and `cedar`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*/
fun voice(voice: Voice) = voice(JsonField.of(voice))
@@ -928,9 +928,9 @@ private constructor(
}
/**
- * The voice to use when generating the audio. Supported voices are `alloy`, `ash`, `ballad`,
- * `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, and `verse`. Previews of the
- * voices are available in the
+ * The voice to use when generating the audio. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `fable`, `onyx`, `nova`, `sage`, `shimmer`, `verse`, `marin`, and
+ * `cedar`. Previews of the voices are available in the
* [Text to speech guide](https://platform.openai.com/docs/guides/text-to-speech#voice-options).
*/
class Voice @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt
index fb8234035..d922960fd 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParam.kt
@@ -44,8 +44,8 @@ private constructor(
fun format(): Format = format.getRequired("format")
/**
- * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`,
- * `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`, `ballad`,
+ * `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`.
*
* @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).
@@ -121,8 +121,9 @@ private constructor(
fun format(format: JsonField) = apply { this.format = format }
/**
- * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`,
- * `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and
+ * `cedar`.
*/
fun voice(voice: Voice) = voice(JsonField.of(voice))
@@ -364,8 +365,8 @@ private constructor(
}
/**
- * The voice the model uses to respond. Supported voices are `alloy`, `ash`, `ballad`, `coral`,
- * `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`, `ballad`,
+ * `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, `shimmer`, `marin`, and `cedar`.
*/
class Voice @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt
index 51e9afc58..374309960 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/Message.kt
@@ -444,7 +444,7 @@ private constructor(
(status.asKnown().getOrNull()?.validity() ?: 0) +
type.let { if (it == JsonValue.from("message")) 1 else 0 }
- /** A text input to the model. */
+ /** A content part that makes up an input or output item. */
@JsonDeserialize(using = Content.Deserializer::class)
@JsonSerialize(using = Content.Serializer::class)
class Content
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt
index b7d59900d..6418c7269 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/conversations/items/ConversationItem.kt
@@ -142,7 +142,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun shellCall(): Optional = Optional.ofNullable(shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun shellCallOutput(): Optional =
Optional.ofNullable(shellCallOutput)
@@ -280,7 +280,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun asShellCall(): ResponseFunctionShellToolCall = shellCall.getOrThrow("shellCall")
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun asShellCallOutput(): ResponseFunctionShellToolCallOutput =
shellCallOutput.getOrThrow("shellCallOutput")
@@ -716,7 +716,7 @@ private constructor(
fun ofShellCall(shellCall: ResponseFunctionShellToolCall) =
ConversationItem(shellCall = shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
@JvmStatic
fun ofShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput) =
ConversationItem(shellCallOutput = shellCallOutput)
@@ -824,7 +824,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun visitShellCall(shellCall: ResponseFunctionShellToolCall): T
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun visitShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput): T
/** A tool call that applies file diffs by creating, deleting, or updating files. */
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt
index 7f53e811e..9b1799cb8 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/images/ImageEditParams.kt
@@ -33,7 +33,8 @@ import kotlin.jvm.optionals.getOrNull
/**
* Creates an edited or extended image given one or more source images and a prompt. This endpoint
- * only supports `gpt-image-1` and `dall-e-2`.
+ * supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`) and
+ * `dall-e-2`.
*/
class ImageEditParams
private constructor(
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutput.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutput.kt
index b5248c57e..0d11eea38 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutput.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutput.kt
@@ -57,9 +57,9 @@ private constructor(
fun speed(): Optional = speed.getOptional("speed")
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once the
- * model has responded with audio at least once. Current voice options are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. We recommend
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`, `ballad`,
+ * `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed
+ * during the session once the model has responded with audio at least once. We recommend
* `marin` and `cedar` for best quality.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
@@ -167,10 +167,10 @@ private constructor(
fun speed(speed: JsonField) = apply { this.speed = speed }
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once the
- * model has responded with audio at least once. Current voice options are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. We recommend
- * `marin` and `cedar` for best quality.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice cannot
+ * be changed during the session once the model has responded with audio at least once. We
+ * recommend `marin` and `cedar` for best quality.
*/
fun voice(voice: Voice) = voice(JsonField.of(voice))
@@ -251,9 +251,9 @@ private constructor(
(if (voice.asKnown().isPresent) 1 else 0)
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once the
- * model has responded with audio at least once. Current voice options are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. We recommend
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`, `ballad`,
+ * `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice cannot be changed
+ * during the session once the model has responded with audio at least once. We recommend
* `marin` and `cedar` for best quality.
*/
class Voice @JsonCreator private constructor(private val value: JsonField) : Enum {
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutput.kt b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutput.kt
index 059de8545..2f4cc0ccf 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutput.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutput.kt
@@ -167,10 +167,9 @@ private constructor(
fun format(): Optional = format.getOptional("format")
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once the
- * model has responded with audio at least once. Current voice options are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. We recommend
- * `marin` and `cedar` for best quality.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice cannot
+ * be changed during the session once the model has responded with audio at least once.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -250,10 +249,10 @@ private constructor(
format(RealtimeAudioFormats.ofAudioPcma(audioPcma))
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once
- * the model has responded with audio at least once. Current voice options are `alloy`,
- * `ash`, `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`.
- * We recommend `marin` and `cedar` for best quality.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice
+ * cannot be changed during the session once the model has responded with audio at least
+ * once.
*/
fun voice(voice: Voice) = voice(JsonField.of(voice))
@@ -334,10 +333,9 @@ private constructor(
(if (voice.asKnown().isPresent) 1 else 0)
/**
- * The voice the model uses to respond. Voice cannot be changed during the session once the
- * model has responded with audio at least once. Current voice options are `alloy`, `ash`,
- * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. We recommend
- * `marin` and `cedar` for best quality.
+ * The voice the model uses to respond. Supported built-in voices are `alloy`, `ash`,
+ * `ballad`, `coral`, `echo`, `sage`, `shimmer`, `verse`, `marin`, and `cedar`. Voice cannot
+ * be changed during the session once the model has responded with audio at least once.
*/
class Voice @JsonCreator private constructor(private val value: JsonField) : Enum {
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 aa63a0fa6..6ce7a0794 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
@@ -52,6 +52,7 @@ private constructor(
private val tools: JsonField>,
private val topP: JsonField,
private val background: JsonField,
+ private val completedAt: JsonField,
private val conversation: JsonField,
private val maxOutputTokens: JsonField,
private val maxToolCalls: JsonField,
@@ -102,6 +103,9 @@ private constructor(
@JsonProperty("background")
@ExcludeMissing
background: JsonField = JsonMissing.of(),
+ @JsonProperty("completed_at")
+ @ExcludeMissing
+ completedAt: JsonField = JsonMissing.of(),
@JsonProperty("conversation")
@ExcludeMissing
conversation: JsonField = JsonMissing.of(),
@@ -162,6 +166,7 @@ private constructor(
tools,
topP,
background,
+ completedAt,
conversation,
maxOutputTokens,
maxToolCalls,
@@ -346,8 +351,17 @@ private constructor(
fun background(): Optional = background.getOptional("background")
/**
- * The conversation that this response belongs to. Input items and output items from this
- * response are automatically added to this conversation.
+ * Unix timestamp (in seconds) of when this Response was completed. Only present when the status
+ * is `completed`.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
+ * server responded with an unexpected value).
+ */
+ fun completedAt(): Optional = completedAt.getOptional("completed_at")
+
+ /**
+ * The conversation that this response belonged to. Input items and output items from this
+ * response were automatically added to this conversation.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -632,6 +646,15 @@ private constructor(
*/
@JsonProperty("background") @ExcludeMissing fun _background(): JsonField = background
+ /**
+ * Returns the raw JSON value of [completedAt].
+ *
+ * Unlike [completedAt], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("completed_at")
+ @ExcludeMissing
+ fun _completedAt(): JsonField = completedAt
+
/**
* Returns the raw JSON value of [conversation].
*
@@ -823,6 +846,7 @@ private constructor(
private var tools: JsonField>? = null
private var topP: JsonField? = null
private var background: JsonField = JsonMissing.of()
+ private var completedAt: JsonField = JsonMissing.of()
private var conversation: JsonField = JsonMissing.of()
private var maxOutputTokens: JsonField = JsonMissing.of()
private var maxToolCalls: JsonField = JsonMissing.of()
@@ -858,6 +882,7 @@ private constructor(
tools = response.tools.map { it.toMutableList() }
topP = response.topP
background = response.background
+ completedAt = response.completedAt
conversation = response.conversation
maxOutputTokens = response.maxOutputTokens
maxToolCalls = response.maxToolCalls
@@ -1434,8 +1459,33 @@ private constructor(
fun background(background: JsonField) = apply { this.background = background }
/**
- * The conversation that this response belongs to. Input items and output items from this
- * response are automatically added to this conversation.
+ * Unix timestamp (in seconds) of when this Response was completed. Only present when the
+ * status is `completed`.
+ */
+ fun completedAt(completedAt: Double?) = completedAt(JsonField.ofNullable(completedAt))
+
+ /**
+ * Alias for [Builder.completedAt].
+ *
+ * This unboxed primitive overload exists for backwards compatibility.
+ */
+ fun completedAt(completedAt: Double) = completedAt(completedAt as Double?)
+
+ /** Alias for calling [Builder.completedAt] with `completedAt.orElse(null)`. */
+ fun completedAt(completedAt: Optional) = completedAt(completedAt.getOrNull())
+
+ /**
+ * Sets [Builder.completedAt] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.completedAt] with a well-typed [Double] value instead.
+ * This method is primarily for setting the field to an undocumented or not yet supported
+ * value.
+ */
+ fun completedAt(completedAt: JsonField) = apply { this.completedAt = completedAt }
+
+ /**
+ * The conversation that this response belonged to. Input items and output items from this
+ * response were automatically added to this conversation.
*/
fun conversation(conversation: Conversation?) =
conversation(JsonField.ofNullable(conversation))
@@ -1842,6 +1892,7 @@ private constructor(
checkRequired("tools", tools).map { it.toImmutable() },
checkRequired("topP", topP),
background,
+ completedAt,
conversation,
maxOutputTokens,
maxToolCalls,
@@ -1888,6 +1939,7 @@ private constructor(
tools().forEach { it.validate() }
topP()
background()
+ completedAt()
conversation().ifPresent { it.validate() }
maxOutputTokens()
maxToolCalls()
@@ -1937,6 +1989,7 @@ private constructor(
(tools.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0) +
(if (topP.asKnown().isPresent) 1 else 0) +
(if (background.asKnown().isPresent) 1 else 0) +
+ (if (completedAt.asKnown().isPresent) 1 else 0) +
(conversation.asKnown().getOrNull()?.validity() ?: 0) +
(if (maxOutputTokens.asKnown().isPresent) 1 else 0) +
(if (maxToolCalls.asKnown().isPresent) 1 else 0) +
@@ -2942,8 +2995,8 @@ private constructor(
}
/**
- * The conversation that this response belongs to. Input items and output items from this
- * response are automatically added to this conversation.
+ * The conversation that this response belonged to. Input items and output items from this
+ * response were automatically added to this conversation.
*/
class Conversation
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
@@ -2958,7 +3011,7 @@ private constructor(
) : this(id, mutableMapOf())
/**
- * The unique ID of the conversation.
+ * The unique ID of the conversation that this response was associated with.
*
* @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).
@@ -3009,7 +3062,7 @@ private constructor(
additionalProperties = conversation.additionalProperties.toMutableMap()
}
- /** The unique ID of the conversation. */
+ /** The unique ID of the conversation that this response was associated with. */
fun id(id: String) = id(JsonField.of(id))
/**
@@ -3553,6 +3606,7 @@ private constructor(
tools == other.tools &&
topP == other.topP &&
background == other.background &&
+ completedAt == other.completedAt &&
conversation == other.conversation &&
maxOutputTokens == other.maxOutputTokens &&
maxToolCalls == other.maxToolCalls &&
@@ -3589,6 +3643,7 @@ private constructor(
tools,
topP,
background,
+ completedAt,
conversation,
maxOutputTokens,
maxToolCalls,
@@ -3612,5 +3667,5 @@ private constructor(
override fun hashCode(): Int = hashCode
override fun toString() =
- "Response{id=$id, createdAt=$createdAt, error=$error, incompleteDetails=$incompleteDetails, instructions=$instructions, metadata=$metadata, model=$model, object_=$object_, output=$output, parallelToolCalls=$parallelToolCalls, temperature=$temperature, toolChoice=$toolChoice, tools=$tools, topP=$topP, background=$background, conversation=$conversation, maxOutputTokens=$maxOutputTokens, maxToolCalls=$maxToolCalls, previousResponseId=$previousResponseId, prompt=$prompt, promptCacheKey=$promptCacheKey, promptCacheRetention=$promptCacheRetention, reasoning=$reasoning, safetyIdentifier=$safetyIdentifier, serviceTier=$serviceTier, status=$status, text=$text, topLogprobs=$topLogprobs, truncation=$truncation, usage=$usage, user=$user, additionalProperties=$additionalProperties}"
+ "Response{id=$id, createdAt=$createdAt, error=$error, incompleteDetails=$incompleteDetails, instructions=$instructions, metadata=$metadata, model=$model, object_=$object_, output=$output, parallelToolCalls=$parallelToolCalls, temperature=$temperature, toolChoice=$toolChoice, tools=$tools, topP=$topP, background=$background, completedAt=$completedAt, conversation=$conversation, maxOutputTokens=$maxOutputTokens, maxToolCalls=$maxToolCalls, previousResponseId=$previousResponseId, prompt=$prompt, promptCacheKey=$promptCacheKey, promptCacheRetention=$promptCacheRetention, reasoning=$reasoning, safetyIdentifier=$safetyIdentifier, serviceTier=$serviceTier, status=$status, text=$text, topLogprobs=$topLogprobs, truncation=$truncation, usage=$usage, user=$user, additionalProperties=$additionalProperties}"
}
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt
index 9238f30ce..0edb0bc1b 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactParams.kt
@@ -1393,6 +1393,7 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun string(): Optional = Optional.ofNullable(string)
+ /** A list of one or many input items to the model, containing different content types. */
fun responseInputItems(): Optional> =
Optional.ofNullable(responseInputItems)
@@ -1403,6 +1404,7 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun asString(): String = string.getOrThrow("string")
+ /** A list of one or many input items to the model, containing different content types. */
fun asResponseInputItems(): List =
responseInputItems.getOrThrow("responseInputItems")
@@ -1489,6 +1491,9 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
@JvmStatic fun ofString(string: String) = Input(string = string)
+ /**
+ * A list of one or many input items to the model, containing different content types.
+ */
@JvmStatic
fun ofResponseInputItems(responseInputItems: List) =
Input(responseInputItems = responseInputItems.toImmutable())
@@ -1500,6 +1505,9 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun visitString(string: String): T
+ /**
+ * A list of one or many input items to the model, containing different content types.
+ */
fun visitResponseInputItems(responseInputItems: List): T
/**
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt
index e7db40bc8..4003659d4 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItem.kt
@@ -49,6 +49,8 @@ private constructor(
fun id(): String = id.getRequired("id")
/**
+ * The encrypted content that was produced by compaction.
+ *
* @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).
*/
@@ -68,6 +70,8 @@ private constructor(
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
/**
+ * The identifier of the actor that created the item.
+ *
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
@@ -152,6 +156,7 @@ private constructor(
*/
fun id(id: JsonField) = apply { this.id = id }
+ /** The encrypted content that was produced by compaction. */
fun encryptedContent(encryptedContent: String) =
encryptedContent(JsonField.of(encryptedContent))
@@ -180,6 +185,7 @@ private constructor(
*/
fun type(type: JsonValue) = apply { this.type = type }
+ /** The identifier of the actor that created the item. */
fun createdBy(createdBy: String) = createdBy(JsonField.of(createdBy))
/**
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt
index 6df326db8..01abddaaa 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseCompactionItemParam.kt
@@ -40,6 +40,8 @@ private constructor(
) : this(encryptedContent, type, id, mutableMapOf())
/**
+ * The encrypted content of the compaction summary.
+ *
* @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).
*/
@@ -124,6 +126,7 @@ private constructor(
additionalProperties = responseCompactionItemParam.additionalProperties.toMutableMap()
}
+ /** The encrypted content of the compaction summary. */
fun encryptedContent(encryptedContent: String) =
encryptedContent(JsonField.of(encryptedContent))
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt
index 4dbc6e8d8..419072862 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionCallOutputItem.kt
@@ -18,7 +18,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** A text input to the model. */
+/** A piece of message content, such as text, an image, or a file. */
@JsonDeserialize(using = ResponseFunctionCallOutputItem.Deserializer::class)
@JsonSerialize(using = ResponseFunctionCallOutputItem.Serializer::class)
class ResponseFunctionCallOutputItem
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionShellToolCallOutput.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionShellToolCallOutput.kt
index fa41f3b0d..a70ccc315 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionShellToolCallOutput.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionShellToolCallOutput.kt
@@ -29,7 +29,7 @@ import java.util.Objects
import java.util.Optional
import kotlin.jvm.optionals.getOrNull
-/** The output of a shell tool call. */
+/** The output of a shell tool call that was emitted. */
class ResponseFunctionShellToolCallOutput
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -101,6 +101,8 @@ private constructor(
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
/**
+ * The identifier of the actor that created the item.
+ *
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
@@ -288,6 +290,7 @@ private constructor(
*/
fun type(type: JsonValue) = apply { this.type = type }
+ /** The identifier of the actor that created the item. */
fun createdBy(createdBy: String) = createdBy(JsonField.of(createdBy))
/**
@@ -387,7 +390,7 @@ private constructor(
type.let { if (it == JsonValue.from("shell_call_output")) 1 else 0 } +
(if (createdBy.asKnown().isPresent) 1 else 0)
- /** The content of a shell call output. */
+ /** The content of a shell tool call output that was emitted. */
class Output
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -418,18 +421,24 @@ private constructor(
fun outcome(): Outcome = outcome.getRequired("outcome")
/**
+ * The standard error output that was captured.
+ *
* @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 stderr(): String = stderr.getRequired("stderr")
/**
+ * The standard output that was captured.
+ *
* @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 stdout(): String = stdout.getRequired("stdout")
/**
+ * The identifier of the actor that created the item.
+ *
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
*/
@@ -540,6 +549,7 @@ private constructor(
fun exitOutcome(exitCode: Long) =
outcome(Outcome.Exit.builder().exitCode(exitCode).build())
+ /** The standard error output that was captured. */
fun stderr(stderr: String) = stderr(JsonField.of(stderr))
/**
@@ -551,6 +561,7 @@ private constructor(
*/
fun stderr(stderr: JsonField) = apply { this.stderr = stderr }
+ /** The standard output that was captured. */
fun stdout(stdout: String) = stdout(JsonField.of(stdout))
/**
@@ -562,6 +573,7 @@ private constructor(
*/
fun stdout(stdout: JsonField) = apply { this.stdout = stdout }
+ /** The identifier of the actor that created the item. */
fun createdBy(createdBy: String) = createdBy(JsonField.of(createdBy))
/**
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt
index 63cdffa43..f0590b840 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseFunctionWebSearch.kt
@@ -530,6 +530,7 @@ private constructor(
private constructor(
private val query: JsonField,
private val type: JsonValue,
+ private val queries: JsonField>,
private val sources: JsonField>,
private val additionalProperties: MutableMap,
) {
@@ -538,13 +539,16 @@ private constructor(
private constructor(
@JsonProperty("query") @ExcludeMissing query: JsonField = JsonMissing.of(),
@JsonProperty("type") @ExcludeMissing type: JsonValue = JsonMissing.of(),
+ @JsonProperty("queries")
+ @ExcludeMissing
+ queries: JsonField> = JsonMissing.of(),
@JsonProperty("sources")
@ExcludeMissing
sources: JsonField> = JsonMissing.of(),
- ) : this(query, type, sources, mutableMapOf())
+ ) : this(query, type, queries, sources, mutableMapOf())
/**
- * The search query.
+ * [DEPRECATED] The search query.
*
* @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
@@ -565,6 +569,14 @@ private constructor(
*/
@JsonProperty("type") @ExcludeMissing fun _type(): JsonValue = type
+ /**
+ * The search queries.
+ *
+ * @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if
+ * the server responded with an unexpected value).
+ */
+ fun queries(): Optional> = queries.getOptional("queries")
+
/**
* The sources used in the search.
*
@@ -580,6 +592,15 @@ private constructor(
*/
@JsonProperty("query") @ExcludeMissing fun _query(): JsonField = query
+ /**
+ * Returns the raw JSON value of [queries].
+ *
+ * Unlike [queries], this method doesn't throw if the JSON field has an unexpected type.
+ */
+ @JsonProperty("queries")
+ @ExcludeMissing
+ fun _queries(): JsonField> = queries
+
/**
* Returns the raw JSON value of [sources].
*
@@ -619,6 +640,7 @@ private constructor(
private var query: JsonField? = null
private var type: JsonValue = JsonValue.from("search")
+ private var queries: JsonField>? = null
private var sources: JsonField>? = null
private var additionalProperties: MutableMap = mutableMapOf()
@@ -626,11 +648,12 @@ private constructor(
internal fun from(search: Search) = apply {
query = search.query
type = search.type
+ queries = search.queries.map { it.toMutableList() }
sources = search.sources.map { it.toMutableList() }
additionalProperties = search.additionalProperties.toMutableMap()
}
- /** The search query. */
+ /** [DEPRECATED] The search query. */
fun query(query: String) = query(JsonField.of(query))
/**
@@ -656,6 +679,32 @@ private constructor(
*/
fun type(type: JsonValue) = apply { this.type = type }
+ /** The search queries. */
+ fun queries(queries: List) = queries(JsonField.of(queries))
+
+ /**
+ * Sets [Builder.queries] to an arbitrary JSON value.
+ *
+ * You should usually call [Builder.queries] with a well-typed `List` value
+ * instead. This method is primarily for setting the field to an undocumented or not
+ * yet supported value.
+ */
+ fun queries(queries: JsonField>) = apply {
+ this.queries = queries.map { it.toMutableList() }
+ }
+
+ /**
+ * Adds a single [String] to [queries].
+ *
+ * @throws IllegalStateException if the field was previously set to a non-list.
+ */
+ fun addQuery(query: String) = apply {
+ queries =
+ (queries ?: JsonField.of(mutableListOf())).also {
+ checkKnown("queries", it).add(query)
+ }
+ }
+
/** The sources used in the search. */
fun sources(sources: List) = sources(JsonField.of(sources))
@@ -720,6 +769,7 @@ private constructor(
Search(
checkRequired("query", query),
type,
+ (queries ?: JsonMissing.of()).map { it.toImmutable() },
(sources ?: JsonMissing.of()).map { it.toImmutable() },
additionalProperties.toMutableMap(),
)
@@ -738,6 +788,7 @@ private constructor(
throw OpenAIInvalidDataException("'type' is invalid, received $it")
}
}
+ queries()
sources().ifPresent { it.forEach { it.validate() } }
validated = true
}
@@ -760,6 +811,7 @@ private constructor(
internal fun validity(): Int =
(if (query.asKnown().isPresent) 1 else 0) +
type.let { if (it == JsonValue.from("search")) 1 else 0 } +
+ (queries.asKnown().getOrNull()?.size ?: 0) +
(sources.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
/** A source used in the search. */
@@ -971,18 +1023,19 @@ private constructor(
return other is Search &&
query == other.query &&
type == other.type &&
+ queries == other.queries &&
sources == other.sources &&
additionalProperties == other.additionalProperties
}
private val hashCode: Int by lazy {
- Objects.hash(query, type, sources, additionalProperties)
+ Objects.hash(query, type, queries, sources, additionalProperties)
}
override fun hashCode(): Int = hashCode
override fun toString() =
- "Search{query=$query, type=$type, sources=$sources, additionalProperties=$additionalProperties}"
+ "Search{query=$query, type=$type, queries=$queries, sources=$sources, additionalProperties=$additionalProperties}"
}
/** Action type "open_page" - Opens a specific URL from search results. */
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt
index bb24811ec..bcb5b85cf 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseInputItem.kt
@@ -3084,6 +3084,7 @@ private constructor(
/** A JSON string of the output of the function tool call. */
fun string(): Optional = Optional.ofNullable(string)
+ /** An array of content outputs (text, image, file) for the function tool call. */
fun responseFunctionCallOutputItemList():
Optional> =
Optional.ofNullable(responseFunctionCallOutputItemList)
@@ -3096,6 +3097,7 @@ private constructor(
/** A JSON string of the output of the function tool call. */
fun asString(): String = string.getOrThrow("string")
+ /** An array of content outputs (text, image, file) for the function tool call. */
fun asResponseFunctionCallOutputItemList(): List =
responseFunctionCallOutputItemList.getOrThrow("responseFunctionCallOutputItemList")
@@ -3186,6 +3188,7 @@ private constructor(
/** A JSON string of the output of the function tool call. */
@JvmStatic fun ofString(string: String) = Output(string = string)
+ /** An array of content outputs (text, image, file) for the function tool call. */
@JvmStatic
fun ofResponseFunctionCallOutputItemList(
responseFunctionCallOutputItemList: List
@@ -3204,6 +3207,7 @@ private constructor(
/** A JSON string of the output of the function tool call. */
fun visitString(string: String): T
+ /** An array of content outputs (text, image, file) for the function tool call. */
fun visitResponseFunctionCallOutputItemList(
responseFunctionCallOutputItemList: List
): T
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt
index 3ef65a7ee..14e650e8e 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseItem.kt
@@ -118,7 +118,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun shellCall(): Optional = Optional.ofNullable(shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun shellCallOutput(): Optional =
Optional.ofNullable(shellCallOutput)
@@ -241,7 +241,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun asShellCall(): ResponseFunctionShellToolCall = shellCall.getOrThrow("shellCall")
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun asShellCallOutput(): ResponseFunctionShellToolCallOutput =
shellCallOutput.getOrThrow("shellCallOutput")
@@ -650,7 +650,7 @@ private constructor(
fun ofShellCall(shellCall: ResponseFunctionShellToolCall) =
ResponseItem(shellCall = shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
@JvmStatic
fun ofShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput) =
ResponseItem(shellCallOutput = shellCallOutput)
@@ -740,7 +740,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun visitShellCall(shellCall: ResponseFunctionShellToolCall): T
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun visitShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput): T
/** A tool call that applies file diffs by creating, deleting, or updating files. */
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt
index 7db136769..8267fa37e 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputItem.kt
@@ -115,7 +115,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun shellCall(): Optional = Optional.ofNullable(shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun shellCallOutput(): Optional =
Optional.ofNullable(shellCallOutput)
@@ -233,7 +233,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun asShellCall(): ResponseFunctionShellToolCall = shellCall.getOrThrow("shellCall")
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun asShellCallOutput(): ResponseFunctionShellToolCallOutput =
shellCallOutput.getOrThrow("shellCallOutput")
@@ -603,7 +603,7 @@ private constructor(
fun ofShellCall(shellCall: ResponseFunctionShellToolCall) =
ResponseOutputItem(shellCall = shellCall)
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
@JvmStatic
fun ofShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput) =
ResponseOutputItem(shellCallOutput = shellCallOutput)
@@ -700,7 +700,7 @@ private constructor(
/** A tool call that executes one or more shell commands in a managed environment. */
fun visitShellCall(shellCall: ResponseFunctionShellToolCall): T
- /** The output of a shell tool call. */
+ /** The output of a shell tool call that was emitted. */
fun visitShellCallOutput(shellCallOutput: ResponseFunctionShellToolCallOutput): T
/** A tool call that applies file diffs by creating, deleting, or updating files. */
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputText.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputText.kt
index d252e82b9..8787d720d 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputText.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/ResponseOutputText.kt
@@ -329,7 +329,7 @@ private constructor(
type.let { if (it == JsonValue.from("output_text")) 1 else 0 } +
(logprobs.asKnown().getOrNull()?.sumOf { it.validity().toInt() } ?: 0)
- /** A citation to a file. */
+ /** An annotation that applies to a span of output text. */
@JsonDeserialize(using = Annotation.Deserializer::class)
@JsonSerialize(using = Annotation.Serializer::class)
class Annotation
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/StructuredResponse.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/StructuredResponse.kt
index 401fdff17..3bb3473d0 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/StructuredResponse.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/StructuredResponse.kt
@@ -116,6 +116,9 @@ class StructuredResponse(
/** @see Response.background */
fun background(): Optional = rawResponse.background()
+ /** @see Response.completedAt */
+ fun completedAt(): Optional = rawResponse.completedAt()
+
/** @see Response.conversation */
fun conversation(): Optional = rawResponse.conversation()
@@ -208,6 +211,9 @@ class StructuredResponse(
/** @see Response._background */
fun _background(): JsonField = rawResponse._background()
+ /** @see Response._completedAt */
+ fun _completedAt(): JsonField = rawResponse._completedAt()
+
/** @see Response._conversation() */
fun _conversation(): JsonField = rawResponse._conversation()
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt
index 0fcb0784a..5cd262558 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/Tool.kt
@@ -3406,6 +3406,8 @@ private constructor(
fun fileIds(): Optional> = fileIds.getOptional("file_ids")
/**
+ * The memory limit for the code interpreter container.
+ *
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g.
* if the server responded with an unexpected value).
*/
@@ -3509,6 +3511,7 @@ private constructor(
}
}
+ /** The memory limit for the code interpreter container. */
fun memoryLimit(memoryLimit: MemoryLimit?) =
memoryLimit(JsonField.ofNullable(memoryLimit))
@@ -3600,6 +3603,7 @@ private constructor(
(fileIds.asKnown().getOrNull()?.size ?: 0) +
(memoryLimit.asKnown().getOrNull()?.validity() ?: 0)
+ /** The memory limit for the code interpreter container. */
class MemoryLimit
@JsonCreator
private constructor(private val value: JsonField) : Enum {
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt b/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt
index 8fa7ff5cb..101005342 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/responses/inputtokens/InputTokenCountParams.kt
@@ -145,8 +145,7 @@ private constructor(
fun text(): Optional = body.text()
/**
- * How the model should select which tool (or tools) to use when generating a response. See the
- * `tools` parameter to see how to specify which tools the model can call.
+ * Controls which tool the model should use, if any.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -487,10 +486,7 @@ private constructor(
*/
fun text(text: JsonField) = apply { body.text(text) }
- /**
- * How the model should select which tool (or tools) to use when generating a response. See
- * the `tools` parameter to see how to specify which tools the model can call.
- */
+ /** Controls which tool the model should use, if any. */
fun toolChoice(toolChoice: ToolChoice?) = apply { body.toolChoice(toolChoice) }
/** Alias for calling [Builder.toolChoice] with `toolChoice.orElse(null)`. */
@@ -945,8 +941,7 @@ private constructor(
fun text(): Optional = text.getOptional("text")
/**
- * How the model should select which tool (or tools) to use when generating a response. See
- * the `tools` parameter to see how to specify which tools the model can call.
+ * Controls which tool the model should use, if any.
*
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
* server responded with an unexpected value).
@@ -1313,10 +1308,7 @@ private constructor(
*/
fun text(text: JsonField) = apply { this.text = text }
- /**
- * How the model should select which tool (or tools) to use when generating a response.
- * See the `tools` parameter to see how to specify which tools the model can call.
- */
+ /** Controls which tool the model should use, if any. */
fun toolChoice(toolChoice: ToolChoice?) = toolChoice(JsonField.ofNullable(toolChoice))
/** Alias for calling [Builder.toolChoice] with `toolChoice.orElse(null)`. */
@@ -1860,6 +1852,7 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun string(): Optional = Optional.ofNullable(string)
+ /** A list of one or many input items to the model, containing different content types. */
fun responseInputItems(): Optional> =
Optional.ofNullable(responseInputItems)
@@ -1870,6 +1863,7 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun asString(): String = string.getOrThrow("string")
+ /** A list of one or many input items to the model, containing different content types. */
fun asResponseInputItems(): List =
responseInputItems.getOrThrow("responseInputItems")
@@ -1956,6 +1950,9 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
@JvmStatic fun ofString(string: String) = Input(string = string)
+ /**
+ * A list of one or many input items to the model, containing different content types.
+ */
@JvmStatic
fun ofResponseInputItems(responseInputItems: List) =
Input(responseInputItems = responseInputItems.toImmutable())
@@ -1967,6 +1964,9 @@ private constructor(
/** A text input to the model, equivalent to a text input with the `user` role. */
fun visitString(string: String): T
+ /**
+ * A list of one or many input items to the model, containing different content types.
+ */
fun visitResponseInputItems(responseInputItems: List): T
/**
@@ -2415,10 +2415,7 @@ private constructor(
"Text{format=$format, verbosity=$verbosity, additionalProperties=$additionalProperties}"
}
- /**
- * How the model should select which tool (or tools) to use when generating a response. See the
- * `tools` parameter to see how to specify which tools the model can call.
- */
+ /** Controls which tool the model should use, if any. */
@JsonDeserialize(using = ToolChoice.Deserializer::class)
@JsonSerialize(using = ToolChoice.Serializer::class)
class ToolChoice
diff --git a/openai-java-core/src/main/kotlin/com/openai/models/videos/VideoCreateError.kt b/openai-java-core/src/main/kotlin/com/openai/models/videos/VideoCreateError.kt
index 6c17dcc2c..e7995b6ce 100644
--- a/openai-java-core/src/main/kotlin/com/openai/models/videos/VideoCreateError.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/models/videos/VideoCreateError.kt
@@ -15,6 +15,7 @@ import com.openai.errors.OpenAIInvalidDataException
import java.util.Collections
import java.util.Objects
+/** An error that occurred while generating the response. */
class VideoCreateError
@JsonCreator(mode = JsonCreator.Mode.DISABLED)
private constructor(
@@ -30,12 +31,16 @@ private constructor(
) : this(code, message, mutableMapOf())
/**
+ * A machine-readable error code that was returned.
+ *
* @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 code(): String = code.getRequired("code")
/**
+ * A human-readable description of the error that was returned.
+ *
* @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).
*/
@@ -95,6 +100,7 @@ private constructor(
additionalProperties = videoCreateError.additionalProperties.toMutableMap()
}
+ /** A machine-readable error code that was returned. */
fun code(code: String) = code(JsonField.of(code))
/**
@@ -105,6 +111,7 @@ private constructor(
*/
fun code(code: JsonField) = apply { this.code = code }
+ /** A human-readable description of the error that was returned. */
fun message(message: String) = message(JsonField.of(message))
/**
diff --git a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt
index 5789e8de7..42a08b7dc 100644
--- a/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/services/async/ImageServiceAsync.kt
@@ -43,7 +43,8 @@ interface ImageServiceAsync {
/**
* Creates an edited or extended image given one or more source images and a prompt. This
- * endpoint only supports `gpt-image-1` and `dall-e-2`.
+ * endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`)
+ * and `dall-e-2`.
*/
fun edit(params: ImageEditParams): CompletableFuture =
edit(params, RequestOptions.none())
@@ -56,7 +57,8 @@ interface ImageServiceAsync {
/**
* Creates an edited or extended image given one or more source images and a prompt. This
- * endpoint only supports `gpt-image-1` and `dall-e-2`.
+ * endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`)
+ * and `dall-e-2`.
*/
fun editStreaming(params: ImageEditParams): AsyncStreamResponse =
editStreaming(params, RequestOptions.none())
diff --git a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt
index ad3ad5e4d..1cd9e749c 100644
--- a/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt
+++ b/openai-java-core/src/main/kotlin/com/openai/services/blocking/ImageService.kt
@@ -41,7 +41,8 @@ interface ImageService {
/**
* Creates an edited or extended image given one or more source images and a prompt. This
- * endpoint only supports `gpt-image-1` and `dall-e-2`.
+ * endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`)
+ * and `dall-e-2`.
*/
fun edit(params: ImageEditParams): ImagesResponse = edit(params, RequestOptions.none())
@@ -53,7 +54,8 @@ interface ImageService {
/**
* Creates an edited or extended image given one or more source images and a prompt. This
- * endpoint only supports `gpt-image-1` and `dall-e-2`.
+ * endpoint supports GPT Image models (`gpt-image-1.5`, `gpt-image-1`, and `gpt-image-1-mini`)
+ * and `dall-e-2`.
*/
@MustBeClosed
fun editStreaming(params: ImageEditParams): StreamResponse =
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/audio/speech/SpeechCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/audio/speech/SpeechCreateParamsTest.kt
index 012e6eeaa..32487da51 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/audio/speech/SpeechCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/audio/speech/SpeechCreateParamsTest.kt
@@ -11,8 +11,8 @@ internal class SpeechCreateParamsTest {
fun create() {
SpeechCreateParams.builder()
.input("input")
- .model(SpeechModel.TTS_1)
- .voice(SpeechCreateParams.Voice.ALLOY)
+ .model(SpeechModel.of("string"))
+ .voice(SpeechCreateParams.Voice.ASH)
.instructions("instructions")
.responseFormat(SpeechCreateParams.ResponseFormat.MP3)
.speed(0.25)
@@ -25,8 +25,8 @@ internal class SpeechCreateParamsTest {
val params =
SpeechCreateParams.builder()
.input("input")
- .model(SpeechModel.TTS_1)
- .voice(SpeechCreateParams.Voice.ALLOY)
+ .model(SpeechModel.of("string"))
+ .voice(SpeechCreateParams.Voice.ASH)
.instructions("instructions")
.responseFormat(SpeechCreateParams.ResponseFormat.MP3)
.speed(0.25)
@@ -36,8 +36,8 @@ internal class SpeechCreateParamsTest {
val body = params._body()
assertThat(body.input()).isEqualTo("input")
- assertThat(body.model()).isEqualTo(SpeechModel.TTS_1)
- assertThat(body.voice()).isEqualTo(SpeechCreateParams.Voice.ALLOY)
+ assertThat(body.model()).isEqualTo(SpeechModel.of("string"))
+ assertThat(body.voice()).isEqualTo(SpeechCreateParams.Voice.ASH)
assertThat(body.instructions()).contains("instructions")
assertThat(body.responseFormat()).contains(SpeechCreateParams.ResponseFormat.MP3)
assertThat(body.speed()).contains(0.25)
@@ -49,14 +49,14 @@ internal class SpeechCreateParamsTest {
val params =
SpeechCreateParams.builder()
.input("input")
- .model(SpeechModel.TTS_1)
- .voice(SpeechCreateParams.Voice.ALLOY)
+ .model(SpeechModel.of("string"))
+ .voice(SpeechCreateParams.Voice.ASH)
.build()
val body = params._body()
assertThat(body.input()).isEqualTo("input")
- assertThat(body.model()).isEqualTo(SpeechModel.TTS_1)
- assertThat(body.voice()).isEqualTo(SpeechCreateParams.Voice.ALLOY)
+ assertThat(body.model()).isEqualTo(SpeechModel.of("string"))
+ assertThat(body.voice()).isEqualTo(SpeechCreateParams.Voice.ASH)
}
}
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParamsTest.kt
index 3d3b3ef60..074e0fc56 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/audio/transcriptions/TranscriptionCreateParamsTest.kt
@@ -15,7 +15,7 @@ internal class TranscriptionCreateParamsTest {
fun create() {
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
@@ -33,7 +33,7 @@ internal class TranscriptionCreateParamsTest {
val params =
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
@@ -58,7 +58,7 @@ internal class TranscriptionCreateParamsTest {
.isEqualTo(
mapOf(
"file" to MultipartField.of("some content".byteInputStream()),
- "model" to MultipartField.of(AudioModel.WHISPER_1),
+ "model" to MultipartField.of(AudioModel.GPT_4O_TRANSCRIBE),
"chunking_strategy" to
MultipartField.of(TranscriptionCreateParams.ChunkingStrategy.ofAuto()),
"include" to MultipartField.of(listOf(TranscriptionInclude.LOGPROBS)),
@@ -84,7 +84,7 @@ internal class TranscriptionCreateParamsTest {
val params =
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.build()
val body = params._body()
@@ -100,7 +100,7 @@ internal class TranscriptionCreateParamsTest {
.isEqualTo(
mapOf(
"file" to MultipartField.of("some content".byteInputStream()),
- "model" to MultipartField.of(AudioModel.WHISPER_1),
+ "model" to MultipartField.of(AudioModel.GPT_4O_TRANSCRIBE),
)
.mapValues { (_, field) ->
field.map { (it as? ByteArray)?.inputStream() ?: it }
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantCreateParamsTest.kt
index 58c988692..fb5b24aab 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantCreateParamsTest.kt
@@ -15,7 +15,7 @@ internal class AssistantCreateParamsTest {
@Test
fun create() {
AssistantCreateParams.builder()
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.description("description")
.instructions("instructions")
.metadata(
@@ -63,7 +63,7 @@ internal class AssistantCreateParamsTest {
fun body() {
val params =
AssistantCreateParams.builder()
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.description("description")
.instructions("instructions")
.metadata(
@@ -113,7 +113,7 @@ internal class AssistantCreateParamsTest {
val body = params._body()
- assertThat(body.model()).isEqualTo(ChatModel.GPT_5_2)
+ assertThat(body.model()).isEqualTo(ChatModel.GPT_4O)
assertThat(body.description()).contains("description")
assertThat(body.instructions()).contains("instructions")
assertThat(body.metadata())
@@ -161,10 +161,10 @@ internal class AssistantCreateParamsTest {
@Test
fun bodyWithoutOptionalFields() {
- val params = AssistantCreateParams.builder().model(ChatModel.GPT_5_2).build()
+ val params = AssistantCreateParams.builder().model(ChatModel.GPT_4O).build()
val body = params._body()
- assertThat(body.model()).isEqualTo(ChatModel.GPT_5_2)
+ assertThat(body.model()).isEqualTo(ChatModel.GPT_4O)
}
}
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantUpdateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantUpdateParamsTest.kt
index 95efe8520..75fd404fa 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantUpdateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/assistants/AssistantUpdateParamsTest.kt
@@ -22,7 +22,7 @@ internal class AssistantUpdateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(AssistantUpdateParams.Model.GPT_5)
+ .model(AssistantUpdateParams.Model.of("string"))
.name("name")
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -67,7 +67,7 @@ internal class AssistantUpdateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(AssistantUpdateParams.Model.GPT_5)
+ .model(AssistantUpdateParams.Model.of("string"))
.name("name")
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -100,7 +100,7 @@ internal class AssistantUpdateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- assertThat(body.model()).contains(AssistantUpdateParams.Model.GPT_5)
+ assertThat(body.model()).contains(AssistantUpdateParams.Model.of("string"))
assertThat(body.name()).contains("name")
assertThat(body.reasoningEffort()).contains(ReasoningEffort.NONE)
assertThat(body.responseFormat()).contains(AssistantResponseFormatOption.ofAuto())
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParamsTest.kt
index e2ab4cc06..fbecf7978 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/ThreadCreateAndRunParamsTest.kt
@@ -24,7 +24,7 @@ internal class ThreadCreateAndRunParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
@@ -128,7 +128,7 @@ internal class ThreadCreateAndRunParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
@@ -231,7 +231,7 @@ internal class ThreadCreateAndRunParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- assertThat(body.model()).contains(ChatModel.GPT_5_2)
+ assertThat(body.model()).contains(ChatModel.of("string"))
assertThat(body.parallelToolCalls()).contains(true)
assertThat(body.responseFormat()).contains(AssistantResponseFormatOption.ofAuto())
assertThat(body.temperature()).contains(1.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/runs/RunCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/runs/RunCreateParamsTest.kt
index b28a16856..ef433e358 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/runs/RunCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/beta/threads/runs/RunCreateParamsTest.kt
@@ -49,7 +49,7 @@ internal class RunCreateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -109,7 +109,7 @@ internal class RunCreateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -178,7 +178,7 @@ internal class RunCreateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -225,7 +225,7 @@ internal class RunCreateParamsTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- assertThat(body.model()).contains(ChatModel.GPT_5_2)
+ assertThat(body.model()).contains(ChatModel.of("string"))
assertThat(body.parallelToolCalls()).contains(true)
assertThat(body.reasoningEffort()).contains(ReasoningEffort.NONE)
assertThat(body.responseFormat()).contains(AssistantResponseFormatOption.ofAuto())
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParamTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParamTest.kt
index 84a4b014b..f9f16bf1d 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParamTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionAudioParamTest.kt
@@ -14,11 +14,11 @@ internal class ChatCompletionAudioParamTest {
val chatCompletionAudioParam =
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
assertThat(chatCompletionAudioParam.format()).isEqualTo(ChatCompletionAudioParam.Format.WAV)
- assertThat(chatCompletionAudioParam.voice()).isEqualTo(ChatCompletionAudioParam.Voice.ALLOY)
+ assertThat(chatCompletionAudioParam.voice()).isEqualTo(ChatCompletionAudioParam.Voice.ASH)
}
@Test
@@ -27,7 +27,7 @@ internal class ChatCompletionAudioParamTest {
val chatCompletionAudioParam =
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
val roundtrippedChatCompletionAudioParam =
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParamsTest.kt
index 4b7c1b12f..9a27b3462 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/chat/completions/ChatCompletionCreateParamsTest.kt
@@ -20,11 +20,11 @@ internal class ChatCompletionCreateParamsTest {
.addMessage(
ChatCompletionDeveloperMessageParam.builder().content("string").name("name").build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
@@ -124,11 +124,11 @@ internal class ChatCompletionCreateParamsTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
@@ -229,12 +229,12 @@ internal class ChatCompletionCreateParamsTest {
.build()
)
)
- assertThat(body.model()).isEqualTo(ChatModel.GPT_5_2)
+ assertThat(body.model()).isEqualTo(ChatModel.GPT_4O)
assertThat(body.audio())
.contains(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
assertThat(body.frequencyPenalty()).contains(-2.0)
@@ -356,7 +356,7 @@ internal class ChatCompletionCreateParamsTest {
val params =
ChatCompletionCreateParams.builder()
.addDeveloperMessage("string")
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.build()
val body = params._body()
@@ -367,7 +367,7 @@ internal class ChatCompletionCreateParamsTest {
ChatCompletionDeveloperMessageParam.builder().content("string").build()
)
)
- assertThat(body.model()).isEqualTo(ChatModel.GPT_5_2)
+ assertThat(body.model()).isEqualTo(ChatModel.GPT_4O)
}
@Test
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/completions/CompletionCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/completions/CompletionCreateParamsTest.kt
index 09768fe95..df9ff047c 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/completions/CompletionCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/completions/CompletionCreateParamsTest.kt
@@ -12,7 +12,7 @@ internal class CompletionCreateParamsTest {
@Test
fun create() {
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
@@ -45,7 +45,7 @@ internal class CompletionCreateParamsTest {
fun body() {
val params =
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
@@ -75,7 +75,7 @@ internal class CompletionCreateParamsTest {
val body = params._body()
- assertThat(body.model()).isEqualTo(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ assertThat(body.model()).isEqualTo(CompletionCreateParams.Model.of("string"))
assertThat(body.prompt())
.contains(CompletionCreateParams.Prompt.ofString("This is a test."))
assertThat(body.bestOf()).contains(0L)
@@ -110,13 +110,13 @@ internal class CompletionCreateParamsTest {
fun bodyWithoutOptionalFields() {
val params =
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.build()
val body = params._body()
- assertThat(body.model()).isEqualTo(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ assertThat(body.model()).isEqualTo(CompletionCreateParams.Model.of("string"))
assertThat(body.prompt())
.contains(CompletionCreateParams.Prompt.ofString("This is a test."))
}
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt
index 8e4bc7853..61b845f3a 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/conversations/items/ConversationItemTest.kt
@@ -297,6 +297,7 @@ internal class ConversationItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -343,6 +344,7 @@ internal class ConversationItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/embeddings/EmbeddingCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/embeddings/EmbeddingCreateParamsTest.kt
index 8a49933a4..8f2a5d300 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/embeddings/EmbeddingCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/embeddings/EmbeddingCreateParamsTest.kt
@@ -11,7 +11,7 @@ internal class EmbeddingCreateParamsTest {
fun create() {
EmbeddingCreateParams.builder()
.input("The quick brown fox jumped over the lazy dog")
- .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
.dimensions(1L)
.encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT)
.user("user-1234")
@@ -23,7 +23,7 @@ internal class EmbeddingCreateParamsTest {
val params =
EmbeddingCreateParams.builder()
.input("The quick brown fox jumped over the lazy dog")
- .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
.dimensions(1L)
.encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT)
.user("user-1234")
@@ -35,7 +35,7 @@ internal class EmbeddingCreateParamsTest {
.isEqualTo(
EmbeddingCreateParams.Input.ofString("The quick brown fox jumped over the lazy dog")
)
- assertThat(body.model()).isEqualTo(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ assertThat(body.model()).isEqualTo(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
assertThat(body.dimensions()).contains(1L)
assertThat(body.encodingFormat()).contains(EmbeddingCreateParams.EncodingFormat.FLOAT)
assertThat(body.user()).contains("user-1234")
@@ -46,7 +46,7 @@ internal class EmbeddingCreateParamsTest {
val params =
EmbeddingCreateParams.builder()
.input("The quick brown fox jumped over the lazy dog")
- .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
.build()
val body = params._body()
@@ -55,6 +55,6 @@ internal class EmbeddingCreateParamsTest {
.isEqualTo(
EmbeddingCreateParams.Input.ofString("The quick brown fox jumped over the lazy dog")
)
- assertThat(body.model()).isEqualTo(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ assertThat(body.model()).isEqualTo(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
}
}
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/finetuning/jobs/JobCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/finetuning/jobs/JobCreateParamsTest.kt
index 28cd1a8b2..3b74ae142 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/finetuning/jobs/JobCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/finetuning/jobs/JobCreateParamsTest.kt
@@ -19,7 +19,7 @@ internal class JobCreateParamsTest {
@Test
fun create() {
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -108,7 +108,7 @@ internal class JobCreateParamsTest {
fun body() {
val params =
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -194,7 +194,7 @@ internal class JobCreateParamsTest {
val body = params._body()
- assertThat(body.model()).isEqualTo(JobCreateParams.Model.BABBAGE_002)
+ assertThat(body.model()).isEqualTo(JobCreateParams.Model.GPT_4O_MINI)
assertThat(body.trainingFile()).isEqualTo("file-abc123")
assertThat(body.hyperparameters())
.contains(
@@ -286,13 +286,13 @@ internal class JobCreateParamsTest {
fun bodyWithoutOptionalFields() {
val params =
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.build()
val body = params._body()
- assertThat(body.model()).isEqualTo(JobCreateParams.Model.BABBAGE_002)
+ assertThat(body.model()).isEqualTo(JobCreateParams.Model.GPT_4O_MINI)
assertThat(body.trainingFile()).isEqualTo("file-abc123")
}
}
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageCreateVariationParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageCreateVariationParamsTest.kt
index 46f18e271..3ae9eb785 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageCreateVariationParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageCreateVariationParamsTest.kt
@@ -13,7 +13,7 @@ internal class ImageCreateVariationParamsTest {
fun create() {
ImageCreateVariationParams.builder()
.image("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.responseFormat(ImageCreateVariationParams.ResponseFormat.URL)
.size(ImageCreateVariationParams.Size._1024X1024)
@@ -26,7 +26,7 @@ internal class ImageCreateVariationParamsTest {
val params =
ImageCreateVariationParams.builder()
.image("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.responseFormat(ImageCreateVariationParams.ResponseFormat.URL)
.size(ImageCreateVariationParams.Size._1024X1024)
@@ -46,7 +46,7 @@ internal class ImageCreateVariationParamsTest {
.isEqualTo(
mapOf(
"image" to MultipartField.of("some content".byteInputStream()),
- "model" to MultipartField.of(ImageModel.GPT_IMAGE_1_5),
+ "model" to MultipartField.of(ImageModel.of("string")),
"n" to MultipartField.of(1L),
"response_format" to
MultipartField.of(ImageCreateVariationParams.ResponseFormat.URL),
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageEditParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageEditParamsTest.kt
index 5ec0f76b7..645ca843e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageEditParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageEditParamsTest.kt
@@ -17,7 +17,7 @@ internal class ImageEditParamsTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -38,7 +38,7 @@ internal class ImageEditParamsTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -74,7 +74,7 @@ internal class ImageEditParamsTest {
"background" to MultipartField.of(ImageEditParams.Background.TRANSPARENT),
"input_fidelity" to MultipartField.of(ImageEditParams.InputFidelity.HIGH),
"mask" to MultipartField.of("some content".byteInputStream()),
- "model" to MultipartField.of(ImageModel.GPT_IMAGE_1_5),
+ "model" to MultipartField.of(ImageModel.of("string")),
"n" to MultipartField.of(1L),
"output_compression" to MultipartField.of(100L),
"output_format" to MultipartField.of(ImageEditParams.OutputFormat.PNG),
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageGenerateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageGenerateParamsTest.kt
index f8b4b6323..b71214834 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/images/ImageGenerateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/images/ImageGenerateParamsTest.kt
@@ -12,7 +12,7 @@ internal class ImageGenerateParamsTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
@@ -32,7 +32,7 @@ internal class ImageGenerateParamsTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
@@ -49,7 +49,7 @@ internal class ImageGenerateParamsTest {
assertThat(body.prompt()).isEqualTo("A cute baby sea otter")
assertThat(body.background()).contains(ImageGenerateParams.Background.TRANSPARENT)
- assertThat(body.model()).contains(ImageModel.GPT_IMAGE_1_5)
+ assertThat(body.model()).contains(ImageModel.of("string"))
assertThat(body.moderation()).contains(ImageGenerateParams.Moderation.LOW)
assertThat(body.n()).contains(1L)
assertThat(body.outputCompression()).contains(100L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/moderations/ModerationCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/moderations/ModerationCreateParamsTest.kt
index d9365fd0f..661b27b6b 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/moderations/ModerationCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/moderations/ModerationCreateParamsTest.kt
@@ -11,7 +11,7 @@ internal class ModerationCreateParamsTest {
fun create() {
ModerationCreateParams.builder()
.input("I want to kill them.")
- .model(ModerationModel.OMNI_MODERATION_LATEST)
+ .model(ModerationModel.of("string"))
.build()
}
@@ -20,14 +20,14 @@ internal class ModerationCreateParamsTest {
val params =
ModerationCreateParams.builder()
.input("I want to kill them.")
- .model(ModerationModel.OMNI_MODERATION_LATEST)
+ .model(ModerationModel.of("string"))
.build()
val body = params._body()
assertThat(body.input())
.isEqualTo(ModerationCreateParams.Input.ofString("I want to kill them."))
- assertThat(body.model()).contains(ModerationModel.OMNI_MODERATION_LATEST)
+ assertThat(body.model()).contains(ModerationModel.of("string"))
}
@Test
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/AudioTranscriptionTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/AudioTranscriptionTest.kt
index bfa9781c4..581bf7067 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/AudioTranscriptionTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/AudioTranscriptionTest.kt
@@ -14,12 +14,12 @@ internal class AudioTranscriptionTest {
val audioTranscription =
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
assertThat(audioTranscription.language()).contains("language")
- assertThat(audioTranscription.model()).contains(AudioTranscription.Model.WHISPER_1)
+ assertThat(audioTranscription.model()).contains(AudioTranscription.Model.of("string"))
assertThat(audioTranscription.prompt()).contains("prompt")
}
@@ -29,7 +29,7 @@ internal class AudioTranscriptionTest {
val audioTranscription =
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigInputTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigInputTest.kt
index be3b69f92..7b4b0b9c0 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigInputTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigInputTest.kt
@@ -27,7 +27,7 @@ internal class RealtimeAudioConfigInputTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -62,7 +62,7 @@ internal class RealtimeAudioConfigInputTest {
.contains(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -100,7 +100,7 @@ internal class RealtimeAudioConfigInputTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutputTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutputTest.kt
index aede10b62..7e57f3387 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutputTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigOutputTest.kt
@@ -20,7 +20,7 @@ internal class RealtimeAudioConfigOutputTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
assertThat(realtimeAudioConfigOutput.format())
@@ -33,8 +33,7 @@ internal class RealtimeAudioConfigOutputTest {
)
)
assertThat(realtimeAudioConfigOutput.speed()).contains(0.25)
- assertThat(realtimeAudioConfigOutput.voice())
- .contains(RealtimeAudioConfigOutput.Voice.ALLOY)
+ assertThat(realtimeAudioConfigOutput.voice()).contains(RealtimeAudioConfigOutput.Voice.ASH)
}
@Test
@@ -49,7 +48,7 @@ internal class RealtimeAudioConfigOutputTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
val roundtrippedRealtimeAudioConfigOutput =
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigTest.kt
index 016535249..15987328e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeAudioConfigTest.kt
@@ -29,7 +29,7 @@ internal class RealtimeAudioConfigTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -54,7 +54,7 @@ internal class RealtimeAudioConfigTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -76,7 +76,7 @@ internal class RealtimeAudioConfigTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -102,7 +102,7 @@ internal class RealtimeAudioConfigTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
}
@@ -128,7 +128,7 @@ internal class RealtimeAudioConfigTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -153,7 +153,7 @@ internal class RealtimeAudioConfigTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeClientEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeClientEventTest.kt
index 722e04921..0975751ee 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeClientEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeClientEventTest.kt
@@ -422,12 +422,12 @@ internal class RealtimeClientEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
@@ -513,13 +513,13 @@ internal class RealtimeClientEventTest {
.build()
)
.voice(
- RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY
+ RealtimeResponseCreateAudioOutput.Output.Voice.ASH
)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
@@ -604,7 +604,7 @@ internal class RealtimeClientEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -629,7 +629,7 @@ internal class RealtimeClientEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -640,7 +640,7 @@ internal class RealtimeClientEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -712,7 +712,7 @@ internal class RealtimeClientEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -739,7 +739,7 @@ internal class RealtimeClientEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -750,7 +750,7 @@ internal class RealtimeClientEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutputTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutputTest.kt
index baeac3ae4..0732f6f42 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutputTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateAudioOutputTest.kt
@@ -21,7 +21,7 @@ internal class RealtimeResponseCreateAudioOutputTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
@@ -35,7 +35,7 @@ internal class RealtimeResponseCreateAudioOutputTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
}
@@ -53,7 +53,7 @@ internal class RealtimeResponseCreateAudioOutputTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateParamsTest.kt
index 498f63d79..3754d003f 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseCreateParamsTest.kt
@@ -27,12 +27,12 @@ internal class RealtimeResponseCreateParamsTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
@@ -87,13 +87,13 @@ internal class RealtimeResponseCreateParamsTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
assertThat(realtimeResponseCreateParams.conversation())
- .contains(RealtimeResponseCreateParams.Conversation.AUTO)
+ .contains(RealtimeResponseCreateParams.Conversation.of("string"))
assertThat(realtimeResponseCreateParams.input().getOrNull())
.containsExactly(
ConversationItem.ofRealtimeConversationItemSystemMessage(
@@ -163,12 +163,12 @@ internal class RealtimeResponseCreateParamsTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseTest.kt
index 658060dd1..c23a29fbf 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeResponseTest.kt
@@ -26,7 +26,7 @@ internal class RealtimeResponseTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -106,7 +106,7 @@ internal class RealtimeResponseTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -195,7 +195,7 @@ internal class RealtimeResponseTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt
index 7e80f94ca..6f09222b4 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeServerEventTest.kt
@@ -1956,7 +1956,7 @@ internal class RealtimeServerEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -2105,7 +2105,7 @@ internal class RealtimeServerEventTest {
)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -2212,7 +2212,7 @@ internal class RealtimeServerEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -2361,7 +2361,7 @@ internal class RealtimeServerEventTest {
)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -3049,7 +3049,7 @@ internal class RealtimeServerEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -3074,7 +3074,7 @@ internal class RealtimeServerEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -3085,7 +3085,7 @@ internal class RealtimeServerEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -3192,7 +3192,7 @@ internal class RealtimeServerEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -3219,7 +3219,7 @@ internal class RealtimeServerEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -3230,7 +3230,7 @@ internal class RealtimeServerEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -3293,7 +3293,7 @@ internal class RealtimeServerEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -3318,7 +3318,7 @@ internal class RealtimeServerEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -3329,7 +3329,7 @@ internal class RealtimeServerEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -3436,7 +3436,7 @@ internal class RealtimeServerEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -3463,7 +3463,7 @@ internal class RealtimeServerEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -3474,7 +3474,7 @@ internal class RealtimeServerEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequestTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequestTest.kt
index b9125dc78..6243b321c 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequestTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionCreateRequestTest.kt
@@ -35,7 +35,7 @@ internal class RealtimeSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -60,7 +60,7 @@ internal class RealtimeSessionCreateRequestTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -70,7 +70,7 @@ internal class RealtimeSessionCreateRequestTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -115,7 +115,7 @@ internal class RealtimeSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -140,7 +140,7 @@ internal class RealtimeSessionCreateRequestTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -153,7 +153,7 @@ internal class RealtimeSessionCreateRequestTest {
assertThat(realtimeSessionCreateRequest.maxOutputTokens())
.contains(RealtimeSessionCreateRequest.MaxOutputTokens.ofInteger(0L))
assertThat(realtimeSessionCreateRequest.model())
- .contains(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .contains(RealtimeSessionCreateRequest.Model.of("string"))
assertThat(realtimeSessionCreateRequest.outputModalities().getOrNull())
.containsExactly(RealtimeSessionCreateRequest.OutputModality.TEXT)
assertThat(realtimeSessionCreateRequest.prompt())
@@ -211,7 +211,7 @@ internal class RealtimeSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -236,7 +236,7 @@ internal class RealtimeSessionCreateRequestTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -246,7 +246,7 @@ internal class RealtimeSessionCreateRequestTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionTest.kt
index adc2d004a..b6499ba5b 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeSessionTest.kt
@@ -28,14 +28,14 @@ internal class RealtimeSessionTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
.instructions("instructions")
.maxResponseOutputTokens(0L)
.addModality(RealtimeSession.Modality.TEXT)
- .model(RealtimeSession.Model.GPT_REALTIME)
+ .model(RealtimeSession.Model.of("string"))
.object_(RealtimeSession.Object.REALTIME_SESSION)
.outputAudioFormat(RealtimeSession.OutputAudioFormat.PCM16)
.prompt(
@@ -71,7 +71,7 @@ internal class RealtimeSessionTest {
.threshold(0.0)
.build()
)
- .voice(RealtimeSession.Voice.ALLOY)
+ .voice(RealtimeSession.Voice.ASH)
.build()
assertThat(realtimeSession.id()).contains("id")
@@ -90,7 +90,7 @@ internal class RealtimeSessionTest {
.contains(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -99,7 +99,7 @@ internal class RealtimeSessionTest {
.contains(RealtimeSession.MaxResponseOutputTokens.ofInteger(0L))
assertThat(realtimeSession.modalities().getOrNull())
.containsExactly(RealtimeSession.Modality.TEXT)
- assertThat(realtimeSession.model()).contains(RealtimeSession.Model.GPT_REALTIME)
+ assertThat(realtimeSession.model()).contains(RealtimeSession.Model.of("string"))
assertThat(realtimeSession.object_()).contains(RealtimeSession.Object.REALTIME_SESSION)
assertThat(realtimeSession.outputAudioFormat())
.contains(RealtimeSession.OutputAudioFormat.PCM16)
@@ -141,7 +141,7 @@ internal class RealtimeSessionTest {
.build()
)
)
- assertThat(realtimeSession.voice()).contains(RealtimeSession.Voice.ALLOY)
+ assertThat(realtimeSession.voice()).contains(RealtimeSession.Voice.ASH)
}
@Test
@@ -161,14 +161,14 @@ internal class RealtimeSessionTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
.instructions("instructions")
.maxResponseOutputTokens(0L)
.addModality(RealtimeSession.Modality.TEXT)
- .model(RealtimeSession.Model.GPT_REALTIME)
+ .model(RealtimeSession.Model.of("string"))
.object_(RealtimeSession.Object.REALTIME_SESSION)
.outputAudioFormat(RealtimeSession.OutputAudioFormat.PCM16)
.prompt(
@@ -204,7 +204,7 @@ internal class RealtimeSessionTest {
.threshold(0.0)
.build()
)
- .voice(RealtimeSession.Voice.ALLOY)
+ .voice(RealtimeSession.Voice.ASH)
.build()
val roundtrippedRealtimeSession =
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInputTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInputTest.kt
index 62bd850a4..b82476b71 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInputTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioInputTest.kt
@@ -27,7 +27,7 @@ internal class RealtimeTranscriptionSessionAudioInputTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -62,7 +62,7 @@ internal class RealtimeTranscriptionSessionAudioInputTest {
.contains(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -100,7 +100,7 @@ internal class RealtimeTranscriptionSessionAudioInputTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioTest.kt
index e30b3a660..a8d3cc04f 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionAudioTest.kt
@@ -29,7 +29,7 @@ internal class RealtimeTranscriptionSessionAudioTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -64,7 +64,7 @@ internal class RealtimeTranscriptionSessionAudioTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -103,7 +103,7 @@ internal class RealtimeTranscriptionSessionAudioTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionCreateRequestTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionCreateRequestTest.kt
index 8f2207973..a060aa7ae 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionCreateRequestTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/RealtimeTranscriptionSessionCreateRequestTest.kt
@@ -32,7 +32,7 @@ internal class RealtimeTranscriptionSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -76,7 +76,7 @@ internal class RealtimeTranscriptionSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -125,7 +125,7 @@ internal class RealtimeTranscriptionSessionCreateRequestTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreateEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreateEventTest.kt
index f479ae4a9..d128f0512 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreateEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreateEventTest.kt
@@ -29,12 +29,12 @@ internal class ResponseCreateEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
@@ -97,12 +97,12 @@ internal class ResponseCreateEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
@@ -169,12 +169,12 @@ internal class ResponseCreateEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ALLOY)
+ .voice(RealtimeResponseCreateAudioOutput.Output.Voice.ASH)
.build()
)
.build()
)
- .conversation(RealtimeResponseCreateParams.Conversation.AUTO)
+ .conversation(RealtimeResponseCreateParams.Conversation.of("string"))
.addInput(
RealtimeConversationItemSystemMessage.builder()
.addContent(
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreatedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreatedEventTest.kt
index 90c264f2b..eb3d21056 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreatedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseCreatedEventTest.kt
@@ -28,7 +28,7 @@ internal class ResponseCreatedEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -120,7 +120,7 @@ internal class ResponseCreatedEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -215,7 +215,7 @@ internal class ResponseCreatedEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseDoneEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseDoneEventTest.kt
index 2a4afda83..1a606f0c6 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseDoneEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/ResponseDoneEventTest.kt
@@ -28,7 +28,7 @@ internal class ResponseDoneEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -120,7 +120,7 @@ internal class ResponseDoneEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -215,7 +215,7 @@ internal class ResponseDoneEventTest {
.type(RealtimeAudioFormats.AudioPcm.Type.AUDIO_PCM)
.build()
)
- .voice(RealtimeResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionCreatedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionCreatedEventTest.kt
index 9d45e5bcc..1ab0179d3 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionCreatedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionCreatedEventTest.kt
@@ -37,7 +37,7 @@ internal class SessionCreatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -62,7 +62,7 @@ internal class SessionCreatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -73,7 +73,7 @@ internal class SessionCreatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -124,7 +124,7 @@ internal class SessionCreatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -149,7 +149,7 @@ internal class SessionCreatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -160,7 +160,7 @@ internal class SessionCreatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -215,7 +215,7 @@ internal class SessionCreatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -240,7 +240,7 @@ internal class SessionCreatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -251,7 +251,7 @@ internal class SessionCreatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdateEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdateEventTest.kt
index 4e9378416..ee8f8fd25 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdateEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdateEventTest.kt
@@ -36,7 +36,7 @@ internal class SessionUpdateEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -61,7 +61,7 @@ internal class SessionUpdateEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -72,7 +72,7 @@ internal class SessionUpdateEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -123,7 +123,7 @@ internal class SessionUpdateEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -148,7 +148,7 @@ internal class SessionUpdateEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -159,7 +159,7 @@ internal class SessionUpdateEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -214,7 +214,7 @@ internal class SessionUpdateEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -239,7 +239,7 @@ internal class SessionUpdateEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -250,7 +250,7 @@ internal class SessionUpdateEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdatedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdatedEventTest.kt
index f8716bb42..f7f582b0d 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdatedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/SessionUpdatedEventTest.kt
@@ -37,7 +37,7 @@ internal class SessionUpdatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -62,7 +62,7 @@ internal class SessionUpdatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -73,7 +73,7 @@ internal class SessionUpdatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -124,7 +124,7 @@ internal class SessionUpdatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -149,7 +149,7 @@ internal class SessionUpdatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -160,7 +160,7 @@ internal class SessionUpdatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -215,7 +215,7 @@ internal class SessionUpdatedEventTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -240,7 +240,7 @@ internal class SessionUpdatedEventTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -251,7 +251,7 @@ internal class SessionUpdatedEventTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdateTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdateTest.kt
index 2499a4a4c..3ec78080f 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdateTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdateTest.kt
@@ -28,7 +28,7 @@ internal class TranscriptionSessionUpdateTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -63,7 +63,7 @@ internal class TranscriptionSessionUpdateTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -100,7 +100,7 @@ internal class TranscriptionSessionUpdateTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdatedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdatedEventTest.kt
index 2c3cd3e0a..a094bcf83 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdatedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/TranscriptionSessionUpdatedEventTest.kt
@@ -26,7 +26,7 @@ internal class TranscriptionSessionUpdatedEventTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -57,7 +57,7 @@ internal class TranscriptionSessionUpdatedEventTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -92,7 +92,7 @@ internal class TranscriptionSessionUpdatedEventTest {
.inputAudioTranscription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/calls/CallAcceptParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/calls/CallAcceptParamsTest.kt
index 05a736b1c..ce265113c 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/calls/CallAcceptParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/calls/CallAcceptParamsTest.kt
@@ -44,7 +44,7 @@ internal class CallAcceptParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -69,7 +69,7 @@ internal class CallAcceptParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -79,7 +79,7 @@ internal class CallAcceptParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -146,7 +146,7 @@ internal class CallAcceptParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -171,7 +171,7 @@ internal class CallAcceptParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -182,7 +182,7 @@ internal class CallAcceptParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -233,7 +233,7 @@ internal class CallAcceptParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -258,7 +258,7 @@ internal class CallAcceptParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -268,7 +268,7 @@ internal class CallAcceptParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParamsTest.kt
index fcc0d80db..2d9920760 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateParamsTest.kt
@@ -49,7 +49,7 @@ internal class ClientSecretCreateParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -74,7 +74,7 @@ internal class ClientSecretCreateParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -84,7 +84,7 @@ internal class ClientSecretCreateParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -143,7 +143,7 @@ internal class ClientSecretCreateParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -168,7 +168,7 @@ internal class ClientSecretCreateParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -179,7 +179,7 @@ internal class ClientSecretCreateParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -238,7 +238,7 @@ internal class ClientSecretCreateParamsTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -263,7 +263,7 @@ internal class ClientSecretCreateParamsTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -274,7 +274,7 @@ internal class ClientSecretCreateParamsTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateResponseTest.kt
index 39939f103..6134da096 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/ClientSecretCreateResponseTest.kt
@@ -49,7 +49,7 @@ internal class ClientSecretCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -76,9 +76,7 @@ internal class ClientSecretCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(
- RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY
- )
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -89,7 +87,7 @@ internal class ClientSecretCreateResponseTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateResponse.Model.of("string"))
.addOutputModality(RealtimeSessionCreateResponse.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -148,7 +146,7 @@ internal class ClientSecretCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -175,9 +173,7 @@ internal class ClientSecretCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(
- RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY
- )
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -188,7 +184,7 @@ internal class ClientSecretCreateResponseTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateResponse.Model.of("string"))
.addOutputModality(RealtimeSessionCreateResponse.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -251,7 +247,7 @@ internal class ClientSecretCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -278,9 +274,7 @@ internal class ClientSecretCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(
- RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY
- )
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -291,7 +285,7 @@ internal class ClientSecretCreateResponseTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateResponse.Model.of("string"))
.addOutputModality(RealtimeSessionCreateResponse.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponseTest.kt
index 4d1eb4a1d..b0c5bde68 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeSessionCreateResponseTest.kt
@@ -44,7 +44,7 @@ internal class RealtimeSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -71,7 +71,7 @@ internal class RealtimeSessionCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -81,7 +81,7 @@ internal class RealtimeSessionCreateResponseTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateResponse.Model.of("string"))
.addOutputModality(RealtimeSessionCreateResponse.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
@@ -128,7 +128,7 @@ internal class RealtimeSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -154,7 +154,7 @@ internal class RealtimeSessionCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -167,7 +167,7 @@ internal class RealtimeSessionCreateResponseTest {
assertThat(realtimeSessionCreateResponse.maxOutputTokens())
.contains(RealtimeSessionCreateResponse.MaxOutputTokens.ofInteger(0L))
assertThat(realtimeSessionCreateResponse.model())
- .contains(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .contains(RealtimeSessionCreateResponse.Model.of("string"))
assertThat(realtimeSessionCreateResponse.outputModalities().getOrNull())
.containsExactly(RealtimeSessionCreateResponse.OutputModality.TEXT)
assertThat(realtimeSessionCreateResponse.prompt())
@@ -230,7 +230,7 @@ internal class RealtimeSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -257,7 +257,7 @@ internal class RealtimeSessionCreateResponseTest {
.build()
)
.speed(0.25)
- .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ALLOY)
+ .voice(RealtimeSessionCreateResponse.Audio.Output.Voice.ASH)
.build()
)
.build()
@@ -267,7 +267,7 @@ internal class RealtimeSessionCreateResponseTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateResponse.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateResponse.Model.of("string"))
.addOutputModality(RealtimeSessionCreateResponse.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeTranscriptionSessionCreateResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeTranscriptionSessionCreateResponseTest.kt
index 7f1186661..9f3c119c5 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeTranscriptionSessionCreateResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/realtime/clientsecrets/RealtimeTranscriptionSessionCreateResponseTest.kt
@@ -39,7 +39,7 @@ internal class RealtimeTranscriptionSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -85,7 +85,7 @@ internal class RealtimeTranscriptionSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -136,7 +136,7 @@ internal class RealtimeTranscriptionSessionCreateResponseTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCompletedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCompletedEventTest.kt
index 83f11a949..7ad05ee36 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCompletedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCompletedEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseCompletedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseCompletedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseCompletedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCreatedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCreatedEventTest.kt
index 1db2bb3c1..177554c60 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCreatedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseCreatedEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseCreatedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseCreatedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseCreatedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFailedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFailedEventTest.kt
index 40d6e6dda..ac4e9a7a7 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFailedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFailedEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseFailedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseFailedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseFailedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFunctionWebSearchTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFunctionWebSearchTest.kt
index 5d5b43b6d..e92eadef3 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFunctionWebSearchTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseFunctionWebSearchTest.kt
@@ -17,6 +17,7 @@ internal class ResponseFunctionWebSearchTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -33,6 +34,7 @@ internal class ResponseFunctionWebSearchTest {
ResponseFunctionWebSearch.Action.ofSearch(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -54,6 +56,7 @@ internal class ResponseFunctionWebSearchTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInProgressEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInProgressEventTest.kt
index a528a1f9d..03dd37c4e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInProgressEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInProgressEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseInProgressEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseInProgressEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseInProgressEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseIncompleteEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseIncompleteEventTest.kt
index 26daee42b..ab12a404b 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseIncompleteEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseIncompleteEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseIncompleteEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseIncompleteEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseIncompleteEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt
index 8849298d5..455b53e41 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseInputItemTest.kt
@@ -516,6 +516,7 @@ internal class ResponseInputItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -566,6 +567,7 @@ internal class ResponseInputItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt
index 71a984b9a..1bbc85514 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseItemTest.kt
@@ -428,6 +428,7 @@ internal class ResponseItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -472,6 +473,7 @@ internal class ResponseItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt
index b6ef85d85..468a94ecf 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseOutputItemTest.kt
@@ -258,6 +258,7 @@ internal class ResponseOutputItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
@@ -300,6 +301,7 @@ internal class ResponseOutputItemTest {
.action(
ResponseFunctionWebSearch.Action.Search.builder()
.query("query")
+ .addQuery("string")
.addSource(
ResponseFunctionWebSearch.Action.Search.Source.builder()
.url("url")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseQueuedEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseQueuedEventTest.kt
index c7f1118dd..2017cb42a 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseQueuedEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseQueuedEventTest.kt
@@ -89,6 +89,7 @@ internal class ResponseQueuedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -219,6 +220,7 @@ internal class ResponseQueuedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -351,6 +353,7 @@ internal class ResponseQueuedEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseStreamEventTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseStreamEventTest.kt
index a0b2cf626..9676fdcd7 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseStreamEventTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseStreamEventTest.kt
@@ -859,6 +859,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -1052,6 +1053,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -1477,6 +1479,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -1670,6 +1673,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -2351,6 +2355,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -2544,6 +2549,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -2687,6 +2693,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -2880,6 +2887,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -3023,6 +3031,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -3216,6 +3225,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -6045,6 +6055,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -6238,6 +6249,7 @@ internal class ResponseStreamEventTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseTest.kt
index 291dfd2b7..a6e68714e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ResponseTest.kt
@@ -88,6 +88,7 @@ internal class ResponseTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
@@ -218,6 +219,7 @@ internal class ResponseTest {
)
assertThat(response.topP()).contains(1.0)
assertThat(response.background()).contains(true)
+ assertThat(response.completedAt()).contains(0.0)
assertThat(response.conversation())
.contains(Response.Conversation.builder().id("id").build())
assertThat(response.maxOutputTokens()).contains(0L)
@@ -349,6 +351,7 @@ internal class ResponseTest {
)
.topP(1.0)
.background(true)
+ .completedAt(0.0)
.conversation(Response.Conversation.builder().id("id").build())
.maxOutputTokens(0L)
.maxToolCalls(0L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/StructuredResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/StructuredResponseTest.kt
index a10f783d9..e2a61bb80 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/StructuredResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/StructuredResponseTest.kt
@@ -114,6 +114,8 @@ internal class StructuredResponseTest {
DelegationReadTestCase("_user", JSON_FIELD),
DelegationReadTestCase("background", OPTIONAL),
DelegationReadTestCase("_background", JSON_FIELD),
+ DelegationReadTestCase("completedAt", OPTIONAL),
+ DelegationReadTestCase("_completedAt", JSON_FIELD),
DelegationReadTestCase("conversation", OPTIONAL),
DelegationReadTestCase("_conversation", JSON_FIELD),
DelegationReadTestCase("_additionalProperties", MAP),
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt
index abe6207e3..9c9c7560f 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/responses/ToolTest.kt
@@ -386,7 +386,7 @@ internal class ToolTest {
.imageUrl("image_url")
.build()
)
- .model(Tool.ImageGeneration.Model.GPT_IMAGE_1)
+ .model(Tool.ImageGeneration.Model.of("string"))
.moderation(Tool.ImageGeneration.Moderation.AUTO)
.outputCompression(0L)
.outputFormat(Tool.ImageGeneration.OutputFormat.PNG)
@@ -425,7 +425,7 @@ internal class ToolTest {
.imageUrl("image_url")
.build()
)
- .model(Tool.ImageGeneration.Model.GPT_IMAGE_1)
+ .model(Tool.ImageGeneration.Model.of("string"))
.moderation(Tool.ImageGeneration.Moderation.AUTO)
.outputCompression(0L)
.outputFormat(Tool.ImageGeneration.OutputFormat.PNG)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoCreateParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoCreateParamsTest.kt
index b5b00db32..1dd2fe58e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoCreateParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoCreateParamsTest.kt
@@ -14,7 +14,7 @@ internal class VideoCreateParamsTest {
VideoCreateParams.builder()
.prompt("x")
.inputReference("some content".byteInputStream())
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.seconds(VideoSeconds._4)
.size(VideoSize._720X1280)
.build()
@@ -26,7 +26,7 @@ internal class VideoCreateParamsTest {
VideoCreateParams.builder()
.prompt("x")
.inputReference("some content".byteInputStream())
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.seconds(VideoSeconds._4)
.size(VideoSize._720X1280)
.build()
@@ -45,7 +45,7 @@ internal class VideoCreateParamsTest {
mapOf(
"prompt" to MultipartField.of("x"),
"input_reference" to MultipartField.of("some content".byteInputStream()),
- "model" to MultipartField.of(VideoModel.SORA_2),
+ "model" to MultipartField.of(VideoModel.of("string")),
"seconds" to MultipartField.of(VideoSeconds._4),
"size" to MultipartField.of(VideoSize._720X1280),
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoListPageResponseTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoListPageResponseTest.kt
index f83345b0b..504f92e92 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoListPageResponseTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoListPageResponseTest.kt
@@ -20,7 +20,7 @@ internal class VideoListPageResponseTest {
.createdAt(0L)
.error(VideoCreateError.builder().code("code").message("message").build())
.expiresAt(0L)
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.progress(0L)
.prompt("prompt")
.remixedFromVideoId("remixed_from_video_id")
@@ -42,7 +42,7 @@ internal class VideoListPageResponseTest {
.createdAt(0L)
.error(VideoCreateError.builder().code("code").message("message").build())
.expiresAt(0L)
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.progress(0L)
.prompt("prompt")
.remixedFromVideoId("remixed_from_video_id")
@@ -68,7 +68,7 @@ internal class VideoListPageResponseTest {
.createdAt(0L)
.error(VideoCreateError.builder().code("code").message("message").build())
.expiresAt(0L)
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.progress(0L)
.prompt("prompt")
.remixedFromVideoId("remixed_from_video_id")
diff --git a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoTest.kt b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoTest.kt
index f071abb4f..ad913f9a2 100644
--- a/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/models/videos/VideoTest.kt
@@ -18,7 +18,7 @@ internal class VideoTest {
.createdAt(0L)
.error(VideoCreateError.builder().code("code").message("message").build())
.expiresAt(0L)
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.progress(0L)
.prompt("prompt")
.remixedFromVideoId("remixed_from_video_id")
@@ -33,7 +33,7 @@ internal class VideoTest {
assertThat(video.error())
.contains(VideoCreateError.builder().code("code").message("message").build())
assertThat(video.expiresAt()).contains(0L)
- assertThat(video.model()).isEqualTo(VideoModel.SORA_2)
+ assertThat(video.model()).isEqualTo(VideoModel.of("string"))
assertThat(video.progress()).isEqualTo(0L)
assertThat(video.prompt()).contains("prompt")
assertThat(video.remixedFromVideoId()).contains("remixed_from_video_id")
@@ -52,7 +52,7 @@ internal class VideoTest {
.createdAt(0L)
.error(VideoCreateError.builder().code("code").message("message").build())
.expiresAt(0L)
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.progress(0L)
.prompt("prompt")
.remixedFromVideoId("remixed_from_video_id")
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt
index 7be107673..164dd09ea 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/ErrorHandlingTest.kt
@@ -90,7 +90,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -206,7 +206,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -322,7 +322,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -438,7 +438,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -554,7 +554,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -670,7 +670,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -786,7 +786,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -902,7 +902,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1018,7 +1018,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1134,7 +1134,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1250,7 +1250,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1366,7 +1366,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1482,7 +1482,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1598,7 +1598,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1714,7 +1714,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1830,7 +1830,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
@@ -1944,7 +1944,7 @@ internal class ErrorHandlingTest {
assertThrows {
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt
index 9fe7439c4..80e5cdf41 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/ServiceParamsTest.kt
@@ -58,11 +58,11 @@ internal class ServiceParamsTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/CompletionServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/CompletionServiceAsyncTest.kt
index e10689427..39160f2ec 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/CompletionServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/CompletionServiceAsyncTest.kt
@@ -25,7 +25,7 @@ internal class CompletionServiceAsyncTest {
val completionFuture =
completionServiceAsync.create(
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
@@ -70,7 +70,7 @@ internal class CompletionServiceAsyncTest {
val completionStreamResponse =
completionServiceAsync.createStreaming(
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/EmbeddingServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/EmbeddingServiceAsyncTest.kt
index 441159914..432de3c06 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/EmbeddingServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/EmbeddingServiceAsyncTest.kt
@@ -25,7 +25,7 @@ internal class EmbeddingServiceAsyncTest {
embeddingServiceAsync.create(
EmbeddingCreateParams.builder()
.input("The quick brown fox jumped over the lazy dog")
- .model(EmbeddingModel.TEXT_EMBEDDING_ADA_002)
+ .model(EmbeddingModel.TEXT_EMBEDDING_3_SMALL)
.dimensions(1L)
.encodingFormat(EmbeddingCreateParams.EncodingFormat.FLOAT)
.user("user-1234")
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/ImageServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/ImageServiceAsyncTest.kt
index 0c71f5c41..e8779fed4 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/ImageServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/ImageServiceAsyncTest.kt
@@ -27,7 +27,7 @@ internal class ImageServiceAsyncTest {
imageServiceAsync.createVariation(
ImageCreateVariationParams.builder()
.image("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.responseFormat(ImageCreateVariationParams.ResponseFormat.URL)
.size(ImageCreateVariationParams.Size._1024X1024)
@@ -56,7 +56,7 @@ internal class ImageServiceAsyncTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -89,7 +89,7 @@ internal class ImageServiceAsyncTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -122,7 +122,7 @@ internal class ImageServiceAsyncTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
@@ -154,7 +154,7 @@ internal class ImageServiceAsyncTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/ModerationServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/ModerationServiceAsyncTest.kt
index 037ea393b..bfe48964d 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/ModerationServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/ModerationServiceAsyncTest.kt
@@ -25,7 +25,7 @@ internal class ModerationServiceAsyncTest {
moderationServiceAsync.create(
ModerationCreateParams.builder()
.input("I want to kill them.")
- .model(ModerationModel.OMNI_MODERATION_LATEST)
+ .model(ModerationModel.of("string"))
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/VideoServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/VideoServiceAsyncTest.kt
index 75cee90e7..8d6a3b94e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/VideoServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/VideoServiceAsyncTest.kt
@@ -40,7 +40,7 @@ internal class VideoServiceAsyncTest {
VideoCreateParams.builder()
.prompt("x")
.inputReference("some content".byteInputStream())
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.seconds(VideoSeconds._4)
.size(VideoSize._720X1280)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/audio/SpeechServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/audio/SpeechServiceAsyncTest.kt
index 50170be77..e6b873bf1 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/audio/SpeechServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/audio/SpeechServiceAsyncTest.kt
@@ -36,8 +36,8 @@ internal class SpeechServiceAsyncTest {
speechServiceAsync.create(
SpeechCreateParams.builder()
.input("input")
- .model(SpeechModel.TTS_1)
- .voice(SpeechCreateParams.Voice.ALLOY)
+ .model(SpeechModel.of("string"))
+ .voice(SpeechCreateParams.Voice.ASH)
.instructions("instructions")
.responseFormat(SpeechCreateParams.ResponseFormat.MP3)
.speed(0.25)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncTest.kt
index 30bfb4edd..e67386f35 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/audio/TranscriptionServiceAsyncTest.kt
@@ -27,7 +27,7 @@ internal class TranscriptionServiceAsyncTest {
transcriptionServiceAsync.create(
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
@@ -57,7 +57,7 @@ internal class TranscriptionServiceAsyncTest {
transcriptionServiceAsync.createStreaming(
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/AssistantServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/AssistantServiceAsyncTest.kt
index b2fb06022..253da3195 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/AssistantServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/AssistantServiceAsyncTest.kt
@@ -28,7 +28,7 @@ internal class AssistantServiceAsyncTest {
val assistantFuture =
assistantServiceAsync.create(
AssistantCreateParams.builder()
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.description("description")
.instructions("instructions")
.metadata(
@@ -116,7 +116,7 @@ internal class AssistantServiceAsyncTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(AssistantUpdateParams.Model.GPT_5)
+ .model(AssistantUpdateParams.Model.of("string"))
.name("name")
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/ThreadServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/ThreadServiceAsyncTest.kt
index 1f7504e2d..1cb051911 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/ThreadServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/ThreadServiceAsyncTest.kt
@@ -180,7 +180,7 @@ internal class ThreadServiceAsyncTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
@@ -300,7 +300,7 @@ internal class ThreadServiceAsyncTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncTest.kt
index 9cab60493..2742e73be 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/beta/threads/RunServiceAsyncTest.kt
@@ -62,7 +62,7 @@ internal class RunServiceAsyncTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -124,7 +124,7 @@ internal class RunServiceAsyncTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncTest.kt
index a5d60e3b7..509010d79 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/chat/ChatCompletionServiceAsyncTest.kt
@@ -41,11 +41,11 @@ internal class ChatCompletionServiceAsyncTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
@@ -158,11 +158,11 @@ internal class ChatCompletionServiceAsyncTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/finetuning/JobServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/finetuning/JobServiceAsyncTest.kt
index 6a9b1aef6..2bc5558c4 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/finetuning/JobServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/finetuning/JobServiceAsyncTest.kt
@@ -31,7 +31,7 @@ internal class JobServiceAsyncTest {
val fineTuningJobFuture =
jobServiceAsync.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/CallServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/CallServiceAsyncTest.kt
index 0a8c555e2..91879ed21 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/CallServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/CallServiceAsyncTest.kt
@@ -61,7 +61,7 @@ internal class CallServiceAsyncTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -88,7 +88,7 @@ internal class CallServiceAsyncTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -99,7 +99,7 @@ internal class CallServiceAsyncTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncTest.kt
index d3420b6a2..cf3fa046d 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/async/realtime/ClientSecretServiceAsyncTest.kt
@@ -64,7 +64,7 @@ internal class ClientSecretServiceAsyncTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -91,7 +91,7 @@ internal class ClientSecretServiceAsyncTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -102,7 +102,7 @@ internal class ClientSecretServiceAsyncTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt
index 7d9148b27..6fc1d718b 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/CompletionServiceTest.kt
@@ -25,7 +25,7 @@ internal class CompletionServiceTest {
val completion =
completionService.create(
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
@@ -69,7 +69,7 @@ internal class CompletionServiceTest {
val completionStreamResponse =
completionService.createStreaming(
CompletionCreateParams.builder()
- .model(CompletionCreateParams.Model.GPT_3_5_TURBO_INSTRUCT)
+ .model(CompletionCreateParams.Model.of("string"))
.prompt("This is a test.")
.bestOf(0L)
.echo(true)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt
index 0c6b44d31..1524cc0ae 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ImageServiceTest.kt
@@ -27,7 +27,7 @@ internal class ImageServiceTest {
imageService.createVariation(
ImageCreateVariationParams.builder()
.image("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.responseFormat(ImageCreateVariationParams.ResponseFormat.URL)
.size(ImageCreateVariationParams.Size._1024X1024)
@@ -55,7 +55,7 @@ internal class ImageServiceTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -87,7 +87,7 @@ internal class ImageServiceTest {
.background(ImageEditParams.Background.TRANSPARENT)
.inputFidelity(ImageEditParams.InputFidelity.HIGH)
.mask("some content".byteInputStream())
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.n(1L)
.outputCompression(100L)
.outputFormat(ImageEditParams.OutputFormat.PNG)
@@ -120,7 +120,7 @@ internal class ImageServiceTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
@@ -151,7 +151,7 @@ internal class ImageServiceTest {
ImageGenerateParams.builder()
.prompt("A cute baby sea otter")
.background(ImageGenerateParams.Background.TRANSPARENT)
- .model(ImageModel.GPT_IMAGE_1_5)
+ .model(ImageModel.of("string"))
.moderation(ImageGenerateParams.Moderation.LOW)
.n(1L)
.outputCompression(100L)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ModerationServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ModerationServiceTest.kt
index c75999e39..51fd64ec2 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/ModerationServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/ModerationServiceTest.kt
@@ -25,7 +25,7 @@ internal class ModerationServiceTest {
moderationService.create(
ModerationCreateParams.builder()
.input("I want to kill them.")
- .model(ModerationModel.OMNI_MODERATION_LATEST)
+ .model(ModerationModel.of("string"))
.build()
)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/VideoServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/VideoServiceTest.kt
index 15a42f37c..d353fcb8e 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/VideoServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/VideoServiceTest.kt
@@ -40,7 +40,7 @@ internal class VideoServiceTest {
VideoCreateParams.builder()
.prompt("x")
.inputReference("some content".byteInputStream())
- .model(VideoModel.SORA_2)
+ .model(VideoModel.of("string"))
.seconds(VideoSeconds._4)
.size(VideoSize._720X1280)
.build()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/SpeechServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/SpeechServiceTest.kt
index 00ba01b13..d2a6ec69d 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/SpeechServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/SpeechServiceTest.kt
@@ -36,8 +36,8 @@ internal class SpeechServiceTest {
speechService.create(
SpeechCreateParams.builder()
.input("input")
- .model(SpeechModel.TTS_1)
- .voice(SpeechCreateParams.Voice.ALLOY)
+ .model(SpeechModel.of("string"))
+ .voice(SpeechCreateParams.Voice.ASH)
.instructions("instructions")
.responseFormat(SpeechCreateParams.ResponseFormat.MP3)
.speed(0.25)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/TranscriptionServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/TranscriptionServiceTest.kt
index 9281ecaa5..3aa73eb10 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/TranscriptionServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/audio/TranscriptionServiceTest.kt
@@ -27,7 +27,7 @@ internal class TranscriptionServiceTest {
transcriptionService.create(
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
@@ -56,7 +56,7 @@ internal class TranscriptionServiceTest {
transcriptionService.createStreaming(
TranscriptionCreateParams.builder()
.file("some content".byteInputStream())
- .model(AudioModel.WHISPER_1)
+ .model(AudioModel.GPT_4O_TRANSCRIBE)
.chunkingStrategyAuto()
.addInclude(TranscriptionInclude.LOGPROBS)
.addKnownSpeakerName("string")
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/AssistantServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/AssistantServiceTest.kt
index 918f687a7..6d6c45dd1 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/AssistantServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/AssistantServiceTest.kt
@@ -28,7 +28,7 @@ internal class AssistantServiceTest {
val assistant =
assistantService.create(
AssistantCreateParams.builder()
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.description("description")
.instructions("instructions")
.metadata(
@@ -114,7 +114,7 @@ internal class AssistantServiceTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(AssistantUpdateParams.Model.GPT_5)
+ .model(AssistantUpdateParams.Model.of("string"))
.name("name")
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ThreadServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ThreadServiceTest.kt
index 1b3013148..ce0a7600a 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ThreadServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/ThreadServiceTest.kt
@@ -176,7 +176,7 @@ internal class ThreadServiceTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
@@ -295,7 +295,7 @@ internal class ThreadServiceTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.responseFormatAuto()
.temperature(1.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/threads/RunServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/threads/RunServiceTest.kt
index 38735ff28..7c47a1691 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/threads/RunServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/beta/threads/RunServiceTest.kt
@@ -62,7 +62,7 @@ internal class RunServiceTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
@@ -123,7 +123,7 @@ internal class RunServiceTest {
.putAdditionalProperty("foo", JsonValue.from("string"))
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.of("string"))
.parallelToolCalls(true)
.reasoningEffort(ReasoningEffort.NONE)
.responseFormatAuto()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/ChatCompletionServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/ChatCompletionServiceTest.kt
index d9c03151f..a5bb516af 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/ChatCompletionServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/chat/ChatCompletionServiceTest.kt
@@ -41,11 +41,11 @@ internal class ChatCompletionServiceTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
@@ -157,11 +157,11 @@ internal class ChatCompletionServiceTest {
.name("name")
.build()
)
- .model(ChatModel.GPT_5_2)
+ .model(ChatModel.GPT_4O)
.audio(
ChatCompletionAudioParam.builder()
.format(ChatCompletionAudioParam.Format.WAV)
- .voice(ChatCompletionAudioParam.Voice.ALLOY)
+ .voice(ChatCompletionAudioParam.Voice.ASH)
.build()
)
.frequencyPenalty(-2.0)
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/finetuning/JobServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/finetuning/JobServiceTest.kt
index 662a78c5e..5cf96e0c9 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/finetuning/JobServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/finetuning/JobServiceTest.kt
@@ -31,7 +31,7 @@ internal class JobServiceTest {
val fineTuningJob =
jobService.create(
JobCreateParams.builder()
- .model(JobCreateParams.Model.BABBAGE_002)
+ .model(JobCreateParams.Model.GPT_4O_MINI)
.trainingFile("file-abc123")
.hyperparameters(
JobCreateParams.Hyperparameters.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/CallServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/CallServiceTest.kt
index 42a117550..f915ce2ce 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/CallServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/CallServiceTest.kt
@@ -58,7 +58,7 @@ internal class CallServiceTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -83,7 +83,7 @@ internal class CallServiceTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -94,7 +94,7 @@ internal class CallServiceTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/ClientSecretServiceTest.kt b/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/ClientSecretServiceTest.kt
index a5f1ccec1..681098130 100644
--- a/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/ClientSecretServiceTest.kt
+++ b/openai-java-core/src/test/kotlin/com/openai/services/blocking/realtime/ClientSecretServiceTest.kt
@@ -64,7 +64,7 @@ internal class ClientSecretServiceTest {
.transcription(
AudioTranscription.builder()
.language("language")
- .model(AudioTranscription.Model.WHISPER_1)
+ .model(AudioTranscription.Model.of("string"))
.prompt("prompt")
.build()
)
@@ -91,7 +91,7 @@ internal class ClientSecretServiceTest {
.build()
)
.speed(0.25)
- .voice(RealtimeAudioConfigOutput.Voice.ALLOY)
+ .voice(RealtimeAudioConfigOutput.Voice.ASH)
.build()
)
.build()
@@ -102,7 +102,7 @@ internal class ClientSecretServiceTest {
)
.instructions("instructions")
.maxOutputTokens(0L)
- .model(RealtimeSessionCreateRequest.Model.GPT_REALTIME)
+ .model(RealtimeSessionCreateRequest.Model.of("string"))
.addOutputModality(RealtimeSessionCreateRequest.OutputModality.TEXT)
.prompt(
ResponsePrompt.builder()
diff --git a/scripts/test b/scripts/test
index c62763442..d0126f840 100755
--- a/scripts/test
+++ b/scripts/test
@@ -54,4 +54,11 @@ fi
echo "==> Running tests"
+# Clear OpenAI-related env vars to keep test expectations consistent between laptop and CI.
+unset OPENAI_API_KEY
+unset OPENAI_ORG_ID
+unset OPENAI_PROJECT_ID
+unset OPENAI_WEBHOOK_SECRET
+unset OPENAI_BASE_URL
+
./gradlew test "$@"