Skip to content

Commit 961b8ca

Browse files
feat(api): remove Phase from input/output messages, PromptCacheKey from responses
1 parent aeccc5f commit 961b8ca

File tree

5 files changed

+6
-93
lines changed

5 files changed

+6
-93
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: 135
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6bfe886b5ded0fe3bf37ca672698814e16e0836a093ceef65dac37ae44d1ad6b.yml
3-
openapi_spec_hash: 6b1344a59044318e824c8d1af96033c7
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml
3+
openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0
44
config_hash: 7f49c38fa3abe9b7038ffe62262c4912

conversations/conversation_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,8 @@ func TestConversationNewWithOptionalParams(t *testing.T) {
3434
Content: responses.EasyInputMessageContentUnionParam{
3535
OfString: openai.String("string"),
3636
},
37-
Role: responses.EasyInputMessageRoleUser,
38-
Phase: responses.EasyInputMessagePhaseCommentary,
39-
Type: responses.EasyInputMessageTypeMessage,
37+
Role: responses.EasyInputMessageRoleUser,
38+
Type: responses.EasyInputMessageTypeMessage,
4039
},
4140
}},
4241
Metadata: shared.Metadata{

conversations/item_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ func TestItemNewWithOptionalParams(t *testing.T) {
3636
Content: responses.EasyInputMessageContentUnionParam{
3737
OfString: openai.String("string"),
3838
},
39-
Role: responses.EasyInputMessageRoleUser,
40-
Phase: responses.EasyInputMessagePhaseCommentary,
41-
Type: responses.EasyInputMessageTypeMessage,
39+
Role: responses.EasyInputMessageRoleUser,
40+
Type: responses.EasyInputMessageTypeMessage,
4241
},
4342
}},
4443
Include: []responses.ResponseIncludable{responses.ResponseIncludableFileSearchCallResults},

