Skip to content

Commit f603ff1

Browse files
feat(api): remove phase from EasyInputMessage/ResponseOutputMessage, prompt_cache_key from compact
1 parent ec00ebd commit f603ff1

14 files changed

Lines changed: 11 additions & 257 deletions

File tree

.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-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

lib/openai/models/responses/easy_input_message.rb

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,13 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel
1818
# @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role]
1919
required :role, enum: -> { OpenAI::Responses::EasyInputMessage::Role }
2020

21-
# @!attribute phase
22-
# The phase of an assistant message.
23-
#
24-
# Use `commentary` for an intermediate assistant message and `final_answer` for
25-
# the final assistant message. For follow-up requests with models like
26-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
27-
# Omitting it can degrade performance. Not used for user messages.
28-
#
29-
# @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil]
30-
optional :phase, enum: -> { OpenAI::Responses::EasyInputMessage::Phase }, nil?: true
31-
3221
# @!attribute type
3322
# The type of the message input. Always `message`.
3423
#
3524
# @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type, nil]
3625
optional :type, enum: -> { OpenAI::Responses::EasyInputMessage::Type }
3726

38-
# @!method initialize(content:, role:, phase: nil, type: nil)
27+
# @!method initialize(content:, role:, type: nil)
3928
# Some parameter documentations has been truncated, see
4029
# {OpenAI::Models::Responses::EasyInputMessage} for more details.
4130
#
@@ -49,8 +38,6 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel
4938
#
5039
# @param role [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] The role of the message input. One of `user`, `assistant`, `system`, or
5140
#
52-
# @param phase [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] The phase of an assistant message.
53-
#
5441
# @param type [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type] The type of the message input. Always `message`.
5542

5643
# Text, image, or audio input to the model, used to generate a response. Can also
@@ -87,24 +74,6 @@ module Role
8774
# @return [Array<Symbol>]
8875
end
8976

90-
# The phase of an assistant message.
91-
#
92-
# Use `commentary` for an intermediate assistant message and `final_answer` for
93-
# the final assistant message. For follow-up requests with models like
94-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
95-
# Omitting it can degrade performance. Not used for user messages.
96-
#
97-
# @see OpenAI::Models::Responses::EasyInputMessage#phase
98-
module Phase
99-
extend OpenAI::Internal::Type::Enum
100-
101-
COMMENTARY = :commentary
102-
FINAL_ANSWER = :final_answer
103-
104-
# @!method self.values
105-
# @return [Array<Symbol>]
106-
end
107-
10877
# The type of the message input. Always `message`.
10978
#
11079
# @see OpenAI::Models::Responses::EasyInputMessage#type

lib/openai/models/responses/response_compact_params.rb

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel
4242
# @return [String, nil]
4343
optional :previous_response_id, String, nil?: true
4444

45-
# @!attribute prompt_cache_key
46-
# A key to use when reading from or writing to the prompt cache.
47-
#
48-
# @return [String, nil]
49-
optional :prompt_cache_key, String, nil?: true
50-
51-
# @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {})
45+
# @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {})
5246
# Some parameter documentations has been truncated, see
5347
# {OpenAI::Models::Responses::ResponseCompactParams} for more details.
5448
#
@@ -60,8 +54,6 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel
6054
#
6155
# @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu
6256
#
63-
# @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache.
64-
#
6557
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
6658

6759
# Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a

lib/openai/models/responses/response_output_message.rb

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,7 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel
3636
# @return [Symbol, :message]
3737
required :type, const: :message
3838

39-
# @!attribute phase
40-
# The phase of an assistant message.
41-
#
42-
# Use `commentary` for an intermediate assistant message and `final_answer` for
43-
# the final assistant message. For follow-up requests with models like
44-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
45-
# Omitting it can degrade performance. Not used for user messages.
46-
#
47-
# @return [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil]
48-
optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true
49-
50-
# @!method initialize(id:, content:, status:, phase: nil, role: :assistant, type: :message)
39+
# @!method initialize(id:, content:, status:, role: :assistant, type: :message)
5140
# Some parameter documentations has been truncated, see
5241
# {OpenAI::Models::Responses::ResponseOutputMessage} for more details.
5342
#
@@ -59,8 +48,6 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel
5948
#
6049
# @param status [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Status] The status of the message input. One of `in_progress`, `completed`, or
6150
#
62-
# @param phase [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] The phase of an assistant message.
63-
#
6451
# @param role [Symbol, :assistant] The role of the output message. Always `assistant`.
6552
#
6653
# @param type [Symbol, :message] The type of the output message. Always `message`.
@@ -95,24 +82,6 @@ module Status
9582
# @!method self.values
9683
# @return [Array<Symbol>]
9784
end
98-
99-
# The phase of an assistant message.
100-
#
101-
# Use `commentary` for an intermediate assistant message and `final_answer` for
102-
# the final assistant message. For follow-up requests with models like
103-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
104-
# Omitting it can degrade performance. Not used for user messages.
105-
#
106-
# @see OpenAI::Models::Responses::ResponseOutputMessage#phase
107-
module Phase
108-
extend OpenAI::Internal::Type::Enum
109-
110-
COMMENTARY = :commentary
111-
FINAL_ANSWER = :final_answer
112-
113-
# @!method self.values
114-
# @return [Array<Symbol>]
115-
end
11685
end
11786
end
11887
end

