Skip to content

Commit 025ca83

Browse files
feat(api): gpt-5.1-codex-max and responses/compact
1 parent 80b87bb commit 025ca83

File tree

17 files changed

+512
-145
lines changed

17 files changed

+512
-145
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

MIGRATION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ client.example.list(undefined, { headers: { ... } });
134134
- `client.beta.threads.messages.list()`
135135
- `client.batches.list()`
136136
- `client.responses.retrieve()`
137+
- `client.responses.compact()`
137138
- `client.responses.inputItems.list()`
138139
- `client.responses.inputTokens.count()`
139140
- `client.realtime.calls.reject()`

api.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -696,6 +696,7 @@ Methods:
696696
Types:
697697

698698
- <code><a href="./src/resources/responses/responses.ts">ApplyPatchTool</a></code>
699+
- <code><a href="./src/resources/responses/responses.ts">CompactedResponse</a></code>
699700
- <code><a href="./src/resources/responses/responses.ts">ComputerTool</a></code>
700701
- <code><a href="./src/resources/responses/responses.ts">CustomTool</a></code>
701702
- <code><a href="./src/resources/responses/responses.ts">EasyInputMessage</a></code>
@@ -715,6 +716,8 @@ Types:
715716
- <code><a href="./src/resources/responses/responses.ts">ResponseCodeInterpreterCallInProgressEvent</a></code>
716717
- <code><a href="./src/resources/responses/responses.ts">ResponseCodeInterpreterCallInterpretingEvent</a></code>
717718
- <code><a href="./src/resources/responses/responses.ts">ResponseCodeInterpreterToolCall</a></code>
719+
- <code><a href="./src/resources/responses/responses.ts">ResponseCompactionItem</a></code>
720+
- <code><a href="./src/resources/responses/responses.ts">ResponseCompactionItemParam</a></code>
718721
- <code><a href="./src/resources/responses/responses.ts">ResponseCompletedEvent</a></code>
719722
- <code><a href="./src/resources/responses/responses.ts">ResponseComputerToolCall</a></code>
720723
- <code><a href="./src/resources/responses/responses.ts">ResponseComputerToolCallOutputItem</a></code>
@@ -822,6 +825,7 @@ Methods:
822825
- <code title="get /responses/{response_id}">client.responses.<a href="./src/resources/responses/responses.ts">retrieve</a>(responseID, { ...params }) -> Response</code>
823826
- <code title="delete /responses/{response_id}">client.responses.<a href="./src/resources/responses/responses.ts">delete</a>(responseID) -> void</code>
824827
- <code title="post /responses/{response_id}/cancel">client.responses.<a href="./src/resources/responses/responses.ts">cancel</a>(responseID) -> Response</code>
828+
- <code title="post /responses/compact">client.responses.<a href="./src/resources/responses/responses.ts">compact</a>({ ...params }) -> CompactedResponse</code>
825829

826830
## InputItems
827831

@@ -869,6 +873,7 @@ Types:
869873
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferClearedEvent</a></code>
870874
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferCommitEvent</a></code>
871875
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferCommittedEvent</a></code>
876+
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferDtmfEventReceivedEvent</a></code>
872877
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferSpeechStartedEvent</a></code>
873878
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferSpeechStoppedEvent</a></code>
874879
- <code><a href="./src/resources/realtime/realtime.ts">InputAudioBufferTimeoutTriggered</a></code>