responses/response.go

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -958,15 +958,6 @@ type EasyInputMessage struct {
958958
//
959959
// Any of "user", "assistant", "system", "developer".
960960
Role EasyInputMessageRole `json:"role" api:"required"`
961-
// The phase of an assistant message.
962-
//
963-
// Use `commentary` for an intermediate assistant message and `final_answer` for
964-
// the final assistant message. For follow-up requests with models like
965-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
966-
// Omitting it can degrade performance. Not used for user messages.
967-
//
968-
// Any of "commentary", "final_answer".
969-
Phase EasyInputMessagePhase `json:"phase" api:"nullable"`
970961
// The type of the message input. Always `message`.
971962
//
972963
// Any of "message".
@@ -975,7 +966,6 @@ type EasyInputMessage struct {
975966
JSON struct {
976967
Content respjson.Field
977968
Role respjson.Field
978-
Phase respjson.Field
979969
Type respjson.Field
980970
ExtraFields map[string]respjson.Field
981971
raw string
@@ -1045,19 +1035,6 @@ const (
10451035
EasyInputMessageRoleDeveloper EasyInputMessageRole = "developer"
10461036
)
10471037

1048-
// The phase of an assistant message.
1049-
//
1050-
// Use `commentary` for an intermediate assistant message and `final_answer` for
1051-
// the final assistant message. For follow-up requests with models like
1052-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
1053-
// Omitting it can degrade performance. Not used for user messages.
1054-
type EasyInputMessagePhase string
1055-
1056-
const (
1057-
EasyInputMessagePhaseCommentary EasyInputMessagePhase = "commentary"
1058-
EasyInputMessagePhaseFinalAnswer EasyInputMessagePhase = "final_answer"
1059-
)
1060-
10611038
// The type of the message input. Always `message`.
10621039
type EasyInputMessageType string
10631040

@@ -1081,15 +1058,6 @@ type EasyInputMessageParam struct {
10811058
//
10821059
// Any of "user", "assistant", "system", "developer".
10831060
Role EasyInputMessageRole `json:"role,omitzero" api:"required"`
1084-
// The phase of an assistant message.
1085-
//
1086-
// Use `commentary` for an intermediate assistant message and `final_answer` for
1087-
// the final assistant message. For follow-up requests with models like
1088-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
1089-
// Omitting it can degrade performance. Not used for user messages.
1090-
//
1091-
// Any of "commentary", "final_answer".
1092-
Phase EasyInputMessagePhase `json:"phase,omitzero"`
10931061
// The type of the message input. Always `message`.
10941062
//
10951063
// Any of "message".
@@ -8302,7 +8270,6 @@ type ResponseInputItemUnion struct {
83028270
// [[]ResponseReasoningItemContent]
83038271
Content ResponseInputItemUnionContent `json:"content"`
83048272
Role string `json:"role"`
8305-
Phase string `json:"phase"`
83068273
// Any of "message", "message", "message", "file_search_call", "computer_call",
83078274
// "computer_call_output", "web_search_call", "function_call",
83088275
// "function_call_output", "reasoning", "compaction", "image_generation_call",
@@ -8365,7 +8332,6 @@ type ResponseInputItemUnion struct {
83658332
JSON struct {
83668333
Content respjson.Field
83678334
Role respjson.Field
8368-
Phase respjson.Field
83698335
Type respjson.Field
83708336
Status respjson.Field
83718337
ID respjson.Field
@@ -10132,16 +10098,6 @@ func (u ResponseInputItemUnionParam) GetRole() *string {
1013210098
return nil
1013310099
}
1013410100

10135-
// Returns a pointer to the underlying variant's property, if present.
10136-
func (u ResponseInputItemUnionParam) GetPhase() *string {
10137-
if vt := u.OfMessage; vt != nil {
10138-
return (*string)(&vt.Phase)
10139-
} else if vt := u.OfOutputMessage; vt != nil {
10140-
return (*string)(&vt.Phase)
10141-
}
10142-
return nil
10143-
}
10144-
1014510101
// Returns a pointer to the underlying variant's property, if present.
1014610102
func (u ResponseInputItemUnionParam) GetType() *string {
1014710103
if vt := u.OfMessage; vt != nil {
@@ -11803,8 +11759,6 @@ type ResponseItemUnion struct {
1180311759
// "shell_call_output", "apply_patch_call", "apply_patch_call_output",
1180411760
// "mcp_list_tools", "mcp_approval_request", "mcp_approval_response", "mcp_call".
1180511761
Type string `json:"type"`
11806-
// This field is from variant [ResponseOutputMessage].
11807-
Phase ResponseOutputMessagePhase `json:"phase"`
1180811762
// This field is from variant [ResponseFileSearchToolCall].
1180911763
Queries []string `json:"queries"`
1181011764
// This field is from variant [ResponseFileSearchToolCall].
@@ -11854,7 +11808,6 @@ type ResponseItemUnion struct {
1185411808
Role respjson.Field
1185511809
Status respjson.Field
1185611810
Type respjson.Field
11857-
Phase respjson.Field
1185811811
Queries respjson.Field
1185911812
Results respjson.Field
1186011813
Action respjson.Field
@@ -12784,8 +12737,6 @@ type ResponseOutputItemUnion struct {
1278412737
// "apply_patch_call", "apply_patch_call_output", "mcp_call", "mcp_list_tools",
1278512738
// "mcp_approval_request", "custom_tool_call".
1278612739
Type string `json:"type"`
12787-
// This field is from variant [ResponseOutputMessage].
12788-
Phase ResponseOutputMessagePhase `json:"phase"`
1278912740
// This field is from variant [ResponseFileSearchToolCall].
1279012741
Queries []string `json:"queries"`
1279112742
// This field is from variant [ResponseFileSearchToolCall].
@@ -12834,7 +12785,6 @@ type ResponseOutputItemUnion struct {
1283412785
Role respjson.Field
1283512786
Status respjson.Field
1283612787
Type respjson.Field
12837-
Phase respjson.Field
1283812788
Queries respjson.Field
1283912789
Results respjson.Field
1284012790
Arguments respjson.Field
@@ -13448,23 +13398,13 @@ type ResponseOutputMessage struct {
1344813398
Status ResponseOutputMessageStatus `json:"status" api:"required"`
1344913399
// The type of the output message. Always `message`.
1345013400
Type constant.Message `json:"type" api:"required"`
13451-
// The phase of an assistant message.
13452-
//
13453-
// Use `commentary` for an intermediate assistant message and `final_answer` for
13454-
// the final assistant message. For follow-up requests with models like
13455-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
13456-
// Omitting it can degrade performance. Not used for user messages.
13457-
//
13458-
// Any of "commentary", "final_answer".
13459-
Phase ResponseOutputMessagePhase `json:"phase" api:"nullable"`
1346013401
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
1346113402
JSON struct {
1346213403
ID respjson.Field
1346313404
Content respjson.Field
1346413405
Role respjson.Field
1346513406
Status respjson.Field
1346613407
Type respjson.Field
13467-
Phase respjson.Field
1346813408
ExtraFields map[string]respjson.Field
1346913409
raw string
1347013410
} `json:"-"`
@@ -13568,19 +13508,6 @@ const (
1356813508
ResponseOutputMessageStatusIncomplete ResponseOutputMessageStatus = "incomplete"
1356913509
)
1357013510

13571-
// The phase of an assistant message.
13572-
//
13573-
// Use `commentary` for an intermediate assistant message and `final_answer` for
13574-
// the final assistant message. For follow-up requests with models like
13575-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
13576-
// Omitting it can degrade performance. Not used for user messages.
13577-
type ResponseOutputMessagePhase string
13578-
13579-
const (
13580-
ResponseOutputMessagePhaseCommentary ResponseOutputMessagePhase = "commentary"
13581-
ResponseOutputMessagePhaseFinalAnswer ResponseOutputMessagePhase = "final_answer"
13582-
)
13583-
1358413511
// An output message from the model.
1358513512
//
1358613513
// The properties ID, Content, Role, Status, Type are required.
@@ -13594,15 +13521,6 @@ type ResponseOutputMessageParam struct {
1359413521
//
1359513522
// Any of "in_progress", "completed", "incomplete".
1359613523
Status ResponseOutputMessageStatus `json:"status,omitzero" api:"required"`
13597-
// The phase of an assistant message.
13598-
//
13599-
// Use `commentary` for an intermediate assistant message and `final_answer` for
13600-
// the final assistant message. For follow-up requests with models like
13601-
// `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
13602-
// Omitting it can degrade performance. Not used for user messages.
13603-
//
13604-
// Any of "commentary", "final_answer".
13605-
Phase ResponseOutputMessagePhase `json:"phase,omitzero"`
1360613524
// The role of the output message. Always `assistant`.
1360713525
//
1360813526
// This field can be elided, and will marshal its zero value as "assistant".
@@ -19591,8 +19509,6 @@ type ResponseCompactParams struct {
1959119509
// [conversation state](https://platform.openai.com/docs/guides/conversation-state).
1959219510
// Cannot be used in conjunction with `conversation`.
1959319511
PreviousResponseID param.Opt[string] `json:"previous_response_id,omitzero"`
19594-
// A key to use when reading from or writing to the prompt cache.
19595-
PromptCacheKey param.Opt[string] `json:"prompt_cache_key,omitzero"`
1959619512
// Text, image, or file inputs to the model, used to generate a response
1959719513
Input ResponseCompactParamsInputUnion `json:"input,omitzero"`
1959819514
paramObj

responses/response_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,6 @@ func TestResponseCompactWithOptionalParams(t *testing.T) {
198198
},
199199
Instructions: openai.String("instructions"),
200200
PreviousResponseID: openai.String("resp_123"),
201-
PromptCacheKey: openai.String("prompt_cache_key"),
202201
})
203202
if err != nil {
204203
var apierr *openai.Error

0 commit comments

Comments
 (0)