Skip to content

Commit 651c44f

Browse files
feat(api): gpt-5.1-codex-max and responses/compact
1 parent 66f7a4b commit 651c44f

File tree

84 files changed

+5411
-361
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+5411
-361
lines changed

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 135
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a7e92d12ebe89ca019a7ac5b29759064eefa2c38fe08d03516f2620e66abb32b.yml
3-
openapi_spec_hash: acbc703b2739447abc6312b2d753631c
4-
config_hash: b876221dfb213df9f0a999e75d38a65e
1+
configured_endpoints: 136
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-fe8a79e6fd407e6c9afec60971f03076b65f711ccd6ea16457933b0e24fb1f6d.yml
3+
openapi_spec_hash: 38c0a73f4e08843732c5f8002a809104
4+
config_hash: 2c350086d87a4b4532077363087840e7

gradle.properties

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ org.gradle.caching=true
22
org.gradle.configuration-cache=true
33
org.gradle.parallel=true
44
org.gradle.daemon=false
5+
kotlin.daemon.enabled=false
6+
kotlin.compiler.execution.strategy=in-process
7+
kotlin.incremental=false
58
# These options improve our compilation and test performance. They are inherited by the Kotlin daemon.
69
org.gradle.jvmargs=\
710
-Xms2g \

openai-java-core/src/main/kotlin/com/openai/models/AllModels.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,8 @@ private constructor(
258258

259259
@JvmField val GPT_5_PRO_2025_10_06 = of("gpt-5-pro-2025-10-06")
260260

261+
@JvmField val GPT_5_1_CODEX_MAX = of("gpt-5.1-codex-max")
262+
261263
@JvmStatic fun of(value: String) = ResponsesOnlyModel(JsonField.of(value))
262264
}
263265

@@ -276,6 +278,7 @@ private constructor(
276278
GPT_5_CODEX,
277279
GPT_5_PRO,
278280
GPT_5_PRO_2025_10_06,
281+
GPT_5_1_CODEX_MAX,
279282
}
280283

281284
/**
@@ -301,6 +304,7 @@ private constructor(
301304
GPT_5_CODEX,
302305
GPT_5_PRO,
303306
GPT_5_PRO_2025_10_06,
307+
GPT_5_1_CODEX_MAX,
304308
/**
305309
* An enum member indicating that [ResponsesOnlyModel] was instantiated with an unknown
306310
* value.
@@ -330,6 +334,7 @@ private constructor(
330334
GPT_5_CODEX -> Value.GPT_5_CODEX
331335
GPT_5_PRO -> Value.GPT_5_PRO
332336
GPT_5_PRO_2025_10_06 -> Value.GPT_5_PRO_2025_10_06
337+
GPT_5_1_CODEX_MAX -> Value.GPT_5_1_CODEX_MAX
333338
else -> Value._UNKNOWN
334339
}
335340

@@ -357,6 +362,7 @@ private constructor(
357362
GPT_5_CODEX -> Known.GPT_5_CODEX
358363
GPT_5_PRO -> Known.GPT_5_PRO
359364
GPT_5_PRO_2025_10_06 -> Known.GPT_5_PRO_2025_10_06
365+
GPT_5_1_CODEX_MAX -> Known.GPT_5_1_CODEX_MAX
360366
else -> throw OpenAIInvalidDataException("Unknown ResponsesOnlyModel: $value")
361367
}
362368

openai-java-core/src/main/kotlin/com/openai/models/Reasoning.kt

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,15 @@ private constructor(
4545
/**
4646
* Constrains effort on reasoning for
4747
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported
48-
* values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can
49-
* result in faster responses and fewer tokens used on reasoning in a response.
48+
* values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort
49+
* can result in faster responses and fewer tokens used on reasoning in a response.
5050
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
5151
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for
5252
* all reasoning values in gpt-5.1.
5353
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
5454
* `none`.
5555
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
56+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
5657
*
5758
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
5859
* server responded with an unexpected value).
@@ -144,14 +145,16 @@ private constructor(
144145
/**
145146
* Constrains effort on reasoning for
146147
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
147-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning
148-
* effort can result in faster responses and fewer tokens used on reasoning in a response.
148+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
149+
* reasoning effort can result in faster responses and fewer tokens used on reasoning in a
150+
* response.
149151
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
150152
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported
151153
* for all reasoning values in gpt-5.1.
152154
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
153155
* `none`.
154156
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
157+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
155158
*/
156159
fun effort(effort: ReasoningEffort?) = effort(JsonField.ofNullable(effort))
157160