src/resources/beta/assistants.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,16 +1160,17 @@ export interface AssistantCreateParams {
11601160
/**
11611161
* Constrains effort on reasoning for
11621162
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1163-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1164-
* reasoning effort can result in faster responses and fewer tokens used on
1165-
* reasoning in a response.
1163+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1164+
* Reducing reasoning effort can result in faster responses and fewer tokens used
1165+
* on reasoning in a response.
11661166
*
11671167
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
11681168
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
11691169
* calls are supported for all reasoning values in gpt-5.1.
11701170
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
11711171
* support `none`.
11721172
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1173+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
11731174
*/
11741175
reasoning_effort?: Shared.ReasoningEffort | null;
11751176

@@ -1420,16 +1421,17 @@ export interface AssistantUpdateParams {
14201421
/**
14211422
* Constrains effort on reasoning for
14221423
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1423-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1424-
* reasoning effort can result in faster responses and fewer tokens used on
1425-
* reasoning in a response.
1424+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1425+
* Reducing reasoning effort can result in faster responses and fewer tokens used
1426+
* on reasoning in a response.
14261427
*
14271428
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
14281429
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
14291430
* calls are supported for all reasoning values in gpt-5.1.
14301431
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
14311432
* support `none`.
14321433
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1434+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
14331435
*/
14341436
reasoning_effort?: Shared.ReasoningEffort | null;
14351437

src/resources/beta/threads/runs/runs.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -725,16 +725,17 @@ export interface RunCreateParamsBase {
725725
/**
726726
* Body param: Constrains effort on reasoning for
727727
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
728-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
729-
* reasoning effort can result in faster responses and fewer tokens used on
730-
* reasoning in a response.
728+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
729+
* Reducing reasoning effort can result in faster responses and fewer tokens used
730+
* on reasoning in a response.
731731
*
732732
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
733733
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
734734
* calls are supported for all reasoning values in gpt-5.1.
735735
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
736736
* support `none`.
737737
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
738+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
738739
*/
739740
reasoning_effort?: Shared.ReasoningEffort | null;
740741

src/resources/chat/completions/completions.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,16 +1649,17 @@ export interface ChatCompletionCreateParamsBase {
16491649
/**
16501650
* Constrains effort on reasoning for
16511651
* [reasoning models](https://platform.openai.com/docs/guides/reasoning). Currently
1652-
* supported values are `none`, `minimal`, `low`, `medium`, and `high`. Reducing
1653-
* reasoning effort can result in faster responses and fewer tokens used on
1654-
* reasoning in a response.
1652+
* supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`.
1653+
* Reducing reasoning effort can result in faster responses and fewer tokens used
1654+
* on reasoning in a response.
16551655
*
16561656
* - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported
16571657
* reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool
16581658
* calls are supported for all reasoning values in gpt-5.1.
16591659
* - All models before `gpt-5.1` default to `medium` reasoning effort, and do not
16601660
* support `none`.
16611661
* - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
1662+
* - `xhigh` is currently only supported for `gpt-5.1-codex-max`.
16621663
*/
16631664
reasoning_effort?: Shared.ReasoningEffort | null;
16641665

src/resources/containers/containers.ts

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,16 @@ export interface ContainerCreateResponse {
9191
* before the container expires.
9292
*/
9393
expires_after?: ContainerCreateResponse.ExpiresAfter;
94+
95+
/**
96+
* Unix timestamp (in seconds) when the container was last active.
97+
*/
98+
last_active_at?: number;
99+
100+
/**
101+
* The memory limit configured for the container.
102+
*/
103+
memory_limit?: '1g' | '4g' | '16g' | '64g';
94104
}
95105

96106
export namespace ContainerCreateResponse {
@@ -144,6 +154,16 @@ export interface ContainerRetrieveResponse {
144154
* before the container expires.
145155
*/
146156
expires_after?: ContainerRetrieveResponse.ExpiresAfter;
157+
158+
/**
159+
* Unix timestamp (in seconds) when the container was last active.
160+
*/
161+
last_active_at?: number;
162+
163+
/**
164+
* The memory limit configured for the container.
165+
*/
166+
memory_limit?: '1g' | '4g' | '16g' | '64g';
147167
}
148168

149169
export namespace ContainerRetrieveResponse {
@@ -197,6 +217,16 @@ export interface ContainerListResponse {
197217
* before the container expires.
198218
*/
199219
expires_after?: ContainerListResponse.ExpiresAfter;
220+
221+
/**
222+
* Unix timestamp (in seconds) when the container was last active.
223+
*/
224+
last_active_at?: number;
225+
226+
/**
227+
* The memory limit configured for the container.
228+
*/
229+
memory_limit?: '1g' | '4g' | '16g' | '64g';
200230
}
201231

202232
export namespace ContainerListResponse {
@@ -233,6 +263,11 @@ export interface ContainerCreateParams {
233263
* IDs of files to copy to the container.
234264
*/
235265
file_ids?: Array<string>;
266+
267+
/**
268+
* Optional memory limit for the container. Defaults to "1g".
269+
*/
270+
memory_limit?: '1g' | '4g' | '16g' | '64g';
236271
}
237272

238273
export namespace ContainerCreateParams {

0 commit comments

Comments
 (0)