lib/openai/resources/responses.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def cancel(response_id, params = {})
473473
# For ZDR-compatible compaction details, see
474474
# [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced).
475475
#
476-
# @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {})
476+
# @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {})
477477
#
478478
# @param model [Symbol, String, OpenAI::Models::Responses::ResponseCompactParams::Model, nil] Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a wi
479479
#
@@ -483,8 +483,6 @@ def cancel(response_id, params = {})
483483
#
484484
# @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu
485485
#
486-
# @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache.
487-
#
488486
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
489487
#
490488
# @return [OpenAI::Models::Responses::CompactedResponse]

rbi/openai/models/responses/easy_input_message.rbi

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,6 @@ module OpenAI
2222
sig { returns(OpenAI::Responses::EasyInputMessage::Role::OrSymbol) }
2323
attr_accessor :role
2424

25-
# The phase of an assistant message.
26-
#
27-
# Use `commentary` for an intermediate assistant message and `final_answer` for
28-
# the final assistant message. For follow-up requests with models like
29-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
30-
# Omitting it can degrade performance. Not used for user messages.
31-
sig do
32-
returns(
33-
T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol)
34-
)
35-
end
36-
attr_accessor :phase
37-
3825
# The type of the message input. Always `message`.
3926
sig do
4027
returns(
@@ -57,8 +44,6 @@ module OpenAI
5744
params(
5845
content: OpenAI::Responses::EasyInputMessage::Content::Variants,
5946
role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol,
60-
phase:
61-
T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol),
6247
type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol
6348
).returns(T.attached_class)
6449
end
@@ -69,13 +54,6 @@ module OpenAI
6954
# The role of the message input. One of `user`, `assistant`, `system`, or
7055
# `developer`.
7156
role:,
72-
# The phase of an assistant message.
73-
#
74-
# Use `commentary` for an intermediate assistant message and `final_answer` for
75-
# the final assistant message. For follow-up requests with models like
76-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
77-
# Omitting it can degrade performance. Not used for user messages.
78-
phase: nil,
7957
# The type of the message input. Always `message`.
8058
type: nil
8159
)
@@ -86,8 +64,6 @@ module OpenAI
8664
{
8765
content: OpenAI::Responses::EasyInputMessage::Content::Variants,
8866
role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol,
89-
phase:
90-
T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol),
9167
type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol
9268
}
9369
)
@@ -158,41 +134,6 @@ module OpenAI
158134
end
159135
end
160136

161-
# The phase of an assistant message.
162-
#
163-
# Use `commentary` for an intermediate assistant message and `final_answer` for
164-
# the final assistant message. For follow-up requests with models like
165-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
166-
# Omitting it can degrade performance. Not used for user messages.
167-
module Phase
168-
extend OpenAI::Internal::Type::Enum
169-
170-
TaggedSymbol =
171-
T.type_alias do
172-
T.all(Symbol, OpenAI::Responses::EasyInputMessage::Phase)
173-
end
174-
OrSymbol = T.type_alias { T.any(Symbol, String) }
175-
176-
COMMENTARY =
177-
T.let(
178-
:commentary,
179-
OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol
180-
)
181-
FINAL_ANSWER =
182-
T.let(
183-
:final_answer,
184-
OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol
185-
)
186-
187-
sig do
188-
override.returns(
189-
T::Array[OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol]
190-
)
191-
end
192-
def self.values
193-
end
194-
end
195-
196137
# The type of the message input. Always `message`.
197138
module Type
198139
extend OpenAI::Internal::Type::Enum

