openai 0.28.0 → 0.28.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: 01342bdfdf8f3ad25ed0b3266cae9dc3022f3356ed7b6268d01164e10702ce69
4
- data.tar.gz: f49a9c99e8441520c6ed0fcfc5acac72d0622c73c811ae5462d2c4d615f66e54
3
+ metadata.gz: d2963c9fab97188dd1986e144236a3700d3095ce4c1dce0716cb64a6d772a58c
4
+ data.tar.gz: 013da2c55af2fefe9ed8eb57c63898baabe405b2daf9098c896c9a6ab6e34e48
5
5
  SHA512:
6
- metadata.gz: 5ce27503d671f912a27cd1e9e0dfb78088ec362aa1697c9fbaf938882bb5f7e6fc25e7c7e50b2a6b8bb7ec84acb356a9ce3756885084ddf6aa0def3f8841c245
7
- data.tar.gz: bad48c4d256ff7d274432f6361432adca1c0cba1696f75c42f656757f3cdc9bd5913c695184bb3307e9f93e360d745c87002cbc96333bd6af960a912ee19e7dd
6
+ metadata.gz: 421f268dd81210d9fcc86b31718489f0272114be636f74adf66e9eb23119e76c1105b9753129125a92bfc5c7b6b5a7a6b0fbbcbdb3a7bd09d243332907ed00c7
7
+ data.tar.gz: 608b54d37f7db445794622a00ecfe8423d4be4ad37fb587c142472ab25f8c8fc5b5b3682e43ef7c8f491e8766980e282b1dd1e2658cae54084a3fe93fd82a1fb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.28.1 (2025-10-01)
4
+
5
+ Full Changelog: [v0.28.0...v0.28.1](https://github.com/openai/openai-ruby/compare/v0.28.0...v0.28.1)
6
+
7
+ ### Bug Fixes
8
+
9
+ * **api:** add status, approval_request_id to MCP tool call ([51622d0](https://github.com/openai/openai-ruby/commit/51622d065828bec248fb765c5bc243a058f0044d))
10
+
3
11
  ## 0.28.0 (2025-09-30)
4
12
 
5
13
  Full Changelog: [v0.27.1...v0.28.0](https://github.com/openai/openai-ruby/compare/v0.27.1...v0.28.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.28.0"
18
+ gem "openai", "~> 0.28.1"
19
19
  ```
20
20
 
21
21
  <!-- x-release-please-end -->
@@ -526,6 +526,14 @@ module OpenAI
526
526
  # @return [Symbol, :mcp_call]
527
527
  required :type, const: :mcp_call
528
528
 
529
+ # @!attribute approval_request_id
530
+ # Unique identifier for the MCP tool call approval request. Include this value in
531
+ # a subsequent `mcp_approval_response` input to approve or reject the
532
+ # corresponding tool call.
533
+ #
534
+ # @return [String, nil]
535
+ optional :approval_request_id, String, nil?: true
536
+
529
537
  # @!attribute error
530
538
  # The error from the tool call, if any.
531
539
  #
@@ -538,7 +546,14 @@ module OpenAI
538
546
  # @return [String, nil]
539
547
  optional :output, String, nil?: true
540
548
 
541
- # @!method initialize(id:, arguments:, name:, server_label:, error: nil, output: nil, type: :mcp_call)
549
+ # @!attribute status
550
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
551
+ # `calling`, or `failed`.
552
+ #
553
+ # @return [Symbol, OpenAI::Models::Conversations::ConversationItem::McpCall::Status, nil]
554
+ optional :status, enum: -> { OpenAI::Conversations::ConversationItem::McpCall::Status }
555
+
556
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call)
542
557
  # Some parameter documentations has been truncated, see
543
558
  # {OpenAI::Models::Conversations::ConversationItem::McpCall} for more details.
544
559
  #
@@ -552,11 +567,32 @@ module OpenAI
552
567
  #
553
568
  # @param server_label [String] The label of the MCP server running the tool.
554
569
  #
570
+ # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
571
+ #
555
572
  # @param error [String, nil] The error from the tool call, if any.
556
573
  #
557
574
  # @param output [String, nil] The output from the tool call.
558
575
  #
576
+ # @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
577
+ #
559
578
  # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
579
+
580
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
581
+ # `calling`, or `failed`.
582
+ #
583
+ # @see OpenAI::Models::Conversations::ConversationItem::McpCall#status
584
+ module Status
585
+ extend OpenAI::Internal::Type::Enum
586
+
587
+ IN_PROGRESS = :in_progress
588
+ COMPLETED = :completed
589
+ INCOMPLETE = :incomplete
590
+ CALLING = :calling
591
+ FAILED = :failed
592
+
593
+ # @!method self.values
594
+ # @return [Array<Symbol>]
595
+ end
560
596
  end
561
597
 
562
598
  # @!method self.variants
@@ -818,6 +818,14 @@ module OpenAI
818
818
  # @return [Symbol, :mcp_call]
819
819
  required :type, const: :mcp_call
820
820
 
821
+ # @!attribute approval_request_id
822
+ # Unique identifier for the MCP tool call approval request. Include this value in
823
+ # a subsequent `mcp_approval_response` input to approve or reject the
824
+ # corresponding tool call.
825
+ #
826
+ # @return [String, nil]
827
+ optional :approval_request_id, String, nil?: true
828
+
821
829
  # @!attribute error
822
830
  # The error from the tool call, if any.
823
831
  #
@@ -830,7 +838,14 @@ module OpenAI
830
838
  # @return [String, nil]
831
839
  optional :output, String, nil?: true
832
840
 
833
- # @!method initialize(id:, arguments:, name:, server_label:, error: nil, output: nil, type: :mcp_call)
841
+ # @!attribute status
842
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
843
+ # `calling`, or `failed`.
844
+ #
845
+ # @return [Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status, nil]
846
+ optional :status, enum: -> { OpenAI::Responses::ResponseInputItem::McpCall::Status }
847
+
848
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call)
834
849
  # Some parameter documentations has been truncated, see
835
850
  # {OpenAI::Models::Responses::ResponseInputItem::McpCall} for more details.
836
851
  #
@@ -844,11 +859,32 @@ module OpenAI
844
859
  #
845
860
  # @param server_label [String] The label of the MCP server running the tool.
846
861
  #
862
+ # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
863
+ #
847
864
  # @param error [String, nil] The error from the tool call, if any.
848
865
  #
849
866
  # @param output [String, nil] The output from the tool call.
850
867
  #
868
+ # @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
869
+ #
851
870
  # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
871
+
872
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
873
+ # `calling`, or `failed`.
874
+ #
875
+ # @see OpenAI::Models::Responses::ResponseInputItem::McpCall#status
876
+ module Status
877
+ extend OpenAI::Internal::Type::Enum
878
+
879
+ IN_PROGRESS = :in_progress
880
+ COMPLETED = :completed
881
+ INCOMPLETE = :incomplete
882
+ CALLING = :calling
883
+ FAILED = :failed
884
+
885
+ # @!method self.values
886
+ # @return [Array<Symbol>]
887
+ end
852
888
  end
853
889
 
854
890
  class ItemReference < OpenAI::Internal::Type::BaseModel
@@ -508,6 +508,14 @@ module OpenAI
508
508
  # @return [Symbol, :mcp_call]
509
509
  required :type, const: :mcp_call
510
510
 
511
+ # @!attribute approval_request_id
512
+ # Unique identifier for the MCP tool call approval request. Include this value in
513
+ # a subsequent `mcp_approval_response` input to approve or reject the
514
+ # corresponding tool call.
515
+ #
516
+ # @return [String, nil]
517
+ optional :approval_request_id, String, nil?: true
518
+
511
519
  # @!attribute error
512
520
  # The error from the tool call, if any.
513
521
  #
@@ -520,7 +528,14 @@ module OpenAI
520
528
  # @return [String, nil]
521
529
  optional :output, String, nil?: true
522
530
 
523
- # @!method initialize(id:, arguments:, name:, server_label:, error: nil, output: nil, type: :mcp_call)
531
+ # @!attribute status
532
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
533
+ # `calling`, or `failed`.
534
+ #
535
+ # @return [Symbol, OpenAI::Models::Responses::ResponseItem::McpCall::Status, nil]
536
+ optional :status, enum: -> { OpenAI::Responses::ResponseItem::McpCall::Status }
537
+
538
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call)
524
539
  # Some parameter documentations has been truncated, see
525
540
  # {OpenAI::Models::Responses::ResponseItem::McpCall} for more details.
526
541
  #
@@ -534,11 +549,32 @@ module OpenAI
534
549
  #
535
550
  # @param server_label [String] The label of the MCP server running the tool.
536
551
  #
552
+ # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
553
+ #
537
554
  # @param error [String, nil] The error from the tool call, if any.
538
555
  #
539
556
  # @param output [String, nil] The output from the tool call.
540
557
  #
558
+ # @param status [Symbol, OpenAI::Models::Responses::ResponseItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
559
+ #
541
560
  # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
561
+
562
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
563
+ # `calling`, or `failed`.
564
+ #
565
+ # @see OpenAI::Models::Responses::ResponseItem::McpCall#status
566
+ module Status
567
+ extend OpenAI::Internal::Type::Enum
568
+
569
+ IN_PROGRESS = :in_progress
570
+ COMPLETED = :completed
571
+ INCOMPLETE = :incomplete
572
+ CALLING = :calling
573
+ FAILED = :failed
574
+
575
+ # @!method self.values
576
+ # @return [Array<Symbol>]
577
+ end
542
578
  end
543
579
 
544
580
  # @!method self.variants
@@ -263,6 +263,14 @@ module OpenAI
263
263
  # @return [Symbol, :mcp_call]
264
264
  required :type, const: :mcp_call
265
265
 
266
+ # @!attribute approval_request_id
267
+ # Unique identifier for the MCP tool call approval request. Include this value in
268
+ # a subsequent `mcp_approval_response` input to approve or reject the
269
+ # corresponding tool call.
270
+ #
271
+ # @return [String, nil]
272
+ optional :approval_request_id, String, nil?: true
273
+
266
274
  # @!attribute error
267
275
  # The error from the tool call, if any.
268
276
  #
@@ -275,7 +283,14 @@ module OpenAI
275
283
  # @return [String, nil]
276
284
  optional :output, String, nil?: true
277
285
 
278
- # @!method initialize(id:, arguments:, name:, server_label:, error: nil, output: nil, type: :mcp_call)
286
+ # @!attribute status
287
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
288
+ # `calling`, or `failed`.
289
+ #
290
+ # @return [Symbol, OpenAI::Models::Responses::ResponseOutputItem::McpCall::Status, nil]
291
+ optional :status, enum: -> { OpenAI::Responses::ResponseOutputItem::McpCall::Status }
292
+
293
+ # @!method initialize(id:, arguments:, name:, server_label:, approval_request_id: nil, error: nil, output: nil, status: nil, type: :mcp_call)
279
294
  # Some parameter documentations has been truncated, see
280
295
  # {OpenAI::Models::Responses::ResponseOutputItem::McpCall} for more details.
281
296
  #
@@ -289,11 +304,32 @@ module OpenAI
289
304
  #
290
305
  # @param server_label [String] The label of the MCP server running the tool.
291
306
  #
307
+ # @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
308
+ #
292
309
  # @param error [String, nil] The error from the tool call, if any.
293
310
  #
294
311
  # @param output [String, nil] The output from the tool call.
295
312
  #
313
+ # @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
314
+ #
296
315
  # @param type [Symbol, :mcp_call] The type of the item. Always `mcp_call`.
316
+
317
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
318
+ # `calling`, or `failed`.
319
+ #
320
+ # @see OpenAI::Models::Responses::ResponseOutputItem::McpCall#status
321
+ module Status
322
+ extend OpenAI::Internal::Type::Enum
323
+
324
+ IN_PROGRESS = :in_progress
325
+ COMPLETED = :completed
326
+ INCOMPLETE = :incomplete
327
+ CALLING = :calling
328
+ FAILED = :failed
329
+
330
+ # @!method self.values
331
+ # @return [Array<Symbol>]
332
+ end
297
333
  end
298
334
 
299
335
  class McpListTools < OpenAI::Internal::Type::BaseModel
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module OpenAI
4
- VERSION = "0.28.0"
4
+ VERSION = "0.28.1"
5
5
  end
@@ -767,6 +767,12 @@ module OpenAI
767
767
  sig { returns(Symbol) }
768
768
  attr_accessor :type
769
769
 
770
+ # Unique identifier for the MCP tool call approval request. Include this value in
771
+ # a subsequent `mcp_approval_response` input to approve or reject the
772
+ # corresponding tool call.
773
+ sig { returns(T.nilable(String)) }
774
+ attr_accessor :approval_request_id
775
+
770
776
  # The error from the tool call, if any.
771
777
  sig { returns(T.nilable(String)) }
772
778
  attr_accessor :error
@@ -775,6 +781,25 @@ module OpenAI
775
781
  sig { returns(T.nilable(String)) }
776
782
  attr_accessor :output
777
783
 
784
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
785
+ # `calling`, or `failed`.
786
+ sig do
787
+ returns(
788
+ T.nilable(
789
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
790
+ )
791
+ )
792
+ end
793
+ attr_reader :status
794
+
795
+ sig do
796
+ params(
797
+ status:
798
+ OpenAI::Conversations::ConversationItem::McpCall::Status::OrSymbol
799
+ ).void
800
+ end
801
+ attr_writer :status
802
+
778
803
  # An invocation of a tool on an MCP server.
779
804
  sig do
780
805
  params(
@@ -782,8 +807,11 @@ module OpenAI
782
807
  arguments: String,
783
808
  name: String,
784
809
  server_label: String,
810
+ approval_request_id: T.nilable(String),
785
811
  error: T.nilable(String),
786
812
  output: T.nilable(String),
813
+ status:
814
+ OpenAI::Conversations::ConversationItem::McpCall::Status::OrSymbol,
787
815
  type: Symbol
788
816
  ).returns(T.attached_class)
789
817
  end
@@ -796,10 +824,17 @@ module OpenAI
796
824
  name:,
797
825
  # The label of the MCP server running the tool.
798
826
  server_label:,
827
+ # Unique identifier for the MCP tool call approval request. Include this value in
828
+ # a subsequent `mcp_approval_response` input to approve or reject the
829
+ # corresponding tool call.
830
+ approval_request_id: nil,
799
831
  # The error from the tool call, if any.
800
832
  error: nil,
801
833
  # The output from the tool call.
802
834
  output: nil,
835
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
836
+ # `calling`, or `failed`.
837
+ status: nil,
803
838
  # The type of the item. Always `mcp_call`.
804
839
  type: :mcp_call
805
840
  )
@@ -813,13 +848,67 @@ module OpenAI
813
848
  name: String,
814
849
  server_label: String,
815
850
  type: Symbol,
851
+ approval_request_id: T.nilable(String),
816
852
  error: T.nilable(String),
817
- output: T.nilable(String)
853
+ output: T.nilable(String),
854
+ status:
855
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
818
856
  }
819
857
  )
820
858
  end
821
859
  def to_hash
822
860
  end
861
+
862
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
863
+ # `calling`, or `failed`.
864
+ module Status
865
+ extend OpenAI::Internal::Type::Enum
866
+
867
+ TaggedSymbol =
868
+ T.type_alias do
869
+ T.all(
870
+ Symbol,
871
+ OpenAI::Conversations::ConversationItem::McpCall::Status
872
+ )
873
+ end
874
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
875
+
876
+ IN_PROGRESS =
877
+ T.let(
878
+ :in_progress,
879
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
880
+ )
881
+ COMPLETED =
882
+ T.let(
883
+ :completed,
884
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
885
+ )
886
+ INCOMPLETE =
887
+ T.let(
888
+ :incomplete,
889
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
890
+ )
891
+ CALLING =
892
+ T.let(
893
+ :calling,
894
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
895
+ )
896
+ FAILED =
897
+ T.let(
898
+ :failed,
899
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
900
+ )
901
+
902
+ sig do
903
+ override.returns(
904
+ T::Array[
905
+ OpenAI::Conversations::ConversationItem::McpCall::Status::TaggedSymbol
906
+ ]
907
+ )
908
+ end
909
+ def self.values
910
+ end
911
+ end
823
912
  end
824
913
 
825
914
  sig do
@@ -1381,6 +1381,12 @@ module OpenAI
1381
1381
  sig { returns(Symbol) }
1382
1382
  attr_accessor :type
1383
1383
 
1384
+ # Unique identifier for the MCP tool call approval request. Include this value in
1385
+ # a subsequent `mcp_approval_response` input to approve or reject the
1386
+ # corresponding tool call.
1387
+ sig { returns(T.nilable(String)) }
1388
+ attr_accessor :approval_request_id
1389
+
1384
1390
  # The error from the tool call, if any.
1385
1391
  sig { returns(T.nilable(String)) }
1386
1392
  attr_accessor :error
@@ -1389,6 +1395,25 @@ module OpenAI
1389
1395
  sig { returns(T.nilable(String)) }
1390
1396
  attr_accessor :output
1391
1397
 
1398
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
1399
+ # `calling`, or `failed`.
1400
+ sig do
1401
+ returns(
1402
+ T.nilable(
1403
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
1404
+ )
1405
+ )
1406
+ end
1407
+ attr_reader :status
1408
+
1409
+ sig do
1410
+ params(
1411
+ status:
1412
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
1413
+ ).void
1414
+ end
1415
+ attr_writer :status
1416
+
1392
1417
  # An invocation of a tool on an MCP server.
1393
1418
  sig do
1394
1419
  params(
@@ -1396,8 +1421,11 @@ module OpenAI
1396
1421
  arguments: String,
1397
1422
  name: String,
1398
1423
  server_label: String,
1424
+ approval_request_id: T.nilable(String),
1399
1425
  error: T.nilable(String),
1400
1426
  output: T.nilable(String),
1427
+ status:
1428
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol,
1401
1429
  type: Symbol
1402
1430
  ).returns(T.attached_class)
1403
1431
  end
@@ -1410,10 +1438,17 @@ module OpenAI
1410
1438
  name:,
1411
1439
  # The label of the MCP server running the tool.
1412
1440
  server_label:,
1441
+ # Unique identifier for the MCP tool call approval request. Include this value in
1442
+ # a subsequent `mcp_approval_response` input to approve or reject the
1443
+ # corresponding tool call.
1444
+ approval_request_id: nil,
1413
1445
  # The error from the tool call, if any.
1414
1446
  error: nil,
1415
1447
  # The output from the tool call.
1416
1448
  output: nil,
1449
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
1450
+ # `calling`, or `failed`.
1451
+ status: nil,
1417
1452
  # The type of the item. Always `mcp_call`.
1418
1453
  type: :mcp_call
1419
1454
  )
@@ -1427,13 +1462,67 @@ module OpenAI
1427
1462
  name: String,
1428
1463
  server_label: String,
1429
1464
  type: Symbol,
1465
+ approval_request_id: T.nilable(String),
1430
1466
  error: T.nilable(String),
1431
- output: T.nilable(String)
1467
+ output: T.nilable(String),
1468
+ status:
1469
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::OrSymbol
1432
1470
  }
1433
1471
  )
1434
1472
  end
1435
1473
  def to_hash
1436
1474
  end
1475
+
1476
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
1477
+ # `calling`, or `failed`.
1478
+ module Status
1479
+ extend OpenAI::Internal::Type::Enum
1480
+
1481
+ TaggedSymbol =
1482
+ T.type_alias do
1483
+ T.all(
1484
+ Symbol,
1485
+ OpenAI::Responses::ResponseInputItem::McpCall::Status
1486
+ )
1487
+ end
1488
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
1489
+
1490
+ IN_PROGRESS =
1491
+ T.let(
1492
+ :in_progress,
1493
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1494
+ )
1495
+ COMPLETED =
1496
+ T.let(
1497
+ :completed,
1498
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1499
+ )
1500
+ INCOMPLETE =
1501
+ T.let(
1502
+ :incomplete,
1503
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1504
+ )
1505
+ CALLING =
1506
+ T.let(
1507
+ :calling,
1508
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1509
+ )
1510
+ FAILED =
1511
+ T.let(
1512
+ :failed,
1513
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1514
+ )
1515
+
1516
+ sig do
1517
+ override.returns(
1518
+ T::Array[
1519
+ OpenAI::Responses::ResponseInputItem::McpCall::Status::TaggedSymbol
1520
+ ]
1521
+ )
1522
+ end
1523
+ def self.values
1524
+ end
1525
+ end
1437
1526
  end
1438
1527
 
1439
1528
  class ItemReference < OpenAI::Internal::Type::BaseModel
@@ -754,6 +754,12 @@ module OpenAI
754
754
  sig { returns(Symbol) }
755
755
  attr_accessor :type
756
756
 
757
+ # Unique identifier for the MCP tool call approval request. Include this value in
758
+ # a subsequent `mcp_approval_response` input to approve or reject the
759
+ # corresponding tool call.
760
+ sig { returns(T.nilable(String)) }
761
+ attr_accessor :approval_request_id
762
+
757
763
  # The error from the tool call, if any.
758
764
  sig { returns(T.nilable(String)) }
759
765
  attr_accessor :error
@@ -762,6 +768,24 @@ module OpenAI
762
768
  sig { returns(T.nilable(String)) }
763
769
  attr_accessor :output
764
770
 
771
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
772
+ # `calling`, or `failed`.
773
+ sig do
774
+ returns(
775
+ T.nilable(
776
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
777
+ )
778
+ )
779
+ end
780
+ attr_reader :status
781
+
782
+ sig do
783
+ params(
784
+ status: OpenAI::Responses::ResponseItem::McpCall::Status::OrSymbol
785
+ ).void
786
+ end
787
+ attr_writer :status
788
+
765
789
  # An invocation of a tool on an MCP server.
766
790
  sig do
767
791
  params(
@@ -769,8 +793,11 @@ module OpenAI
769
793
  arguments: String,
770
794
  name: String,
771
795
  server_label: String,
796
+ approval_request_id: T.nilable(String),
772
797
  error: T.nilable(String),
773
798
  output: T.nilable(String),
799
+ status:
800
+ OpenAI::Responses::ResponseItem::McpCall::Status::OrSymbol,
774
801
  type: Symbol
775
802
  ).returns(T.attached_class)
776
803
  end
@@ -783,10 +810,17 @@ module OpenAI
783
810
  name:,
784
811
  # The label of the MCP server running the tool.
785
812
  server_label:,
813
+ # Unique identifier for the MCP tool call approval request. Include this value in
814
+ # a subsequent `mcp_approval_response` input to approve or reject the
815
+ # corresponding tool call.
816
+ approval_request_id: nil,
786
817
  # The error from the tool call, if any.
787
818
  error: nil,
788
819
  # The output from the tool call.
789
820
  output: nil,
821
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
822
+ # `calling`, or `failed`.
823
+ status: nil,
790
824
  # The type of the item. Always `mcp_call`.
791
825
  type: :mcp_call
792
826
  )
@@ -800,13 +834,64 @@ module OpenAI
800
834
  name: String,
801
835
  server_label: String,
802
836
  type: Symbol,
837
+ approval_request_id: T.nilable(String),
803
838
  error: T.nilable(String),
804
- output: T.nilable(String)
839
+ output: T.nilable(String),
840
+ status:
841
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
805
842
  }
806
843
  )
807
844
  end
808
845
  def to_hash
809
846
  end
847
+
848
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
849
+ # `calling`, or `failed`.
850
+ module Status
851
+ extend OpenAI::Internal::Type::Enum
852
+
853
+ TaggedSymbol =
854
+ T.type_alias do
855
+ T.all(Symbol, OpenAI::Responses::ResponseItem::McpCall::Status)
856
+ end
857
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
858
+
859
+ IN_PROGRESS =
860
+ T.let(
861
+ :in_progress,
862
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
863
+ )
864
+ COMPLETED =
865
+ T.let(
866
+ :completed,
867
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
868
+ )
869
+ INCOMPLETE =
870
+ T.let(
871
+ :incomplete,
872
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
873
+ )
874
+ CALLING =
875
+ T.let(
876
+ :calling,
877
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
878
+ )
879
+ FAILED =
880
+ T.let(
881
+ :failed,
882
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
883
+ )
884
+
885
+ sig do
886
+ override.returns(
887
+ T::Array[
888
+ OpenAI::Responses::ResponseItem::McpCall::Status::TaggedSymbol
889
+ ]
890
+ )
891
+ end
892
+ def self.values
893
+ end
894
+ end
810
895
  end
811
896
 
812
897
  sig do
@@ -370,6 +370,12 @@ module OpenAI
370
370
  sig { returns(Symbol) }
371
371
  attr_accessor :type
372
372
 
373
+ # Unique identifier for the MCP tool call approval request. Include this value in
374
+ # a subsequent `mcp_approval_response` input to approve or reject the
375
+ # corresponding tool call.
376
+ sig { returns(T.nilable(String)) }
377
+ attr_accessor :approval_request_id
378
+
373
379
  # The error from the tool call, if any.
374
380
  sig { returns(T.nilable(String)) }
375
381
  attr_accessor :error
@@ -378,6 +384,25 @@ module OpenAI
378
384
  sig { returns(T.nilable(String)) }
379
385
  attr_accessor :output
380
386
 
387
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
388
+ # `calling`, or `failed`.
389
+ sig do
390
+ returns(
391
+ T.nilable(
392
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
393
+ )
394
+ )
395
+ end
396
+ attr_reader :status
397
+
398
+ sig do
399
+ params(
400
+ status:
401
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::OrSymbol
402
+ ).void
403
+ end
404
+ attr_writer :status
405
+
381
406
  # An invocation of a tool on an MCP server.
382
407
  sig do
383
408
  params(
@@ -385,8 +410,11 @@ module OpenAI
385
410
  arguments: String,
386
411
  name: String,
387
412
  server_label: String,
413
+ approval_request_id: T.nilable(String),
388
414
  error: T.nilable(String),
389
415
  output: T.nilable(String),
416
+ status:
417
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::OrSymbol,
390
418
  type: Symbol
391
419
  ).returns(T.attached_class)
392
420
  end
@@ -399,10 +427,17 @@ module OpenAI
399
427
  name:,
400
428
  # The label of the MCP server running the tool.
401
429
  server_label:,
430
+ # Unique identifier for the MCP tool call approval request. Include this value in
431
+ # a subsequent `mcp_approval_response` input to approve or reject the
432
+ # corresponding tool call.
433
+ approval_request_id: nil,
402
434
  # The error from the tool call, if any.
403
435
  error: nil,
404
436
  # The output from the tool call.
405
437
  output: nil,
438
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
439
+ # `calling`, or `failed`.
440
+ status: nil,
406
441
  # The type of the item. Always `mcp_call`.
407
442
  type: :mcp_call
408
443
  )
@@ -416,13 +451,67 @@ module OpenAI
416
451
  name: String,
417
452
  server_label: String,
418
453
  type: Symbol,
454
+ approval_request_id: T.nilable(String),
419
455
  error: T.nilable(String),
420
- output: T.nilable(String)
456
+ output: T.nilable(String),
457
+ status:
458
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
421
459
  }
422
460
  )
423
461
  end
424
462
  def to_hash
425
463
  end
464
+
465
+ # The status of the tool call. One of `in_progress`, `completed`, `incomplete`,
466
+ # `calling`, or `failed`.
467
+ module Status
468
+ extend OpenAI::Internal::Type::Enum
469
+
470
+ TaggedSymbol =
471
+ T.type_alias do
472
+ T.all(
473
+ Symbol,
474
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status
475
+ )
476
+ end
477
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
478
+
479
+ IN_PROGRESS =
480
+ T.let(
481
+ :in_progress,
482
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
483
+ )
484
+ COMPLETED =
485
+ T.let(
486
+ :completed,
487
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
488
+ )
489
+ INCOMPLETE =
490
+ T.let(
491
+ :incomplete,
492
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
493
+ )
494
+ CALLING =
495
+ T.let(
496
+ :calling,
497
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
498
+ )
499
+ FAILED =
500
+ T.let(
501
+ :failed,
502
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
503
+ )
504
+
505
+ sig do
506
+ override.returns(
507
+ T::Array[
508
+ OpenAI::Responses::ResponseOutputItem::McpCall::Status::TaggedSymbol
509
+ ]
510
+ )
511
+ end
512
+ def self.values
513
+ end
514
+ end
426
515
  end
427
516
 
428
517
  class McpListTools < OpenAI::Internal::Type::BaseModel
@@ -356,8 +356,10 @@ module OpenAI
356
356
  name: String,
357
357
  server_label: String,
358
358
  type: :mcp_call,
359
+ approval_request_id: String?,
359
360
  error: String?,
360
- output: String?
361
+ output: String?,
362
+ status: OpenAI::Models::Conversations::ConversationItem::McpCall::status
361
363
  }
362
364
 
363
365
  class McpCall < OpenAI::Internal::Type::BaseModel
@@ -371,17 +373,27 @@ module OpenAI
371
373
 
372
374
  attr_accessor type: :mcp_call
373
375
 
376
+ attr_accessor approval_request_id: String?
377
+
374
378
  attr_accessor error: String?
375
379
 
376
380
  attr_accessor output: String?
377
381
 
382
+ attr_reader status: OpenAI::Models::Conversations::ConversationItem::McpCall::status?
383
+
384
+ def status=: (
385
+ OpenAI::Models::Conversations::ConversationItem::McpCall::status
386
+ ) -> OpenAI::Models::Conversations::ConversationItem::McpCall::status
387
+
378
388
  def initialize: (
379
389
  id: String,
380
390
  arguments: String,
381
391
  name: String,
382
392
  server_label: String,
393
+ ?approval_request_id: String?,
383
394
  ?error: String?,
384
395
  ?output: String?,
396
+ ?status: OpenAI::Models::Conversations::ConversationItem::McpCall::status,
385
397
  ?type: :mcp_call
386
398
  ) -> void
387
399
 
@@ -391,9 +403,26 @@ module OpenAI
391
403
  name: String,
392
404
  server_label: String,
393
405
  type: :mcp_call,
406
+ approval_request_id: String?,
394
407
  error: String?,
395
- output: String?
408
+ output: String?,
409
+ status: OpenAI::Models::Conversations::ConversationItem::McpCall::status
396
410
  }
411
+
412
+ type status =
413
+ :in_progress | :completed | :incomplete | :calling | :failed
414
+
415
+ module Status
416
+ extend OpenAI::Internal::Type::Enum
417
+
418
+ IN_PROGRESS: :in_progress
419
+ COMPLETED: :completed
420
+ INCOMPLETE: :incomplete
421
+ CALLING: :calling
422
+ FAILED: :failed
423
+
424
+ def self?.values: -> ::Array[OpenAI::Models::Conversations::ConversationItem::McpCall::status]
425
+ end
397
426
  end
398
427
 
399
428
  def self?.variants: -> ::Array[OpenAI::Models::Conversations::conversation_item]
@@ -563,8 +563,10 @@ module OpenAI
563
563
  name: String,
564
564
  server_label: String,
565
565
  type: :mcp_call,
566
+ approval_request_id: String?,
566
567
  error: String?,
567
- output: String?
568
+ output: String?,
569
+ status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status
568
570
  }
569
571
 
570
572
  class McpCall < OpenAI::Internal::Type::BaseModel
@@ -578,17 +580,27 @@ module OpenAI
578
580
 
579
581
  attr_accessor type: :mcp_call
580
582
 
583
+ attr_accessor approval_request_id: String?
584
+
581
585
  attr_accessor error: String?
582
586
 
583
587
  attr_accessor output: String?
584
588
 
589
+ attr_reader status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status?
590
+
591
+ def status=: (
592
+ OpenAI::Models::Responses::ResponseInputItem::McpCall::status
593
+ ) -> OpenAI::Models::Responses::ResponseInputItem::McpCall::status
594
+
585
595
  def initialize: (
586
596
  id: String,
587
597
  arguments: String,
588
598
  name: String,
589
599
  server_label: String,
600
+ ?approval_request_id: String?,
590
601
  ?error: String?,
591
602
  ?output: String?,
603
+ ?status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status,
592
604
  ?type: :mcp_call
593
605
  ) -> void
594
606
 
@@ -598,9 +610,26 @@ module OpenAI
598
610
  name: String,
599
611
  server_label: String,
600
612
  type: :mcp_call,
613
+ approval_request_id: String?,
601
614
  error: String?,
602
- output: String?
615
+ output: String?,
616
+ status: OpenAI::Models::Responses::ResponseInputItem::McpCall::status
603
617
  }
618
+
619
+ type status =
620
+ :in_progress | :completed | :incomplete | :calling | :failed
621
+
622
+ module Status
623
+ extend OpenAI::Internal::Type::Enum
624
+
625
+ IN_PROGRESS: :in_progress
626
+ COMPLETED: :completed
627
+ INCOMPLETE: :incomplete
628
+ CALLING: :calling
629
+ FAILED: :failed
630
+
631
+ def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseInputItem::McpCall::status]
632
+ end
604
633
  end
605
634
 
606
635
  type item_reference =
@@ -352,8 +352,10 @@ module OpenAI
352
352
  name: String,
353
353
  server_label: String,
354
354
  type: :mcp_call,
355
+ approval_request_id: String?,
355
356
  error: String?,
356
- output: String?
357
+ output: String?,
358
+ status: OpenAI::Models::Responses::ResponseItem::McpCall::status
357
359
  }
358
360
 
359
361
  class McpCall < OpenAI::Internal::Type::BaseModel
@@ -367,17 +369,27 @@ module OpenAI
367
369
 
368
370
  attr_accessor type: :mcp_call
369
371
 
372
+ attr_accessor approval_request_id: String?
373
+
370
374
  attr_accessor error: String?
371
375
 
372
376
  attr_accessor output: String?
373
377
 
378
+ attr_reader status: OpenAI::Models::Responses::ResponseItem::McpCall::status?
379
+
380
+ def status=: (
381
+ OpenAI::Models::Responses::ResponseItem::McpCall::status
382
+ ) -> OpenAI::Models::Responses::ResponseItem::McpCall::status
383
+
374
384
  def initialize: (
375
385
  id: String,
376
386
  arguments: String,
377
387
  name: String,
378
388
  server_label: String,
389
+ ?approval_request_id: String?,
379
390
  ?error: String?,
380
391
  ?output: String?,
392
+ ?status: OpenAI::Models::Responses::ResponseItem::McpCall::status,
381
393
  ?type: :mcp_call
382
394
  ) -> void
383
395
 
@@ -387,9 +399,26 @@ module OpenAI
387
399
  name: String,
388
400
  server_label: String,
389
401
  type: :mcp_call,
402
+ approval_request_id: String?,
390
403
  error: String?,
391
- output: String?
404
+ output: String?,
405
+ status: OpenAI::Models::Responses::ResponseItem::McpCall::status
392
406
  }
407
+
408
+ type status =
409
+ :in_progress | :completed | :incomplete | :calling | :failed
410
+
411
+ module Status
412
+ extend OpenAI::Internal::Type::Enum
413
+
414
+ IN_PROGRESS: :in_progress
415
+ COMPLETED: :completed
416
+ INCOMPLETE: :incomplete
417
+ CALLING: :calling
418
+ FAILED: :failed
419
+
420
+ def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseItem::McpCall::status]
421
+ end
393
422
  end
394
423
 
395
424
  def self?.variants: -> ::Array[OpenAI::Models::Responses::response_item]
@@ -162,8 +162,10 @@ module OpenAI
162
162
  name: String,
163
163
  server_label: String,
164
164
  type: :mcp_call,
165
+ approval_request_id: String?,
165
166
  error: String?,
166
- output: String?
167
+ output: String?,
168
+ status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
167
169
  }
168
170
 
169
171
  class McpCall < OpenAI::Internal::Type::BaseModel
@@ -177,17 +179,27 @@ module OpenAI
177
179
 
178
180
  attr_accessor type: :mcp_call
179
181
 
182
+ attr_accessor approval_request_id: String?
183
+
180
184
  attr_accessor error: String?
181
185
 
182
186
  attr_accessor output: String?
183
187
 
188
+ attr_reader status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status?
189
+
190
+ def status=: (
191
+ OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
192
+ ) -> OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
193
+
184
194
  def initialize: (
185
195
  id: String,
186
196
  arguments: String,
187
197
  name: String,
188
198
  server_label: String,
199
+ ?approval_request_id: String?,
189
200
  ?error: String?,
190
201
  ?output: String?,
202
+ ?status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status,
191
203
  ?type: :mcp_call
192
204
  ) -> void
193
205
 
@@ -197,9 +209,26 @@ module OpenAI
197
209
  name: String,
198
210
  server_label: String,
199
211
  type: :mcp_call,
212
+ approval_request_id: String?,
200
213
  error: String?,
201
- output: String?
214
+ output: String?,
215
+ status: OpenAI::Models::Responses::ResponseOutputItem::McpCall::status
202
216
  }
217
+
218
+ type status =
219
+ :in_progress | :completed | :incomplete | :calling | :failed
220
+
221
+ module Status
222
+ extend OpenAI::Internal::Type::Enum
223
+
224
+ IN_PROGRESS: :in_progress
225
+ COMPLETED: :completed
226
+ INCOMPLETE: :incomplete
227
+ CALLING: :calling
228
+ FAILED: :failed
229
+
230
+ def self?.values: -> ::Array[OpenAI::Models::Responses::ResponseOutputItem::McpCall::status]
231
+ end
203
232
  end
204
233
 
205
234
  type mcp_list_tools =
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.28.0
4
+ version: 0.28.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-30 00:00:00.000000000 Z
11
+ date: 2025-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: connection_pool