openai-java-core/src/main/kotlin/com/openai/models/ReasoningEffort.kt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@ import com.openai.errors.OpenAIInvalidDataException
1010
/**
1111
* Constrains effort on reasoning for
1212
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported values
13-
* are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can result in
14-
* faster responses and fewer tokens used on reasoning in a response.
13+
* are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort can result
14+
* in faster responses and fewer tokens used on reasoning in a response.
1515
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values
1616
* for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all
1717
* reasoning values in gpt-5.1.
1818
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
1919
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
20+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
2021
*/
2122
class ReasoningEffort @JsonCreator private constructor(private val value: JsonField<String>) :
2223
Enum {
@@ -42,6 +43,8 @@ class ReasoningEffort @JsonCreator private constructor(private val value: JsonFi
4243

4344
@JvmField val HIGH = of("high")
4445

46+
@JvmField val XHIGH = of("xhigh")
47+
4548
@JvmStatic fun of(value: String) = ReasoningEffort(JsonField.of(value))
4649
}
4750

@@ -52,6 +55,7 @@ class ReasoningEffort @JsonCreator private constructor(private val value: JsonFi
5255
LOW,
5356
MEDIUM,
5457
HIGH,
58+
XHIGH,
5559
}
5660

5761
/**
@@ -69,6 +73,7 @@ class ReasoningEffort @JsonCreator private constructor(private val value: JsonFi
6973
LOW,
7074
MEDIUM,
7175
HIGH,
76+
XHIGH,
7277
/**
7378
* An enum member indicating that [ReasoningEffort] was instantiated with an unknown value.
7479
*/
@@ -89,6 +94,7 @@ class ReasoningEffort @JsonCreator private constructor(private val value: JsonFi
8994
LOW -> Value.LOW
9095
MEDIUM -> Value.MEDIUM
9196
HIGH -> Value.HIGH
97+
XHIGH -> Value.XHIGH
9298
else -> Value._UNKNOWN
9399
}
94100

@@ -107,6 +113,7 @@ class ReasoningEffort @JsonCreator private constructor(private val value: JsonFi
107113
LOW -> Known.LOW
108114
MEDIUM -> Known.MEDIUM
109115
HIGH -> Known.HIGH
116+
XHIGH -> Known.XHIGH
110117
else -> throw OpenAIInvalidDataException("Unknown ReasoningEffort: $value")
111118
}
112119

openai-java-core/src/main/kotlin/com/openai/models/ResponsesModel.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -257,6 +257,8 @@ private constructor(
257257

258258
@JvmField val GPT_5_PRO_2025_10_06 = of("gpt-5-pro-2025-10-06")
259259

260+
@JvmField val GPT_5_1_CODEX_MAX = of("gpt-5.1-codex-max")
261+
260262
@JvmStatic fun of(value: String) = ResponsesOnlyModel(JsonField.of(value))
261263
}
262264

@@ -275,6 +277,7 @@ private constructor(
275277
GPT_5_CODEX,
276278
GPT_5_PRO,
277279
GPT_5_PRO_2025_10_06,
280+
GPT_5_1_CODEX_MAX,
278281
}
279282

280283
/**
@@ -300,6 +303,7 @@ private constructor(
300303
GPT_5_CODEX,
301304
GPT_5_PRO,
302305
GPT_5_PRO_2025_10_06,
306+
GPT_5_1_CODEX_MAX,
303307
/**
304308
* An enum member indicating that [ResponsesOnlyModel] was instantiated with an unknown
305309
* value.
@@ -329,6 +333,7 @@ private constructor(
329333
GPT_5_CODEX -> Value.GPT_5_CODEX
330334
GPT_5_PRO -> Value.GPT_5_PRO
331335
GPT_5_PRO_2025_10_06 -> Value.GPT_5_PRO_2025_10_06
336+
GPT_5_1_CODEX_MAX -> Value.GPT_5_1_CODEX_MAX
332337
else -> Value._UNKNOWN
333338
}
334339

@@ -356,6 +361,7 @@ private constructor(
356361
GPT_5_CODEX -> Known.GPT_5_CODEX
357362
GPT_5_PRO -> Known.GPT_5_PRO
358363
GPT_5_PRO_2025_10_06 -> Known.GPT_5_PRO_2025_10_06
364+
GPT_5_1_CODEX_MAX -> Known.GPT_5_1_CODEX_MAX
359365
else -> throw OpenAIInvalidDataException("Unknown ResponsesOnlyModel: $value")
360366
}
361367

openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantCreateParams.kt

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ private constructor(
9898
/**
9999
* Constrains effort on reasoning for
100100
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported
101-
* values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can
102-
* result in faster responses and fewer tokens used on reasoning in a response.
101+
* values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort
102+
* can result in faster responses and fewer tokens used on reasoning in a response.
103103
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
104104
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for
105105
* all reasoning values in gpt-5.1.
106106
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
107107
* `none`.
108108
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
109+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
109110
*
110111
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
111112
* server responded with an unexpected value).
@@ -403,14 +404,16 @@ private constructor(
403404
/**
404405
* Constrains effort on reasoning for
405406
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
406-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning
407-
* effort can result in faster responses and fewer tokens used on reasoning in a response.
407+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
408+
* reasoning effort can result in faster responses and fewer tokens used on reasoning in a
409+
* response.
408410
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
409411
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported
410412
* for all reasoning values in gpt-5.1.
411413
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
412414
* `none`.
413415
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
416+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
414417
*/
415418
fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply {
416419
body.reasoningEffort(reasoningEffort)
@@ -871,14 +874,16 @@ private constructor(
871874
/**
872875
* Constrains effort on reasoning for
873876
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
874-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning
875-
* effort can result in faster responses and fewer tokens used on reasoning in a response.
877+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
878+
* reasoning effort can result in faster responses and fewer tokens used on reasoning in a
879+
* response.
876880
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
877881
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported
878882
* for all reasoning values in gpt-5.1.
879883
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
880884
* `none`.
881885
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
886+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
882887
*
883888
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
884889
* server responded with an unexpected value).
@@ -1208,15 +1213,16 @@ private constructor(
12081213
/**
12091214
* Constrains effort on reasoning for
12101215
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1211-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1212-
* reasoning effort can result in faster responses and fewer tokens used on reasoning in
1213-
* a response.
1216+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1217+
* Reducing reasoning effort can result in faster responses and fewer tokens used on
1218+
* reasoning in a response.
12141219
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
12151220
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls
12161221
* are supported for all reasoning values in gpt-5.1.
12171222
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
12181223
* support `none`.
12191224
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1225+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
12201226
*/
12211227
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
12221228
reasoningEffort(JsonField.ofNullable(reasoningEffort))

openai-java-core/src/main/kotlin/com/openai/models/beta/assistants/AssistantUpdateParams.kt

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,15 @@ private constructor(
9090
/**
9191
* Constrains effort on reasoning for
9292
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently supported
93-
* values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning effort can
94-
* result in faster responses and fewer tokens used on reasoning in a response.
93+
* values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing reasoning effort
94+
* can result in faster responses and fewer tokens used on reasoning in a response.
9595
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
9696
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for
9797
* all reasoning values in gpt-5.1.
9898
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
9999
* `none`.
100100
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
101+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
101102
*
102103
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
103104
* server responded with an unexpected value).
@@ -397,14 +398,16 @@ private constructor(
397398
/**
398399
* Constrains effort on reasoning for
399400
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
400-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning
401-
* effort can result in faster responses and fewer tokens used on reasoning in a response.
401+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
402+
* reasoning effort can result in faster responses and fewer tokens used on reasoning in a
403+
* response.
402404
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
403405
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported
404406
* for all reasoning values in gpt-5.1.
405407
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
406408
* `none`.
407409
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
410+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
408411
*/
409412
fun reasoningEffort(reasoningEffort: ReasoningEffort?) = apply {
410413
body.reasoningEffort(reasoningEffort)
@@ -865,14 +868,16 @@ private constructor(
865868
/**
866869
* Constrains effort on reasoning for
867870
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
868-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing reasoning
869-
* effort can result in faster responses and fewer tokens used on reasoning in a response.
871+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
872+
* reasoning effort can result in faster responses and fewer tokens used on reasoning in a
873+
* response.
870874
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning
871875
* values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported
872876
* for all reasoning values in gpt-5.1.
873877
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support
874878
* `none`.
875879
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
880+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
876881
*
877882
* @throws OpenAIInvalidDataException if the JSON field has an unexpected type (e.g. if the
878883
* server responded with an unexpected value).
@@ -1195,15 +1200,16 @@ private constructor(
11951200
/**
11961201
* Constrains effort on reasoning for
11971202
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1198-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1199-
* reasoning effort can result in faster responses and fewer tokens used on reasoning in
1200-
* a response.
1203+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1204+
* Reducing reasoning effort can result in faster responses and fewer tokens used on
1205+
* reasoning in a response.
12011206
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
12021207
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls
12031208
* are supported for all reasoning values in gpt-5.1.
12041209
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
12051210
* support `none`.
12061211
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1212+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
12071213
*/
12081214
fun reasoningEffort(reasoningEffort: ReasoningEffort?) =
12091215
reasoningEffort(JsonField.ofNullable(reasoningEffort))

0 commit comments

Comments
 (0)