From 3afa53231a90968bec2d361363334800463b436d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 17:41:34 +0000 Subject: [PATCH 1/5] chore: do not install brew dependencies in ./scripts/bootstrap by default --- scripts/bootstrap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index cc31aa85..34878642 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,10 +4,18 @@ set -e cd -- "$(dirname -- "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { - echo "==> Installing Homebrew dependencies…" - brew bundle + echo -n "==> Install Homebrew dependencies? (y/N): " + read -r response + case "$response" in + [yY][eE][sS]|[yY]) + brew bundle + ;; + *) + ;; + esac + echo } fi From 25ec2aca164414f66a7d023c196ee6b1781c7146 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 21 Sep 2025 05:33:33 +0000 Subject: [PATCH 2/5] fix(api): fix mcp tool name --- .stats.yml | 4 ++-- lib/openai/models/realtime/conversation_item.rb | 2 +- lib/openai/models/realtime/realtime_mcp_tool_call.rb | 10 +++++----- rbi/openai/models/realtime/realtime_mcp_tool_call.rbi | 6 +++--- sig/openai/models/realtime/realtime_mcp_tool_call.rbs | 8 ++++---- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index c961e232..66c059ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-ea23db36b0899cc715f56d0098956069b2d92880f448adff3a4ac1bb53cb2cec.yml -openapi_spec_hash: 36f76ea31297c9593bcfae453f6255cc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-65d42621b731238ad4e59a35a705fc0608b17f53a14d047e66ce480c793da26b.yml +openapi_spec_hash: d7ca86b2507600cbd5ed197cf31263c2 config_hash: 666d6bb4b564f0d9d431124b5d1a0665 diff --git a/lib/openai/models/realtime/conversation_item.rb b/lib/openai/models/realtime/conversation_item.rb index 5aba025d..7f555a92 100644 --- a/lib/openai/models/realtime/conversation_item.rb +++ b/lib/openai/models/realtime/conversation_item.rb @@ -31,7 +31,7 @@ module ConversationItem variant :mcp_list_tools, -> { OpenAI::Realtime::RealtimeMcpListTools } # A Realtime item representing an invocation of a tool on an MCP server. - variant :mcp_tool_call, -> { OpenAI::Realtime::RealtimeMcpToolCall } + variant :mcp_call, -> { OpenAI::Realtime::RealtimeMcpToolCall } # A Realtime item requesting human approval of a tool invocation. variant :mcp_approval_request, -> { OpenAI::Realtime::RealtimeMcpApprovalRequest } diff --git a/lib/openai/models/realtime/realtime_mcp_tool_call.rb b/lib/openai/models/realtime/realtime_mcp_tool_call.rb index 952d9da2..0f68f77f 100644 --- a/lib/openai/models/realtime/realtime_mcp_tool_call.rb +++ b/lib/openai/models/realtime/realtime_mcp_tool_call.rb @@ -29,10 +29,10 @@ class RealtimeMcpToolCall < OpenAI::Internal::Type::BaseModel required :server_label, String # @!attribute type - # The type of the item. Always `mcp_tool_call`. + # The type of the item. Always `mcp_call`. # - # @return [Symbol, :mcp_tool_call] - required :type, const: :mcp_tool_call + # @return [Symbol, :mcp_call] + required :type, const: :mcp_call # @!attribute approval_request_id # The ID of an associated approval request, if any. @@ -52,7 +52,7 @@ class RealtimeMcpToolCall < OpenAI::Internal::Type::BaseModel # @return [String, nil] optional :output, String, nil?: true - # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_tool_call) + # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_call) # A Realtime item representing an invocation of a tool on an MCP server. # # @param id [String] The unique ID of the tool call. @@ -69,7 +69,7 @@ class RealtimeMcpToolCall < OpenAI::Internal::Type::BaseModel # # @param output [String, nil] The output from the tool call. # - # @param type [Symbol, :mcp_tool_call] The type of the item. Always `mcp_tool_call`. + # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`. # The error from the tool call, if any. # diff --git a/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi b/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi index 681e6025..984cc940 100644 --- a/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi +++ b/rbi/openai/models/realtime/realtime_mcp_tool_call.rbi @@ -28,7 +28,7 @@ module OpenAI sig { returns(String) } attr_accessor :server_label - # The type of the item. Always `mcp_tool_call`. + # The type of the item. Always `mcp_call`. sig { returns(Symbol) } attr_accessor :type @@ -89,8 +89,8 @@ module OpenAI error: nil, # The output from the tool call. output: nil, - # The type of the item. Always `mcp_tool_call`. - type: :mcp_tool_call + # The type of the item. Always `mcp_call`. + type: :mcp_call ) end diff --git a/sig/openai/models/realtime/realtime_mcp_tool_call.rbs b/sig/openai/models/realtime/realtime_mcp_tool_call.rbs index 8ae8c8e7..21af36ef 100644 --- a/sig/openai/models/realtime/realtime_mcp_tool_call.rbs +++ b/sig/openai/models/realtime/realtime_mcp_tool_call.rbs @@ -7,7 +7,7 @@ module OpenAI arguments: String, name: String, server_label: String, - type: :mcp_tool_call, + type: :mcp_call, approval_request_id: String?, error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?, output: String? @@ -22,7 +22,7 @@ module OpenAI attr_accessor server_label: String - attr_accessor type: :mcp_tool_call + attr_accessor type: :mcp_call attr_accessor approval_request_id: String? @@ -38,7 +38,7 @@ module OpenAI ?approval_request_id: String?, ?error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?, ?output: String?, - ?type: :mcp_tool_call + ?type: :mcp_call ) -> void def to_hash: -> { @@ -46,7 +46,7 @@ module OpenAI arguments: String, name: String, server_label: String, - type: :mcp_tool_call, + type: :mcp_call, approval_request_id: String?, error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?, output: String? From ad9a4444e8a9af36f31368f19a095c1d4f4200ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 19:26:25 +0000 Subject: [PATCH 3/5] chore: improve example values --- test/openai/resources/conversations/items_test.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/openai/resources/conversations/items_test.rb b/test/openai/resources/conversations/items_test.rb index bb012cd0..58973cb8 100644 --- a/test/openai/resources/conversations/items_test.rb +++ b/test/openai/resources/conversations/items_test.rb @@ -4,7 +4,11 @@ class OpenAI::Test::Resources::Conversations::ItemsTest < OpenAI::Test::ResourceTest def test_create_required_params - response = @openai.conversations.items.create("conv_123", items: [{content: "string", role: :user}]) + response = + @openai.conversations.items.create( + "conv_123", + items: [{content: "string", role: :user, type: :message}] + ) assert_pattern do response => OpenAI::Conversations::ConversationItemList From ce76a591d8c596d9eaeaa14077cec3146ffb1d0c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:21:06 +0000 Subject: [PATCH 4/5] chore(api): openapi updates for conversations --- .stats.yml | 4 ++-- .../conversation_create_params.rb | 2 +- .../conversation_update_params.rb | 13 ++++++------ lib/openai/resources/conversations.rb | 10 +++++----- .../conversation_update_params.rbi | 20 ++++++++++--------- rbi/openai/resources/conversations.rbi | 15 +++++++------- .../conversation_update_params.rbs | 8 ++++---- sig/openai/resources/conversations.rbs | 2 +- 8 files changed, 39 insertions(+), 35 deletions(-) diff --git a/.stats.yml b/.stats.yml index 66c059ae..062111e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 118 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-65d42621b731238ad4e59a35a705fc0608b17f53a14d047e66ce480c793da26b.yml -openapi_spec_hash: d7ca86b2507600cbd5ed197cf31263c2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-937fcfac8cbab692796cd9822b37e48a311e2220a8b103106ded0ee92a0b9484.yml +openapi_spec_hash: 74a0c58b5b8c4e06792d79b685e02a01 config_hash: 666d6bb4b564f0d9d431124b5d1a0665 diff --git a/lib/openai/models/conversations/conversation_create_params.rb b/lib/openai/models/conversations/conversation_create_params.rb index a56542d5..368c1269 100644 --- a/lib/openai/models/conversations/conversation_create_params.rb +++ b/lib/openai/models/conversations/conversation_create_params.rb @@ -32,7 +32,7 @@ class ConversationCreateParams < OpenAI::Internal::Type::BaseModel # Some parameter documentations has been truncated, see # {OpenAI::Models::Conversations::ConversationCreateParams} for more details. # - # @param items [Array, nil] Initial items to include in the conversation context. + # @param items [Array, nil] Initial items to include in the conversation context. You may add up to 20 items # # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be # diff --git a/lib/openai/models/conversations/conversation_update_params.rb b/lib/openai/models/conversations/conversation_update_params.rb index d268166e..f0b83306 100644 --- a/lib/openai/models/conversations/conversation_update_params.rb +++ b/lib/openai/models/conversations/conversation_update_params.rb @@ -11,18 +11,19 @@ class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel # @!attribute metadata # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and - # querying for objects via API or the dashboard. Keys are strings with a maximum - # length of 64 characters. Values are strings with a maximum length of 512 - # characters. + # querying for objects via API or the dashboard. # - # @return [Hash{Symbol=>String}] - required :metadata, OpenAI::Internal::Type::HashOf[String] + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + # + # @return [Hash{Symbol=>String}, nil] + required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true # @!method initialize(metadata:, request_options: {}) # Some parameter documentations has been truncated, see # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details. # - # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}] end diff --git a/lib/openai/resources/conversations.rb b/lib/openai/resources/conversations.rb index fae70832..05c9823e 100644 --- a/lib/openai/resources/conversations.rb +++ b/lib/openai/resources/conversations.rb @@ -13,7 +13,7 @@ class Conversations # # @overload create(items: nil, metadata: nil, request_options: {}) # - # @param items [Array, nil] Initial items to include in the conversation context. + # @param items [Array, nil] Initial items to include in the conversation context. You may add up to 20 items # # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be # @@ -33,7 +33,7 @@ def create(params = {}) ) end - # Get a conversation with the given ID. + # Get a conversation # # @overload retrieve(conversation_id, request_options: {}) # @@ -56,13 +56,13 @@ def retrieve(conversation_id, params = {}) # Some parameter documentations has been truncated, see # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details. # - # Update a conversation's metadata with the given ID. + # Update a conversation # # @overload update(conversation_id, metadata:, request_options: {}) # # @param conversation_id [String] The ID of the conversation to update. # - # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be + # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be # # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil] # @@ -80,7 +80,7 @@ def update(conversation_id, params) ) end - # Delete a conversation with the given ID. + # Delete a conversation. Items in the conversation will not be deleted. # # @overload delete(conversation_id, request_options: {}) # diff --git a/rbi/openai/models/conversations/conversation_update_params.rbi b/rbi/openai/models/conversations/conversation_update_params.rbi index 5edfee7f..5c52c84e 100644 --- a/rbi/openai/models/conversations/conversation_update_params.rbi +++ b/rbi/openai/models/conversations/conversation_update_params.rbi @@ -17,24 +17,26 @@ module OpenAI # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and - # querying for objects via API or the dashboard. Keys are strings with a maximum - # length of 64 characters. Values are strings with a maximum length of 512 - # characters. - sig { returns(T::Hash[Symbol, String]) } + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. + sig { returns(T.nilable(T::Hash[Symbol, String])) } attr_accessor :metadata sig do params( - metadata: T::Hash[Symbol, String], + metadata: T.nilable(T::Hash[Symbol, String]), request_options: OpenAI::RequestOptions::OrHash ).returns(T.attached_class) end def self.new( # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and - # querying for objects via API or the dashboard. Keys are strings with a maximum - # length of 64 characters. Values are strings with a maximum length of 512 - # characters. + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. metadata:, request_options: {} ) @@ -43,7 +45,7 @@ module OpenAI sig do override.returns( { - metadata: T::Hash[Symbol, String], + metadata: T.nilable(T::Hash[Symbol, String]), request_options: OpenAI::RequestOptions } ) diff --git a/rbi/openai/resources/conversations.rbi b/rbi/openai/resources/conversations.rbi index 917988e1..86ab393c 100644 --- a/rbi/openai/resources/conversations.rbi +++ b/rbi/openai/resources/conversations.rbi @@ -56,7 +56,7 @@ module OpenAI ) end - # Get a conversation with the given ID. + # Get a conversation sig do params( conversation_id: String, @@ -70,11 +70,11 @@ module OpenAI ) end - # Update a conversation's metadata with the given ID. + # Update a conversation sig do params( conversation_id: String, - metadata: T::Hash[Symbol, String], + metadata: T.nilable(T::Hash[Symbol, String]), request_options: OpenAI::RequestOptions::OrHash ).returns(OpenAI::Conversations::Conversation) end @@ -83,15 +83,16 @@ module OpenAI conversation_id, # Set of 16 key-value pairs that can be attached to an object. This can be useful # for storing additional information about the object in a structured format, and - # querying for objects via API or the dashboard. Keys are strings with a maximum - # length of 64 characters. Values are strings with a maximum length of 512 - # characters. + # querying for objects via API or the dashboard. + # + # Keys are strings with a maximum length of 64 characters. Values are strings with + # a maximum length of 512 characters. metadata:, request_options: {} ) end - # Delete a conversation with the given ID. + # Delete a conversation. Items in the conversation will not be deleted. sig do params( conversation_id: String, diff --git a/sig/openai/models/conversations/conversation_update_params.rbs b/sig/openai/models/conversations/conversation_update_params.rbs index cff724e5..8ca18ac9 100644 --- a/sig/openai/models/conversations/conversation_update_params.rbs +++ b/sig/openai/models/conversations/conversation_update_params.rbs @@ -2,22 +2,22 @@ module OpenAI module Models module Conversations type conversation_update_params = - { metadata: ::Hash[Symbol, String] } + { metadata: OpenAI::Models::metadata? } & OpenAI::Internal::Type::request_parameters class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel extend OpenAI::Internal::Type::RequestParameters::Converter include OpenAI::Internal::Type::RequestParameters - attr_accessor metadata: ::Hash[Symbol, String] + attr_accessor metadata: OpenAI::Models::metadata? def initialize: ( - metadata: ::Hash[Symbol, String], + metadata: OpenAI::Models::metadata?, ?request_options: OpenAI::request_opts ) -> void def to_hash: -> { - metadata: ::Hash[Symbol, String], + metadata: OpenAI::Models::metadata?, request_options: OpenAI::RequestOptions } end diff --git a/sig/openai/resources/conversations.rbs b/sig/openai/resources/conversations.rbs index ae48106e..03a61648 100644 --- a/sig/openai/resources/conversations.rbs +++ b/sig/openai/resources/conversations.rbs @@ -16,7 +16,7 @@ module OpenAI def update: ( String conversation_id, - metadata: ::Hash[Symbol, String], + metadata: OpenAI::Models::metadata?, ?request_options: OpenAI::request_opts ) -> OpenAI::Conversations::Conversation From fd8f8b1e3bfd2ebca001bc4d93764c4044ab6eb7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 23:21:26 +0000 Subject: [PATCH 5/5] release: 0.25.1 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 15 +++++++++++++++ Gemfile.lock | 2 +- README.md | 2 +- lib/openai/version.rb | 2 +- 5 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a36746b8..5f02af31 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.25.0" + ".": "0.25.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 209099aa..825be603 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,20 @@ # Changelog +## 0.25.1 (2025-09-22) + +Full Changelog: [v0.25.0...v0.25.1](https://github.com/openai/openai-ruby/compare/v0.25.0...v0.25.1) + +### Bug Fixes + +* **api:** fix mcp tool name ([25ec2ac](https://github.com/openai/openai-ruby/commit/25ec2aca164414f66a7d023c196ee6b1781c7146)) + + +### Chores + +* **api:** openapi updates for conversations ([ce76a59](https://github.com/openai/openai-ruby/commit/ce76a591d8c596d9eaeaa14077cec3146ffb1d0c)) +* do not install brew dependencies in ./scripts/bootstrap by default ([3afa532](https://github.com/openai/openai-ruby/commit/3afa53231a90968bec2d361363334800463b436d)) +* improve example values ([ad9a444](https://github.com/openai/openai-ruby/commit/ad9a4444e8a9af36f31368f19a095c1d4f4200ad)) + ## 0.25.0 (2025-09-19) Full Changelog: [v0.24.0...v0.25.0](https://github.com/openai/openai-ruby/compare/v0.24.0...v0.25.0) diff --git a/Gemfile.lock b/Gemfile.lock index 4a3eb7e2..8cb88419 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -11,7 +11,7 @@ GIT PATH remote: . specs: - openai (0.25.0) + openai (0.25.1) connection_pool GEM diff --git a/README.md b/README.md index 020d7ec4..31135e7e 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.25.0" +gem "openai", "~> 0.25.1" ``` diff --git a/lib/openai/version.rb b/lib/openai/version.rb index 304b9c4f..6fb9156b 100644 --- a/lib/openai/version.rb +++ b/lib/openai/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module OpenAI - VERSION = "0.25.0" + VERSION = "0.25.1" end