openai 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dc675367c0d22c19f6848d5034b7308425efa10723a6f307d98fbe893d3f845
4
- data.tar.gz: 5c68c6b1380750a012260cf3f7fa3d1dc53ab69b6a551771231003f794e0f7ca
3
+ metadata.gz: 63b13ff3a6e853278bda7f2dec0bfdf3b4f32873eed07e63bb19c5ffabef4d28
4
+ data.tar.gz: 82d504549c8cefef90f5b7a846b11876c0f8910c6f2eec40e4a8e78edde3d9c4
5
5
  SHA512:
6
- metadata.gz: fe5c26cf866c0b149d023170d7f4b19248602b5fbc16cc6e712e5e06d5077ef925f562ce70ef856001327b8acbfb2e3779bfd1b2a41e567045ee0c2f33485704
7
- data.tar.gz: 16473b0015ca790feb4a22670fe324bc329fc6e01b7bfd4319e95cab3ab05a4e14ef9277edaf239f486f9deee474b0a330031a597b74335e6bf1e49bf8c08792
6
+ metadata.gz: 86e4af688a02efb6ab796bb12653c5155ba67e999343898cc2716ffbd2fd8424464ab553d7981503dfd553d79bad080a83ea69f34bf6a96db7050f5835df11cc
7
+ data.tar.gz: 8c28b2b5c642c86af7b95817dd535fdde8c4023f68988b7ffd456c9bf45f192a9ae056e61e84681702bb4b150600c1579ab039b3123bc1b5928aa4acbe2724af
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.1 (2025-09-22)
4
+
5
+ Full Changelog: [v0.25.0...v0.25.1](https://github.com/openai/openai-ruby/compare/v0.25.0...v0.25.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** fix mcp tool name ([25ec2ac](https://github.com/openai/openai-ruby/commit/25ec2aca164414f66a7d023c196ee6b1781c7146))
10
+
11
+
12
+ ### Chores
13
+
14
+ * **api:** openapi updates for conversations ([ce76a59](https://github.com/openai/openai-ruby/commit/ce76a591d8c596d9eaeaa14077cec3146ffb1d0c))
15
+ * do not install brew dependencies in ./scripts/bootstrap by default ([3afa532](https://github.com/openai/openai-ruby/commit/3afa53231a90968bec2d361363334800463b436d))
16
+ * improve example values ([ad9a444](https://github.com/openai/openai-ruby/commit/ad9a4444e8a9af36f31368f19a095c1d4f4200ad))
17
+
3
18
  ## 0.25.0 (2025-09-19)
4
19
 
5
20
  Full Changelog: [v0.24.0...v0.25.0](https://github.com/openai/openai-ruby/compare/v0.24.0...v0.25.0)
data/README.md CHANGED
@@ -15,7 +15,7 @@ To use this gem, install via Bundler by adding the following to your application
15
15
  <!-- x-release-please-start-version -->
16
16
 
17
17
  ```ruby
18
- gem "openai", "~> 0.25.0"
18
+ gem "openai", "~> 0.25.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -32,7 +32,7 @@ module OpenAI
32
32
  # Some parameter documentations has been truncated, see
33
33
  # {OpenAI::Models::Conversations::ConversationCreateParams} for more details.
34
34
  #
35
- # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context.
35
+ # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context. You may add up to 20 items
36
36
  #
37
37
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
38
38
  #
@@ -11,18 +11,19 @@ module OpenAI
11
11
  # @!attribute metadata
12
12
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
13
13
  # for storing additional information about the object in a structured format, and
14
- # querying for objects via API or the dashboard. Keys are strings with a maximum
15
- # length of 64 characters. Values are strings with a maximum length of 512
16
- # characters.
14
+ # querying for objects via API or the dashboard.
17
15
  #
18
- # @return [Hash{Symbol=>String}]
19
- required :metadata, OpenAI::Internal::Type::HashOf[String]
16
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
17
+ # a maximum length of 512 characters.
18
+ #
19
+ # @return [Hash{Symbol=>String}, nil]
20
+ required :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
20
21
 
21
22
  # @!method initialize(metadata:, request_options: {})
22
23
  # Some parameter documentations has been truncated, see
23
24
  # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details.
24
25
  #
25
- # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be
26
+ # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
26
27
  #
27
28
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
28
29
  end
@@ -31,7 +31,7 @@ module OpenAI
31
31
  variant :mcp_list_tools, -> { OpenAI::Realtime::RealtimeMcpListTools }
32
32
 
33
33
  # A Realtime item representing an invocation of a tool on an MCP server.
34
- variant :mcp_tool_call, -> { OpenAI::Realtime::RealtimeMcpToolCall }
34
+ variant :mcp_call, -> { OpenAI::Realtime::RealtimeMcpToolCall }
35
35
 
36
36
  # A Realtime item requesting human approval of a tool invocation.
37
37
  variant :mcp_approval_request, -> { OpenAI::Realtime::RealtimeMcpApprovalRequest }
@@ -29,10 +29,10 @@ module OpenAI
29
29
  required :server_label, String
30
30
 
31
31
  # @!attribute type
32
- # The type of the item. Always `mcp_tool_call`.
32
+ # The type of the item. Always `mcp_call`.
33
33
  #
34
- # @return [Symbol, :mcp_tool_call]
35
- required :type, const: :mcp_tool_call
34
+ # @return [Symbol, :mcp_call]
35
+ required :type, const: :mcp_call
36
36
 
37
37
  # @!attribute approval_request_id
38
38
  # The ID of an associated approval request, if any.
@@ -52,7 +52,7 @@ module OpenAI
52
52
  # @return [String, nil]
53
53
  optional :output, String, nil?: true
54
54
 
55
- # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_tool_call)
55
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, type: :mcp_call)
56
56
  # A Realtime item representing an invocation of a tool on an MCP server.
57
57
  #
58
58
  # @param id [String] The unique ID of the tool call.
@@ -69,7 +69,7 @@ module OpenAI
69
69
  #
70
70
  # @param output [String, nil] The output from the tool call.
71
71
  #
72
- # @param type [Symbol, :mcp_tool_call] The type of the item. Always `mcp_tool_call`.
72
+ # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
73
73
 
74
74
  # The error from the tool call, if any.
75
75
  #
@@ -13,7 +13,7 @@ module OpenAI
13
13
  #
14
14
  # @overload create(items: nil, metadata: nil, request_options: {})
15
15
  #
16
- # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context.
16
+ # @param items [Array<OpenAI::Models::Responses::EasyInputMessage, OpenAI::Models::Responses::ResponseInputItem::Message, OpenAI::Models::Responses::ResponseOutputMessage, OpenAI::Models::Responses::ResponseFileSearchToolCall, OpenAI::Models::Responses::ResponseComputerToolCall, OpenAI::Models::Responses::ResponseInputItem::ComputerCallOutput, OpenAI::Models::Responses::ResponseFunctionWebSearch, OpenAI::Models::Responses::ResponseFunctionToolCall, OpenAI::Models::Responses::ResponseInputItem::FunctionCallOutput, OpenAI::Models::Responses::ResponseReasoningItem, OpenAI::Models::Responses::ResponseInputItem::ImageGenerationCall, OpenAI::Models::Responses::ResponseCodeInterpreterToolCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCall, OpenAI::Models::Responses::ResponseInputItem::LocalShellCallOutput, OpenAI::Models::Responses::ResponseInputItem::McpListTools, OpenAI::Models::Responses::ResponseInputItem::McpApprovalRequest, OpenAI::Models::Responses::ResponseInputItem::McpApprovalResponse, OpenAI::Models::Responses::ResponseInputItem::McpCall, OpenAI::Models::Responses::ResponseCustomToolCallOutput, OpenAI::Models::Responses::ResponseCustomToolCall, OpenAI::Models::Responses::ResponseInputItem::ItemReference>, nil] Initial items to include in the conversation context. You may add up to 20 items
17
17
  #
18
18
  # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
19
19
  #
@@ -33,7 +33,7 @@ module OpenAI
33
33
  )
34
34
  end
35
35
 
36
- # Get a conversation with the given ID.
36
+ # Get a conversation
37
37
  #
38
38
  # @overload retrieve(conversation_id, request_options: {})
39
39
  #
@@ -56,13 +56,13 @@ module OpenAI
56
56
  # Some parameter documentations has been truncated, see
57
57
  # {OpenAI::Models::Conversations::ConversationUpdateParams} for more details.
58
58
  #
59
- # Update a conversation's metadata with the given ID.
59
+ # Update a conversation
60
60
  #
61
61
  # @overload update(conversation_id, metadata:, request_options: {})
62
62
  #
63
63
  # @param conversation_id [String] The ID of the conversation to update.
64
64
  #
65
- # @param metadata [Hash{Symbol=>String}] Set of 16 key-value pairs that can be attached to an object. This can be
65
+ # @param metadata [Hash{Symbol=>String}, nil] Set of 16 key-value pairs that can be attached to an object. This can be
66
66
  #
67
67
  # @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}, nil]
68
68
  #
@@ -80,7 +80,7 @@ module OpenAI
80
80
  )
81
81
  end
82
82
 
83
- # Delete a conversation with the given ID.
83
+ # Delete a conversation. Items in the conversation will not be deleted.
84
84
  #
85
85
  # @overload delete(conversation_id, request_options: {})
86
86
  #
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.25.0"
4
+ VERSION = "0.25.1"
5
5
  end
@@ -17,24 +17,26 @@ module OpenAI
17
17
 
18
18
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
19
19
  # for storing additional information about the object in a structured format, and
20
- # querying for objects via API or the dashboard. Keys are strings with a maximum
21
- # length of 64 characters. Values are strings with a maximum length of 512
22
- # characters.
23
- sig { returns(T::Hash[Symbol, String]) }
20
+ # querying for objects via API or the dashboard.
21
+ #
22
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
23
+ # a maximum length of 512 characters.
24
+ sig { returns(T.nilable(T::Hash[Symbol, String])) }
24
25
  attr_accessor :metadata
25
26
 
26
27
  sig do
27
28
  params(
28
- metadata: T::Hash[Symbol, String],
29
+ metadata: T.nilable(T::Hash[Symbol, String]),
29
30
  request_options: OpenAI::RequestOptions::OrHash
30
31
  ).returns(T.attached_class)
31
32
  end
32
33
  def self.new(
33
34
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
34
35
  # for storing additional information about the object in a structured format, and
35
- # querying for objects via API or the dashboard. Keys are strings with a maximum
36
- # length of 64 characters. Values are strings with a maximum length of 512
37
- # characters.
36
+ # querying for objects via API or the dashboard.
37
+ #
38
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
39
+ # a maximum length of 512 characters.
38
40
  metadata:,
39
41
  request_options: {}
40
42
  )
@@ -43,7 +45,7 @@ module OpenAI
43
45
  sig do
44
46
  override.returns(
45
47
  {
46
- metadata: T::Hash[Symbol, String],
48
+ metadata: T.nilable(T::Hash[Symbol, String]),
47
49
  request_options: OpenAI::RequestOptions
48
50
  }
49
51
  )
@@ -28,7 +28,7 @@ module OpenAI
28
28
  sig { returns(String) }
29
29
  attr_accessor :server_label
30
30
 
31
- # The type of the item. Always `mcp_tool_call`.
31
+ # The type of the item. Always `mcp_call`.
32
32
  sig { returns(Symbol) }
33
33
  attr_accessor :type
34
34
 
@@ -89,8 +89,8 @@ module OpenAI
89
89
  error: nil,
90
90
  # The output from the tool call.
91
91
  output: nil,
92
- # The type of the item. Always `mcp_tool_call`.
93
- type: :mcp_tool_call
92
+ # The type of the item. Always `mcp_call`.
93
+ type: :mcp_call
94
94
  )
95
95
  end
96
96
 
@@ -56,7 +56,7 @@ module OpenAI
56
56
  )
57
57
  end
58
58
 
59
- # Get a conversation with the given ID.
59
+ # Get a conversation
60
60
  sig do
61
61
  params(
62
62
  conversation_id: String,
@@ -70,11 +70,11 @@ module OpenAI
70
70
  )
71
71
  end
72
72
 
73
- # Update a conversation's metadata with the given ID.
73
+ # Update a conversation
74
74
  sig do
75
75
  params(
76
76
  conversation_id: String,
77
- metadata: T::Hash[Symbol, String],
77
+ metadata: T.nilable(T::Hash[Symbol, String]),
78
78
  request_options: OpenAI::RequestOptions::OrHash
79
79
  ).returns(OpenAI::Conversations::Conversation)
80
80
  end
@@ -83,15 +83,16 @@ module OpenAI
83
83
  conversation_id,
84
84
  # Set of 16 key-value pairs that can be attached to an object. This can be useful
85
85
  # for storing additional information about the object in a structured format, and
86
- # querying for objects via API or the dashboard. Keys are strings with a maximum
87
- # length of 64 characters. Values are strings with a maximum length of 512
88
- # characters.
86
+ # querying for objects via API or the dashboard.
87
+ #
88
+ # Keys are strings with a maximum length of 64 characters. Values are strings with
89
+ # a maximum length of 512 characters.
89
90
  metadata:,
90
91
  request_options: {}
91
92
  )
92
93
  end
93
94
 
94
- # Delete a conversation with the given ID.
95
+ # Delete a conversation. Items in the conversation will not be deleted.
95
96
  sig do
96
97
  params(
97
98
  conversation_id: String,
@@ -2,22 +2,22 @@ module OpenAI
2
2
  module Models
3
3
  module Conversations
4
4
  type conversation_update_params =
5
- { metadata: ::Hash[Symbol, String] }
5
+ { metadata: OpenAI::Models::metadata? }
6
6
  & OpenAI::Internal::Type::request_parameters
7
7
 
8
8
  class ConversationUpdateParams < OpenAI::Internal::Type::BaseModel
9
9
  extend OpenAI::Internal::Type::RequestParameters::Converter
10
10
  include OpenAI::Internal::Type::RequestParameters
11
11
 
12
- attr_accessor metadata: ::Hash[Symbol, String]
12
+ attr_accessor metadata: OpenAI::Models::metadata?
13
13
 
14
14
  def initialize: (
15
- metadata: ::Hash[Symbol, String],
15
+ metadata: OpenAI::Models::metadata?,
16
16
  ?request_options: OpenAI::request_opts
17
17
  ) -> void
18
18
 
19
19
  def to_hash: -> {
20
- metadata: ::Hash[Symbol, String],
20
+ metadata: OpenAI::Models::metadata?,
21
21
  request_options: OpenAI::RequestOptions
22
22
  }
23
23
  end
@@ -7,7 +7,7 @@ module OpenAI
7
7
  arguments: String,
8
8
  name: String,
9
9
  server_label: String,
10
- type: :mcp_tool_call,
10
+ type: :mcp_call,
11
11
  approval_request_id: String?,
12
12
  error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
13
13
  output: String?
@@ -22,7 +22,7 @@ module OpenAI
22
22
 
23
23
  attr_accessor server_label: String
24
24
 
25
- attr_accessor type: :mcp_tool_call
25
+ attr_accessor type: :mcp_call
26
26
 
27
27
  attr_accessor approval_request_id: String?
28
28
 
@@ -38,7 +38,7 @@ module OpenAI
38
38
  ?approval_request_id: String?,
39
39
  ?error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
40
40
  ?output: String?,
41
- ?type: :mcp_tool_call
41
+ ?type: :mcp_call
42
42
  ) -> void
43
43
 
44
44
  def to_hash: -> {
@@ -46,7 +46,7 @@ module OpenAI
46
46
  arguments: String,
47
47
  name: String,
48
48
  server_label: String,
49
- type: :mcp_tool_call,
49
+ type: :mcp_call,
50
50
  approval_request_id: String?,
51
51
  error: OpenAI::Models::Realtime::RealtimeMcpToolCall::error?,
52
52
  output: String?
@@ -16,7 +16,7 @@ module OpenAI
16
16
 
17
17
  def update: (
18
18
  String conversation_id,
19
- metadata: ::Hash[Symbol, String],
19
+ metadata: OpenAI::Models::metadata?,
20
20
  ?request_options: OpenAI::request_opts
21
21
  ) -> OpenAI::Conversations::Conversation
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: openai
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.0
4
+ version: 0.25.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAI
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-09-19 00:00:00.000000000 Z
11
+ date: 2025-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool