Skip to content

Commit 4a0cf29

Browse files
fix(api): readd phase
1 parent 088fca6 commit 4a0cf29

File tree

5 files changed

+26
-2
lines changed

5 files changed

+26
-2
lines changed

.stats.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 147
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml
3-
openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml
3+
openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02
44
config_hash: 7f49c38fa3abe9b7038ffe62262c4912

src/resources/responses/responses.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,14 @@ export interface EasyInputMessage {
421421
*/
422422
role: 'user' | 'assistant' | 'system' | 'developer';
423423

424+
/**
425+
* Labels an `assistant` message as intermediate commentary (`commentary`) or the
426+
* final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
427+
* sending follow-up requests, preserve and resend phase on all assistant messages
428+
* — dropping it can degrade performance. Not used for user messages.
429+
*/
430+
phase?: 'commentary' | null;
431+
424432
/**
425433
* The type of the message input. Always `message`.
426434
*/
@@ -4741,6 +4749,14 @@ export interface ResponseOutputMessage {
47414749
* The type of the output message. Always `message`.
47424750
*/
47434751
type: 'message';
4752+
4753+
/**
4754+
* Labels an `assistant` message as intermediate commentary (`commentary`) or the
4755+
* final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when
4756+
* sending follow-up requests, preserve and resend phase on all assistant messages
4757+
* — dropping it can degrade performance. Not used for user messages.
4758+
*/
4759+
phase?: 'commentary' | null;
47444760
}
47454761

47464762
/**
@@ -7273,6 +7289,11 @@ export interface ResponseCompactParams {
72737289
* Cannot be used in conjunction with `conversation`.
72747290
*/
72757291
previous_response_id?: string | null;
7292+
7293+
/**
7294+
* A key to use when reading from or writing to the prompt cache.
7295+
*/
7296+
prompt_cache_key?: string | null;
72767297
}
72777298

72787299
Responses.InputItems = InputItems;

tests/api-resources/conversations/conversations.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ describe('resource conversations', () => {
2828
{
2929
content: 'string',
3030
role: 'user',
31+
phase: 'commentary',
3132
type: 'message',
3233
},
3334
],

tests/api-resources/conversations/items.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ describe('resource items', () => {
3333
{
3434
content: 'string',
3535
role: 'user',
36+
phase: 'commentary',
3637
type: 'message',
3738
},
3839
],

tests/api-resources/responses/responses.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ describe('resource responses', () => {
9191
input: 'string',
9292
instructions: 'instructions',
9393
previous_response_id: 'resp_123',
94+
prompt_cache_key: 'prompt_cache_key',
9495
});
9596
});
9697
});

0 commit comments

Comments
 (0)