rbi/openai/models/responses/response_compact_params.rbi

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,6 @@ module OpenAI
5454
sig { returns(T.nilable(String)) }
5555
attr_accessor :previous_response_id
5656

57-
# A key to use when reading from or writing to the prompt cache.
58-
sig { returns(T.nilable(String)) }
59-
attr_accessor :prompt_cache_key
60-
6157
sig do
6258
params(
6359
model:
@@ -73,7 +69,6 @@ module OpenAI
7369
),
7470
instructions: T.nilable(String),
7571
previous_response_id: T.nilable(String),
76-
prompt_cache_key: T.nilable(String),
7772
request_options: OpenAI::RequestOptions::OrHash
7873
).returns(T.attached_class)
7974
end
@@ -96,8 +91,6 @@ module OpenAI
9691
# [conversation state](https://platform.openai.com/docs/guides/conversation-state).
9792
# Cannot be used in conjunction with `conversation`.
9893
previous_response_id: nil,
99-
# A key to use when reading from or writing to the prompt cache.
100-
prompt_cache_key: nil,
10194
request_options: {}
10295
)
10396
end
@@ -118,7 +111,6 @@ module OpenAI
118111
),
119112
instructions: T.nilable(String),
120113
previous_response_id: T.nilable(String),
121-
prompt_cache_key: T.nilable(String),
122114
request_options: OpenAI::RequestOptions
123115
}
124116
)

rbi/openai/models/responses/response_output_message.rbi

Lines changed: 1 addition & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@ module OpenAI
4444
sig { returns(Symbol) }
4545
attr_accessor :type
4646

47-
# The phase of an assistant message.
48-
#
49-
# Use `commentary` for an intermediate assistant message and `final_answer` for
50-
# the final assistant message. For follow-up requests with models like
51-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
52-
# Omitting it can degrade performance. Not used for user messages.
53-
sig do
54-
returns(
55-
T.nilable(OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol)
56-
)
57-
end
58-
attr_accessor :phase
59-
6047
# An output message from the model.
6148
sig do
6249
params(
@@ -69,10 +56,6 @@ module OpenAI
6956
)
7057
],
7158
status: OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol,
72-
phase:
73-
T.nilable(
74-
OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol
75-
),
7659
role: Symbol,
7760
type: Symbol
7861
).returns(T.attached_class)
@@ -85,13 +68,6 @@ module OpenAI
8568
# The status of the message input. One of `in_progress`, `completed`, or
8669
# `incomplete`. Populated when input items are returned via API.
8770
status:,
88-
# The phase of an assistant message.
89-
#
90-
# Use `commentary` for an intermediate assistant message and `final_answer` for
91-
# the final assistant message. For follow-up requests with models like
92-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
93-
# Omitting it can degrade performance. Not used for user messages.
94-
phase: nil,
9571
# The role of the output message. Always `assistant`.
9672
role: :assistant,
9773
# The type of the output message. Always `message`.
@@ -113,11 +89,7 @@ module OpenAI
11389
role: Symbol,
11490
status:
11591
OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol,
116-
type: Symbol,
117-
phase:
118-
T.nilable(
119-
OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol
120-
)
92+
type: Symbol
12193
}
12294
)
12395
end
@@ -184,43 +156,6 @@ module OpenAI
184156
def self.values
185157
end
186158
end
187-
188-
# The phase of an assistant message.
189-
#
190-
# Use `commentary` for an intermediate assistant message and `final_answer` for
191-
# the final assistant message. For follow-up requests with models like
192-
# `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages.
193-
# Omitting it can degrade performance. Not used for user messages.
194-
module Phase
195-
extend OpenAI::Internal::Type::Enum
196-
197-
TaggedSymbol =
198-
T.type_alias do
199-
T.all(Symbol, OpenAI::Responses::ResponseOutputMessage::Phase)
200-
end
201-
OrSymbol = T.type_alias { T.any(Symbol, String) }
202-
203-
COMMENTARY =
204-
T.let(
205-
:commentary,
206-
OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol
207-
)
208-
FINAL_ANSWER =
209-
T.let(
210-
:final_answer,
211-
OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol
212-
)
213-
214-
sig do
215-
override.returns(
216-
T::Array[
217-
OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol
218-
]
219-
)
220-
end
221-
def self.values
222-
end
223-
end
224159
end
225160
end
226161
end

0 commit comments

Comments
 (0)