From f603ff148798d0d47ee2caa7281dce30547cdbd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:08:58 +0000 Subject: [PATCH 1/4] feat(api): remove phase from EasyInputMessage/ResponseOutputMessage, prompt_cache_key from compact --- .stats.yml | 4 +- .../models/responses/easy_input_message.rb | 33 +-------- .../responses/response_compact_params.rb | 10 +-- .../responses/response_output_message.rb | 33 +-------- lib/openai/resources/responses.rb | 4 +- .../models/responses/easy_input_message.rbi | 59 ---------------- .../responses/response_compact_params.rbi | 8 --- .../responses/response_output_message.rbi | 67 +------------------ rbi/openai/resources/responses.rbi | 3 - .../models/responses/easy_input_message.rbs | 16 ----- .../responses/response_compact_params.rbs | 7 +- .../responses/response_output_message.rbs | 20 +----- sig/openai/resources/responses.rbs | 1 - .../resources/responses/input_items_test.rb | 3 +- 14 files changed, 11 insertions(+), 257 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d7b67e1..50440f04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 147 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-6bfe886b5ded0fe3bf37ca672698814e16e0836a093ceef65dac37ae44d1ad6b.yml -openapi_spec_hash: 6b1344a59044318e824c8d1af96033c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml +openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/lib/openai/models/responses/easy_input_message.rb b/lib/openai/models/responses/easy_input_message.rb index c14ce179..64f37584 100644 --- a/lib/openai/models/responses/easy_input_message.rb +++ b/lib/openai/models/responses/easy_input_message.rb @@ -18,24 +18,13 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] required :role, enum: -> { OpenAI::Responses::EasyInputMessage::Role } - # @!attribute phase - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - # - # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] - optional :phase, enum: -> { OpenAI::Responses::EasyInputMessage::Phase }, nil?: true - # @!attribute type # The type of the message input. Always `message`. # # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type, nil] optional :type, enum: -> { OpenAI::Responses::EasyInputMessage::Type } - # @!method initialize(content:, role:, phase: nil, type: nil) + # @!method initialize(content:, role:, type: nil) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::EasyInputMessage} for more details. # @@ -49,8 +38,6 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel # # @param role [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] The role of the message input. One of `user`, `assistant`, `system`, or # - # @param phase [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] The phase of an assistant message. - # # @param type [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type] The type of the message input. Always `message`. # Text, image, or audio input to the model, used to generate a response. Can also @@ -87,24 +74,6 @@ module Role # @return [Array] end - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - # - # @see OpenAI::Models::Responses::EasyInputMessage#phase - module Phase - extend OpenAI::Internal::Type::Enum - - COMMENTARY = :commentary - FINAL_ANSWER = :final_answer - - # @!method self.values - # @return [Array] - end - # The type of the message input. Always `message`. # # @see OpenAI::Models::Responses::EasyInputMessage#type diff --git a/lib/openai/models/responses/response_compact_params.rb b/lib/openai/models/responses/response_compact_params.rb index 737e6229..1185f387 100644 --- a/lib/openai/models/responses/response_compact_params.rb +++ b/lib/openai/models/responses/response_compact_params.rb @@ -42,13 +42,7 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :previous_response_id, String, nil?: true - # @!attribute prompt_cache_key - # A key to use when reading from or writing to the prompt cache. - # - # @return [String, nil] - optional :prompt_cache_key, String, nil?: true - - # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {}) + # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {}) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::ResponseCompactParams} for more details. # @@ -60,8 +54,6 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu # - # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. - # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a diff --git a/lib/openai/models/responses/response_output_message.rb b/lib/openai/models/responses/response_output_message.rb index 1a45e0f5..0f5f43e6 100644 --- a/lib/openai/models/responses/response_output_message.rb +++ b/lib/openai/models/responses/response_output_message.rb @@ -36,18 +36,7 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel # @return [Symbol, :message] required :type, const: :message - # @!attribute phase - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - # - # @return [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] - optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true - - # @!method initialize(id:, content:, status:, phase: nil, role: :assistant, type: :message) + # @!method initialize(id:, content:, status:, role: :assistant, type: :message) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::ResponseOutputMessage} for more details. # @@ -59,8 +48,6 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel # # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Status] The status of the message input. One of `in_progress`, `completed`, or # - # @param phase [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] The phase of an assistant message. - # # @param role [Symbol, :assistant] The role of the output message. Always `assistant`. # # @param type [Symbol, :message] The type of the output message. Always `message`. @@ -95,24 +82,6 @@ module Status # @!method self.values # @return [Array] end - - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - # - # @see OpenAI::Models::Responses::ResponseOutputMessage#phase - module Phase - extend OpenAI::Internal::Type::Enum - - COMMENTARY = :commentary - FINAL_ANSWER = :final_answer - - # @!method self.values - # @return [Array] - end end end end diff --git a/lib/openai/resources/responses.rb b/lib/openai/resources/responses.rb index ee888e7f..0a131de1 100644 --- a/lib/openai/resources/responses.rb +++ b/lib/openai/resources/responses.rb @@ -473,7 +473,7 @@ def cancel(response_id, params = {}) # For ZDR-compatible compaction details, see # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). # - # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {}) + # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {}) # # @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 # @@ -483,8 +483,6 @@ def cancel(response_id, params = {}) # # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu # - # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. - # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [OpenAI::Models::Responses::CompactedResponse] diff --git a/rbi/openai/models/responses/easy_input_message.rbi b/rbi/openai/models/responses/easy_input_message.rbi index b2c81c0a..10935954 100644 --- a/rbi/openai/models/responses/easy_input_message.rbi +++ b/rbi/openai/models/responses/easy_input_message.rbi @@ -22,19 +22,6 @@ module OpenAI sig { returns(OpenAI::Responses::EasyInputMessage::Role::OrSymbol) } attr_accessor :role - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - sig do - returns( - T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol) - ) - end - attr_accessor :phase - # The type of the message input. Always `message`. sig do returns( @@ -57,8 +44,6 @@ module OpenAI params( content: OpenAI::Responses::EasyInputMessage::Content::Variants, role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol, - phase: - T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol), type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol ).returns(T.attached_class) end @@ -69,13 +54,6 @@ module OpenAI # The role of the message input. One of `user`, `assistant`, `system`, or # `developer`. role:, - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - phase: nil, # The type of the message input. Always `message`. type: nil ) @@ -86,8 +64,6 @@ module OpenAI { content: OpenAI::Responses::EasyInputMessage::Content::Variants, role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol, - phase: - T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol), type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol } ) @@ -158,41 +134,6 @@ module OpenAI end end - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - module Phase - extend OpenAI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, OpenAI::Responses::EasyInputMessage::Phase) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - COMMENTARY = - T.let( - :commentary, - OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol - ) - FINAL_ANSWER = - T.let( - :final_answer, - OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol - ) - - sig do - override.returns( - T::Array[OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol] - ) - end - def self.values - end - end - # The type of the message input. Always `message`. module Type extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/response_compact_params.rbi b/rbi/openai/models/responses/response_compact_params.rbi index 83ea073d..875dbd30 100644 --- a/rbi/openai/models/responses/response_compact_params.rbi +++ b/rbi/openai/models/responses/response_compact_params.rbi @@ -54,10 +54,6 @@ module OpenAI sig { returns(T.nilable(String)) } attr_accessor :previous_response_id - # A key to use when reading from or writing to the prompt cache. - sig { returns(T.nilable(String)) } - attr_accessor :prompt_cache_key - sig do params( model: @@ -73,7 +69,6 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), - prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions::OrHash ).returns(T.attached_class) end @@ -96,8 +91,6 @@ module OpenAI # [conversation state](https://platform.openai.com/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, - # A key to use when reading from or writing to the prompt cache. - prompt_cache_key: nil, request_options: {} ) end @@ -118,7 +111,6 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), - prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions } ) diff --git a/rbi/openai/models/responses/response_output_message.rbi b/rbi/openai/models/responses/response_output_message.rbi index e09b7ea3..8e057823 100644 --- a/rbi/openai/models/responses/response_output_message.rbi +++ b/rbi/openai/models/responses/response_output_message.rbi @@ -44,19 +44,6 @@ module OpenAI sig { returns(Symbol) } attr_accessor :type - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - sig do - returns( - T.nilable(OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol) - ) - end - attr_accessor :phase - # An output message from the model. sig do params( @@ -69,10 +56,6 @@ module OpenAI ) ], status: OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol, - phase: - T.nilable( - OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol - ), role: Symbol, type: Symbol ).returns(T.attached_class) @@ -85,13 +68,6 @@ module OpenAI # The status of the message input. One of `in_progress`, `completed`, or # `incomplete`. Populated when input items are returned via API. status:, - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - phase: nil, # The role of the output message. Always `assistant`. role: :assistant, # The type of the output message. Always `message`. @@ -113,11 +89,7 @@ module OpenAI role: Symbol, status: OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol, - type: Symbol, - phase: - T.nilable( - OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol - ) + type: Symbol } ) end @@ -184,43 +156,6 @@ module OpenAI def self.values end end - - # The phase of an assistant message. - # - # Use `commentary` for an intermediate assistant message and `final_answer` for - # the final assistant message. For follow-up requests with models like - # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. - # Omitting it can degrade performance. Not used for user messages. - module Phase - extend OpenAI::Internal::Type::Enum - - TaggedSymbol = - T.type_alias do - T.all(Symbol, OpenAI::Responses::ResponseOutputMessage::Phase) - end - OrSymbol = T.type_alias { T.any(Symbol, String) } - - COMMENTARY = - T.let( - :commentary, - OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol - ) - FINAL_ANSWER = - T.let( - :final_answer, - OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol - ) - - sig do - override.returns( - T::Array[ - OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol - ] - ) - end - def self.values - end - end end end end diff --git a/rbi/openai/resources/responses.rbi b/rbi/openai/resources/responses.rbi index abd25051..45ef00ad 100644 --- a/rbi/openai/resources/responses.rbi +++ b/rbi/openai/resources/responses.rbi @@ -981,7 +981,6 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), - prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions::OrHash ).returns(OpenAI::Responses::CompactedResponse) end @@ -1004,8 +1003,6 @@ module OpenAI # [conversation state](https://platform.openai.com/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, - # A key to use when reading from or writing to the prompt cache. - prompt_cache_key: nil, request_options: {} ) end diff --git a/sig/openai/models/responses/easy_input_message.rbs b/sig/openai/models/responses/easy_input_message.rbs index 587764bb..eb94d8c1 100644 --- a/sig/openai/models/responses/easy_input_message.rbs +++ b/sig/openai/models/responses/easy_input_message.rbs @@ -5,7 +5,6 @@ module OpenAI { content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, - phase: OpenAI::Models::Responses::EasyInputMessage::phase?, type: OpenAI::Models::Responses::EasyInputMessage::type_ } @@ -14,8 +13,6 @@ module OpenAI attr_accessor role: OpenAI::Models::Responses::EasyInputMessage::role - attr_accessor phase: OpenAI::Models::Responses::EasyInputMessage::phase? - attr_reader type: OpenAI::Models::Responses::EasyInputMessage::type_? def type=: ( @@ -25,14 +22,12 @@ module OpenAI def initialize: ( content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, - ?phase: OpenAI::Models::Responses::EasyInputMessage::phase?, ?type: OpenAI::Models::Responses::EasyInputMessage::type_ ) -> void def to_hash: -> { content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, - phase: OpenAI::Models::Responses::EasyInputMessage::phase?, type: OpenAI::Models::Responses::EasyInputMessage::type_ } @@ -59,17 +54,6 @@ module OpenAI def self?.values: -> ::Array[OpenAI::Models::Responses::EasyInputMessage::role] end - type phase = :commentary | :final_answer - - module Phase - extend OpenAI::Internal::Type::Enum - - COMMENTARY: :commentary - FINAL_ANSWER: :final_answer - - def self?.values: -> ::Array[OpenAI::Models::Responses::EasyInputMessage::phase] - end - type type_ = :message module Type diff --git a/sig/openai/models/responses/response_compact_params.rbs b/sig/openai/models/responses/response_compact_params.rbs index 6dfd450d..d104177e 100644 --- a/sig/openai/models/responses/response_compact_params.rbs +++ b/sig/openai/models/responses/response_compact_params.rbs @@ -6,8 +6,7 @@ module OpenAI model: OpenAI::Models::Responses::ResponseCompactParams::model?, input: OpenAI::Models::Responses::ResponseCompactParams::input?, instructions: String?, - previous_response_id: String?, - prompt_cache_key: String? + previous_response_id: String? } & OpenAI::Internal::Type::request_parameters @@ -23,14 +22,11 @@ module OpenAI attr_accessor previous_response_id: String? - attr_accessor prompt_cache_key: String? - def initialize: ( model: OpenAI::Models::Responses::ResponseCompactParams::model?, ?input: OpenAI::Models::Responses::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, - ?prompt_cache_key: String?, ?request_options: OpenAI::request_opts ) -> void @@ -39,7 +35,6 @@ module OpenAI input: OpenAI::Models::Responses::ResponseCompactParams::input?, instructions: String?, previous_response_id: String?, - prompt_cache_key: String?, request_options: OpenAI::RequestOptions } diff --git a/sig/openai/models/responses/response_output_message.rbs b/sig/openai/models/responses/response_output_message.rbs index 0a0097a7..223256b8 100644 --- a/sig/openai/models/responses/response_output_message.rbs +++ b/sig/openai/models/responses/response_output_message.rbs @@ -7,8 +7,7 @@ module OpenAI content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], role: :assistant, status: OpenAI::Models::Responses::ResponseOutputMessage::status, - type: :message, - phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? + type: :message } class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel @@ -22,13 +21,10 @@ module OpenAI attr_accessor type: :message - attr_accessor phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? - def initialize: ( id: String, content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], status: OpenAI::Models::Responses::ResponseOutputMessage::status, - ?phase: OpenAI::Models::Responses::ResponseOutputMessage::phase?, ?role: :assistant, ?type: :message ) -> void @@ -38,8 +34,7 @@ module OpenAI content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], role: :assistant, status: OpenAI::Models::Responses::ResponseOutputMessage::status, - type: :message, - phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? + type: :message } type content = @@ -63,17 +58,6 @@ module OpenAI def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputMessage::status] end - - type phase = :commentary | :final_answer - - module Phase - extend OpenAI::Internal::Type::Enum - - COMMENTARY: :commentary - FINAL_ANSWER: :final_answer - - def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputMessage::phase] - end end end end diff --git a/sig/openai/resources/responses.rbs b/sig/openai/resources/responses.rbs index 748fd845..e0c549f3 100644 --- a/sig/openai/resources/responses.rbs +++ b/sig/openai/resources/responses.rbs @@ -128,7 +128,6 @@ module OpenAI ?input: OpenAI::Models::Responses::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, - ?prompt_cache_key: String?, ?request_options: OpenAI::request_opts ) -> OpenAI::Responses::CompactedResponse diff --git a/test/openai/resources/responses/input_items_test.rb b/test/openai/resources/responses/input_items_test.rb index 557416f6..4a0970a9 100644 --- a/test/openai/resources/responses/input_items_test.rb +++ b/test/openai/resources/responses/input_items_test.rb @@ -56,8 +56,7 @@ def test_list id: String, content: ^(OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseOutputMessage::Content]), role: Symbol, - status: OpenAI::Responses::ResponseOutputMessage::Status, - phase: OpenAI::Responses::ResponseOutputMessage::Phase | nil + status: OpenAI::Responses::ResponseOutputMessage::Status } in { type: :file_search_call, From a78d02b807f9282b7ba6b311c9205b9998735814 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:16:38 +0000 Subject: [PATCH 2/4] fix(api): readd phase --- .stats.yml | 4 +- .../models/responses/easy_input_message.rb | 28 +++++++++- .../responses/response_compact_params.rb | 10 +++- .../responses/response_output_message.rb | 28 +++++++++- lib/openai/resources/responses.rb | 4 +- .../models/responses/easy_input_message.rbi | 48 ++++++++++++++++ .../responses/response_compact_params.rbi | 8 +++ .../responses/response_output_message.rbi | 56 ++++++++++++++++++- rbi/openai/resources/responses.rbi | 3 + .../models/responses/easy_input_message.rbs | 15 +++++ .../responses/response_compact_params.rbs | 7 ++- .../responses/response_output_message.rbs | 19 ++++++- sig/openai/resources/responses.rbs | 1 + .../resources/responses/input_items_test.rb | 3 +- 14 files changed, 223 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 50440f04..851c01ec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 147 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-a0aa54a302fbd7fff4ed7ad8a8547587d37b63324fc4af652bfa685ee9f8da44.yml -openapi_spec_hash: e45c5af19307cfc8b9baa4b8f8e865a0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml +openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/lib/openai/models/responses/easy_input_message.rb b/lib/openai/models/responses/easy_input_message.rb index 64f37584..7b58c67f 100644 --- a/lib/openai/models/responses/easy_input_message.rb +++ b/lib/openai/models/responses/easy_input_message.rb @@ -18,13 +18,22 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] required :role, enum: -> { OpenAI::Responses::EasyInputMessage::Role } + # @!attribute phase + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + # + # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] + optional :phase, enum: -> { OpenAI::Responses::EasyInputMessage::Phase }, nil?: true + # @!attribute type # The type of the message input. Always `message`. # # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type, nil] optional :type, enum: -> { OpenAI::Responses::EasyInputMessage::Type } - # @!method initialize(content:, role:, type: nil) + # @!method initialize(content:, role:, phase: nil, type: nil) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::EasyInputMessage} for more details. # @@ -38,6 +47,8 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel # # @param role [Symbol, OpenAI::Models::Responses::EasyInputMessage::Role] The role of the message input. One of `user`, `assistant`, `system`, or # + # @param phase [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # # @param type [Symbol, OpenAI::Models::Responses::EasyInputMessage::Type] The type of the message input. Always `message`. # Text, image, or audio input to the model, used to generate a response. Can also @@ -74,6 +85,21 @@ module Role # @return [Array] end + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + # + # @see OpenAI::Models::Responses::EasyInputMessage#phase + module Phase + extend OpenAI::Internal::Type::Enum + + COMMENTARY = :commentary + + # @!method self.values + # @return [Array] + end + # The type of the message input. Always `message`. # # @see OpenAI::Models::Responses::EasyInputMessage#type diff --git a/lib/openai/models/responses/response_compact_params.rb b/lib/openai/models/responses/response_compact_params.rb index 1185f387..737e6229 100644 --- a/lib/openai/models/responses/response_compact_params.rb +++ b/lib/openai/models/responses/response_compact_params.rb @@ -42,7 +42,13 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :previous_response_id, String, nil?: true - # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {}) + # @!attribute prompt_cache_key + # A key to use when reading from or writing to the prompt cache. + # + # @return [String, nil] + optional :prompt_cache_key, String, nil?: true + + # @!method initialize(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {}) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::ResponseCompactParams} for more details. # @@ -54,6 +60,8 @@ class ResponseCompactParams < OpenAI::Internal::Type::BaseModel # # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu # + # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. + # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] # Model ID used to generate the response, like `gpt-5` or `o3`. OpenAI offers a diff --git a/lib/openai/models/responses/response_output_message.rb b/lib/openai/models/responses/response_output_message.rb index 0f5f43e6..34816839 100644 --- a/lib/openai/models/responses/response_output_message.rb +++ b/lib/openai/models/responses/response_output_message.rb @@ -36,7 +36,16 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel # @return [Symbol, :message] required :type, const: :message - # @!method initialize(id:, content:, status:, role: :assistant, type: :message) + # @!attribute phase + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + # + # @return [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] + optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true + + # @!method initialize(id:, content:, status:, phase: nil, role: :assistant, type: :message) # Some parameter documentations has been truncated, see # {OpenAI::Models::Responses::ResponseOutputMessage} for more details. # @@ -48,6 +57,8 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel # # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Status] The status of the message input. One of `in_progress`, `completed`, or # + # @param phase [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] Labels an `assistant` message as intermediate commentary (`commentary`) or the f + # # @param role [Symbol, :assistant] The role of the output message. Always `assistant`. # # @param type [Symbol, :message] The type of the output message. Always `message`. @@ -82,6 +93,21 @@ module Status # @!method self.values # @return [Array] end + + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + # + # @see OpenAI::Models::Responses::ResponseOutputMessage#phase + module Phase + extend OpenAI::Internal::Type::Enum + + COMMENTARY = :commentary + + # @!method self.values + # @return [Array] + end end end end diff --git a/lib/openai/resources/responses.rb b/lib/openai/resources/responses.rb index 0a131de1..ee888e7f 100644 --- a/lib/openai/resources/responses.rb +++ b/lib/openai/resources/responses.rb @@ -473,7 +473,7 @@ def cancel(response_id, params = {}) # For ZDR-compatible compaction details, see # [Compaction (advanced)](https://platform.openai.com/docs/guides/conversation-state#compaction-advanced). # - # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, request_options: {}) + # @overload compact(model:, input: nil, instructions: nil, previous_response_id: nil, prompt_cache_key: nil, request_options: {}) # # @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 # @@ -483,6 +483,8 @@ def cancel(response_id, params = {}) # # @param previous_response_id [String, nil] The unique ID of the previous response to the model. Use this to create multi-tu # + # @param prompt_cache_key [String, nil] A key to use when reading from or writing to the prompt cache. + # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # # @return [OpenAI::Models::Responses::CompactedResponse] diff --git a/rbi/openai/models/responses/easy_input_message.rbi b/rbi/openai/models/responses/easy_input_message.rbi index 10935954..968601a2 100644 --- a/rbi/openai/models/responses/easy_input_message.rbi +++ b/rbi/openai/models/responses/easy_input_message.rbi @@ -22,6 +22,17 @@ module OpenAI sig { returns(OpenAI::Responses::EasyInputMessage::Role::OrSymbol) } attr_accessor :role + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + sig do + returns( + T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol) + ) + end + attr_accessor :phase + # The type of the message input. Always `message`. sig do returns( @@ -44,6 +55,8 @@ module OpenAI params( content: OpenAI::Responses::EasyInputMessage::Content::Variants, role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol, + phase: + T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol), type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol ).returns(T.attached_class) end @@ -54,6 +67,11 @@ module OpenAI # The role of the message input. One of `user`, `assistant`, `system`, or # `developer`. role:, + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + phase: nil, # The type of the message input. Always `message`. type: nil ) @@ -64,6 +82,8 @@ module OpenAI { content: OpenAI::Responses::EasyInputMessage::Content::Variants, role: OpenAI::Responses::EasyInputMessage::Role::OrSymbol, + phase: + T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol), type: OpenAI::Responses::EasyInputMessage::Type::OrSymbol } ) @@ -134,6 +154,34 @@ module OpenAI end end + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + module Phase + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, OpenAI::Responses::EasyInputMessage::Phase) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + COMMENTARY = + T.let( + :commentary, + OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol + ) + + sig do + override.returns( + T::Array[OpenAI::Responses::EasyInputMessage::Phase::TaggedSymbol] + ) + end + def self.values + end + end + # The type of the message input. Always `message`. module Type extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/response_compact_params.rbi b/rbi/openai/models/responses/response_compact_params.rbi index 875dbd30..83ea073d 100644 --- a/rbi/openai/models/responses/response_compact_params.rbi +++ b/rbi/openai/models/responses/response_compact_params.rbi @@ -54,6 +54,10 @@ module OpenAI sig { returns(T.nilable(String)) } attr_accessor :previous_response_id + # A key to use when reading from or writing to the prompt cache. + sig { returns(T.nilable(String)) } + attr_accessor :prompt_cache_key + sig do params( model: @@ -69,6 +73,7 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), + prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions::OrHash ).returns(T.attached_class) end @@ -91,6 +96,8 @@ module OpenAI # [conversation state](https://platform.openai.com/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, + # A key to use when reading from or writing to the prompt cache. + prompt_cache_key: nil, request_options: {} ) end @@ -111,6 +118,7 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), + prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions } ) diff --git a/rbi/openai/models/responses/response_output_message.rbi b/rbi/openai/models/responses/response_output_message.rbi index 8e057823..d1314707 100644 --- a/rbi/openai/models/responses/response_output_message.rbi +++ b/rbi/openai/models/responses/response_output_message.rbi @@ -44,6 +44,17 @@ module OpenAI sig { returns(Symbol) } attr_accessor :type + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + sig do + returns( + T.nilable(OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol) + ) + end + attr_accessor :phase + # An output message from the model. sig do params( @@ -56,6 +67,10 @@ module OpenAI ) ], status: OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol, + phase: + T.nilable( + OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol + ), role: Symbol, type: Symbol ).returns(T.attached_class) @@ -68,6 +83,11 @@ module OpenAI # The status of the message input. One of `in_progress`, `completed`, or # `incomplete`. Populated when input items are returned via API. status:, + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + phase: nil, # The role of the output message. Always `assistant`. role: :assistant, # The type of the output message. Always `message`. @@ -89,7 +109,11 @@ module OpenAI role: Symbol, status: OpenAI::Responses::ResponseOutputMessage::Status::OrSymbol, - type: Symbol + type: Symbol, + phase: + T.nilable( + OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol + ) } ) end @@ -156,6 +180,36 @@ module OpenAI def self.values end end + + # Labels an `assistant` message as intermediate commentary (`commentary`) or the + # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when + # sending follow-up requests, preserve and resend phase on all assistant messages + # — dropping it can degrade performance. Not used for user messages. + module Phase + extend OpenAI::Internal::Type::Enum + + TaggedSymbol = + T.type_alias do + T.all(Symbol, OpenAI::Responses::ResponseOutputMessage::Phase) + end + OrSymbol = T.type_alias { T.any(Symbol, String) } + + COMMENTARY = + T.let( + :commentary, + OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol + ) + + sig do + override.returns( + T::Array[ + OpenAI::Responses::ResponseOutputMessage::Phase::TaggedSymbol + ] + ) + end + def self.values + end + end end end end diff --git a/rbi/openai/resources/responses.rbi b/rbi/openai/resources/responses.rbi index 45ef00ad..abd25051 100644 --- a/rbi/openai/resources/responses.rbi +++ b/rbi/openai/resources/responses.rbi @@ -981,6 +981,7 @@ module OpenAI ), instructions: T.nilable(String), previous_response_id: T.nilable(String), + prompt_cache_key: T.nilable(String), request_options: OpenAI::RequestOptions::OrHash ).returns(OpenAI::Responses::CompactedResponse) end @@ -1003,6 +1004,8 @@ module OpenAI # [conversation state](https://platform.openai.com/docs/guides/conversation-state). # Cannot be used in conjunction with `conversation`. previous_response_id: nil, + # A key to use when reading from or writing to the prompt cache. + prompt_cache_key: nil, request_options: {} ) end diff --git a/sig/openai/models/responses/easy_input_message.rbs b/sig/openai/models/responses/easy_input_message.rbs index eb94d8c1..d69a671c 100644 --- a/sig/openai/models/responses/easy_input_message.rbs +++ b/sig/openai/models/responses/easy_input_message.rbs @@ -5,6 +5,7 @@ module OpenAI { content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, + phase: OpenAI::Models::Responses::EasyInputMessage::phase?, type: OpenAI::Models::Responses::EasyInputMessage::type_ } @@ -13,6 +14,8 @@ module OpenAI attr_accessor role: OpenAI::Models::Responses::EasyInputMessage::role + attr_accessor phase: OpenAI::Models::Responses::EasyInputMessage::phase? + attr_reader type: OpenAI::Models::Responses::EasyInputMessage::type_? def type=: ( @@ -22,12 +25,14 @@ module OpenAI def initialize: ( content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, + ?phase: OpenAI::Models::Responses::EasyInputMessage::phase?, ?type: OpenAI::Models::Responses::EasyInputMessage::type_ ) -> void def to_hash: -> { content: OpenAI::Models::Responses::EasyInputMessage::content, role: OpenAI::Models::Responses::EasyInputMessage::role, + phase: OpenAI::Models::Responses::EasyInputMessage::phase?, type: OpenAI::Models::Responses::EasyInputMessage::type_ } @@ -54,6 +59,16 @@ module OpenAI def self?.values: -> ::Array[OpenAI::Models::Responses::EasyInputMessage::role] end + type phase = :commentary + + module Phase + extend OpenAI::Internal::Type::Enum + + COMMENTARY: :commentary + + def self?.values: -> ::Array[OpenAI::Models::Responses::EasyInputMessage::phase] + end + type type_ = :message module Type diff --git a/sig/openai/models/responses/response_compact_params.rbs b/sig/openai/models/responses/response_compact_params.rbs index d104177e..6dfd450d 100644 --- a/sig/openai/models/responses/response_compact_params.rbs +++ b/sig/openai/models/responses/response_compact_params.rbs @@ -6,7 +6,8 @@ module OpenAI model: OpenAI::Models::Responses::ResponseCompactParams::model?, input: OpenAI::Models::Responses::ResponseCompactParams::input?, instructions: String?, - previous_response_id: String? + previous_response_id: String?, + prompt_cache_key: String? } & OpenAI::Internal::Type::request_parameters @@ -22,11 +23,14 @@ module OpenAI attr_accessor previous_response_id: String? + attr_accessor prompt_cache_key: String? + def initialize: ( model: OpenAI::Models::Responses::ResponseCompactParams::model?, ?input: OpenAI::Models::Responses::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, + ?prompt_cache_key: String?, ?request_options: OpenAI::request_opts ) -> void @@ -35,6 +39,7 @@ module OpenAI input: OpenAI::Models::Responses::ResponseCompactParams::input?, instructions: String?, previous_response_id: String?, + prompt_cache_key: String?, request_options: OpenAI::RequestOptions } diff --git a/sig/openai/models/responses/response_output_message.rbs b/sig/openai/models/responses/response_output_message.rbs index 223256b8..a7fbe417 100644 --- a/sig/openai/models/responses/response_output_message.rbs +++ b/sig/openai/models/responses/response_output_message.rbs @@ -7,7 +7,8 @@ module OpenAI content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], role: :assistant, status: OpenAI::Models::Responses::ResponseOutputMessage::status, - type: :message + type: :message, + phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? } class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel @@ -21,10 +22,13 @@ module OpenAI attr_accessor type: :message + attr_accessor phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? + def initialize: ( id: String, content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], status: OpenAI::Models::Responses::ResponseOutputMessage::status, + ?phase: OpenAI::Models::Responses::ResponseOutputMessage::phase?, ?role: :assistant, ?type: :message ) -> void @@ -34,7 +38,8 @@ module OpenAI content: ::Array[OpenAI::Models::Responses::ResponseOutputMessage::content], role: :assistant, status: OpenAI::Models::Responses::ResponseOutputMessage::status, - type: :message + type: :message, + phase: OpenAI::Models::Responses::ResponseOutputMessage::phase? } type content = @@ -58,6 +63,16 @@ module OpenAI def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputMessage::status] end + + type phase = :commentary + + module Phase + extend OpenAI::Internal::Type::Enum + + COMMENTARY: :commentary + + def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputMessage::phase] + end end end end diff --git a/sig/openai/resources/responses.rbs b/sig/openai/resources/responses.rbs index e0c549f3..748fd845 100644 --- a/sig/openai/resources/responses.rbs +++ b/sig/openai/resources/responses.rbs @@ -128,6 +128,7 @@ module OpenAI ?input: OpenAI::Models::Responses::ResponseCompactParams::input?, ?instructions: String?, ?previous_response_id: String?, + ?prompt_cache_key: String?, ?request_options: OpenAI::request_opts ) -> OpenAI::Responses::CompactedResponse diff --git a/test/openai/resources/responses/input_items_test.rb b/test/openai/resources/responses/input_items_test.rb index 4a0970a9..557416f6 100644 --- a/test/openai/resources/responses/input_items_test.rb +++ b/test/openai/resources/responses/input_items_test.rb @@ -56,7 +56,8 @@ def test_list id: String, content: ^(OpenAI::Internal::Type::ArrayOf[union: OpenAI::Responses::ResponseOutputMessage::Content]), role: Symbol, - status: OpenAI::Responses::ResponseOutputMessage::Status + status: OpenAI::Responses::ResponseOutputMessage::Status, + phase: OpenAI::Responses::ResponseOutputMessage::Phase | nil } in { type: :file_search_call, From 4f10197e93eccd7e49537716879419db09a6c477 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:24:44 +0000 Subject: [PATCH 3/4] fix(api): manual updates --- .stats.yml | 4 ++-- lib/openai/models/responses/easy_input_message.rb | 10 ++++++++++ .../models/responses/response_output_message.rb | 10 ++++++++++ .../models/responses/easy_input_message.rbi | 15 +++++++++++++++ .../models/responses/response_output_message.rbi | 15 +++++++++++++++ 5 files changed, 52 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 851c01ec..fc0e4b8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 147 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ca4985bc94b25eac84a5d7538d1bdf134c9b99dae9e95f1eae0aae90130c4bf8.yml -openapi_spec_hash: 855db4b2dbaf3f8f83afe0df66397c02 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-4432c056f89389d4d43b695cbdf44f97df8169f63bbae2c15fc079a5766ced6e.yml +openapi_spec_hash: cbf649cc2c944fb3f77450ec752ab1e9 config_hash: 7f49c38fa3abe9b7038ffe62262c4912 diff --git a/lib/openai/models/responses/easy_input_message.rb b/lib/openai/models/responses/easy_input_message.rb index 7b58c67f..8994e04a 100644 --- a/lib/openai/models/responses/easy_input_message.rb +++ b/lib/openai/models/responses/easy_input_message.rb @@ -24,6 +24,11 @@ class EasyInputMessage < OpenAI::Internal::Type::BaseModel # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. + # # @return [Symbol, OpenAI::Models::Responses::EasyInputMessage::Phase, nil] optional :phase, enum: -> { OpenAI::Responses::EasyInputMessage::Phase }, nil?: true @@ -90,6 +95,11 @@ module Role # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. + # # @see OpenAI::Models::Responses::EasyInputMessage#phase module Phase extend OpenAI::Internal::Type::Enum diff --git a/lib/openai/models/responses/response_output_message.rb b/lib/openai/models/responses/response_output_message.rb index 34816839..e042d0bf 100644 --- a/lib/openai/models/responses/response_output_message.rb +++ b/lib/openai/models/responses/response_output_message.rb @@ -42,6 +42,11 @@ class ResponseOutputMessage < OpenAI::Internal::Type::BaseModel # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. + # # @return [Symbol, OpenAI::Models::Responses::ResponseOutputMessage::Phase, nil] optional :phase, enum: -> { OpenAI::Responses::ResponseOutputMessage::Phase }, nil?: true @@ -99,6 +104,11 @@ module Status # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. + # # @see OpenAI::Models::Responses::ResponseOutputMessage#phase module Phase extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/easy_input_message.rbi b/rbi/openai/models/responses/easy_input_message.rbi index 968601a2..d887196f 100644 --- a/rbi/openai/models/responses/easy_input_message.rbi +++ b/rbi/openai/models/responses/easy_input_message.rbi @@ -26,6 +26,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. sig do returns( T.nilable(OpenAI::Responses::EasyInputMessage::Phase::OrSymbol) @@ -71,6 +76,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. phase: nil, # The type of the message input. Always `message`. type: nil @@ -158,6 +168,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. module Phase extend OpenAI::Internal::Type::Enum diff --git a/rbi/openai/models/responses/response_output_message.rbi b/rbi/openai/models/responses/response_output_message.rbi index d1314707..760ea24f 100644 --- a/rbi/openai/models/responses/response_output_message.rbi +++ b/rbi/openai/models/responses/response_output_message.rbi @@ -48,6 +48,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. sig do returns( T.nilable(OpenAI::Responses::ResponseOutputMessage::Phase::OrSymbol) @@ -87,6 +92,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. phase: nil, # The role of the output message. Always `assistant`. role: :assistant, @@ -185,6 +195,11 @@ module OpenAI # final answer (`final_answer`). For models like `gpt-5.3-codex` and beyond, when # sending follow-up requests, preserve and resend phase on all assistant messages # — dropping it can degrade performance. Not used for user messages. + # + # Use `commentary` for an intermediate assistant message and `final_answer` for + # the final assistant message. For follow-up requests with models like + # `gpt-5.3-codex` and later, preserve and resend phase on all assistant messages. + # Omitting it can degrade performance. Not used for user messages. module Phase extend OpenAI::Internal::Type::Enum From 044770be3690697c78759e0f2d1ac4340ab6cde5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 20:25:05 +0000 Subject: [PATCH 4/4] release: 0.52.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/openai/version.rb | 2 +- 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b2b4fa9..fed4b17f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.51.0" + ".": "0.52.0" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 087f9953..97474485 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 0.52.0 (2026-02-24) + +Full Changelog: [v0.51.0...v0.52.0](https://github.com/openai/openai-ruby/compare/v0.51.0...v0.52.0) + +### Features + +* **api:** remove phase from EasyInputMessage/ResponseOutputMessage, prompt_cache_key from compact ([f603ff1](https://github.com/openai/openai-ruby/commit/f603ff148798d0d47ee2caa7281dce30547cdbd6)) + + +### Bug Fixes + +* **api:** manual updates ([4f10197](https://github.com/openai/openai-ruby/commit/4f10197e93eccd7e49537716879419db09a6c477)) +* **api:** readd phase ([a78d02b](https://github.com/openai/openai-ruby/commit/a78d02b807f9282b7ba6b311c9205b9998735814)) + ## 0.51.0 (2026-02-24) Full Changelog: [v0.50.0...v0.51.0](https://github.com/openai/openai-ruby/compare/v0.50.0...v0.51.0) diff --git a/Gemfile.lock b/Gemfile.lock index da4ba63e..ba52df6b 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openai (0.51.0) + openai (0.52.0) base64 cgi connection_pool diff --git a/README.md b/README.md index 7ffb18a6..1eb33dfb 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application ```ruby -gem "openai", "~> 0.51.0" +gem "openai", "~> 0.52.0" ``` diff --git a/lib/openai/version.rb b/lib/openai/version.rb index 2e0e97ee..0bbb0eab 100644 --- a/lib/openai/version.rb +++ b/lib/openai/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OpenAI - VERSION = "0.51.0" + VERSION = "0.52.0" end