Skip to content

Commit 51622d0

Browse files
fix(api): add status, approval_request_id to MCP tool call
1 parent 761b0a2 commit 51622d0

File tree

15 files changed

+640
-22
lines changed

15 files changed

+640
-22
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 118
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-49233088b5e73dbb96bf7af27be3d4547632e3db1c2b00f14184900613325bbc.yml
3-
openapi_spec_hash: b34f14b141d5019244112901c5c7c2d8
4-
config_hash: 94e9ba08201c3d1ca46e093e6a0138fa
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai%2Fopenai-e205b1f2da6a1f2caa229efa9ede63f2d3d2fedeeb2dd6ed3d880bafdcb0ab88.yml
3+
openapi_spec_hash: c8aee2469a749f6a838b40c57e4b7b06
4+
config_hash: 45dcba51451ba532959c020a0ddbf23c

lib/openai/models/conversations/conversation_item.rb

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
526526
# @return [Symbol, :mcp_call]
527527
required :type, const: :mcp_call
528528

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+
529537
# @!attribute error
530538
# The error from the tool call, if any.
531539
#
@@ -538,7 +546,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
538546
# @return [String, nil]
539547
optional :output, String, nil?: true
540548

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)
542557
# Some parameter documentations has been truncated, see
543558
# {OpenAI::Models::Conversations::ConversationItem::McpCall} for more details.
544559
#
@@ -552,11 +567,32 @@ class McpCall < OpenAI::Internal::Type::BaseModel
552567
#
553568
# @param server_label [String] The label of the MCP server running the tool.
554569
#
570+
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
571+
#
555572
# @param error [String, nil] The error from the tool call, if any.
556573
#
557574
# @param output [String, nil] The output from the tool call.
558575
#
576+
# @param status [Symbol, OpenAI::Models::Conversations::ConversationItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
577+
#
559578
# @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
560596
end
561597

562598
# @!method self.variants

lib/openai/models/responses/response_input_item.rb

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,6 +818,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
818818
# @return [Symbol, :mcp_call]
819819
required :type, const: :mcp_call
820820

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+
821829
# @!attribute error
822830
# The error from the tool call, if any.
823831
#
@@ -830,7 +838,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
830838
# @return [String, nil]
831839
optional :output, String, nil?: true
832840

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)
834849
# Some parameter documentations has been truncated, see
835850
# {OpenAI::Models::Responses::ResponseInputItem::McpCall} for more details.
836851
#
@@ -844,11 +859,32 @@ class McpCall < OpenAI::Internal::Type::BaseModel
844859
#
845860
# @param server_label [String] The label of the MCP server running the tool.
846861
#
862+
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
863+
#
847864
# @param error [String, nil] The error from the tool call, if any.
848865
#
849866
# @param output [String, nil] The output from the tool call.
850867
#
868+
# @param status [Symbol, OpenAI::Models::Responses::ResponseInputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
869+
#
851870
# @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
852888
end
853889

854890
class ItemReference < OpenAI::Internal::Type::BaseModel

lib/openai/models/responses/response_item.rb

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,6 +508,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
508508
# @return [Symbol, :mcp_call]
509509
required :type, const: :mcp_call
510510

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+
511519
# @!attribute error
512520
# The error from the tool call, if any.
513521
#
@@ -520,7 +528,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
520528
# @return [String, nil]
521529
optional :output, String, nil?: true
522530

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)
524539
# Some parameter documentations has been truncated, see
525540
# {OpenAI::Models::Responses::ResponseItem::McpCall} for more details.
526541
#
@@ -534,11 +549,32 @@ class McpCall < OpenAI::Internal::Type::BaseModel
534549
#
535550
# @param server_label [String] The label of the MCP server running the tool.
536551
#
552+
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
553+
#
537554
# @param error [String, nil] The error from the tool call, if any.
538555
#
539556
# @param output [String, nil] The output from the tool call.
540557
#
558+
# @param status [Symbol, OpenAI::Models::Responses::ResponseItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
559+
#
541560
# @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
542578
end
543579

544580
# @!method self.variants

lib/openai/models/responses/response_output_item.rb

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
263263
# @return [Symbol, :mcp_call]
264264
required :type, const: :mcp_call
265265

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+
266274
# @!attribute error
267275
# The error from the tool call, if any.
268276
#
@@ -275,7 +283,14 @@ class McpCall < OpenAI::Internal::Type::BaseModel
275283
# @return [String, nil]
276284
optional :output, String, nil?: true
277285

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)
279294
# Some parameter documentations has been truncated, see
280295
# {OpenAI::Models::Responses::ResponseOutputItem::McpCall} for more details.
281296
#
@@ -289,11 +304,32 @@ class McpCall < OpenAI::Internal::Type::BaseModel
289304
#
290305
# @param server_label [String] The label of the MCP server running the tool.
291306
#
307+
# @param approval_request_id [String, nil] Unique identifier for the MCP tool call approval request.
308+
#
292309
# @param error [String, nil] The error from the tool call, if any.
293310
#
294311
# @param output [String, nil] The output from the tool call.
295312
#
313+
# @param status [Symbol, OpenAI::Models::Responses::ResponseOutputItem::McpCall::Status] The status of the tool call. One of `in_progress`, `completed`, `incomplete`, `c
314+
#
296315
# @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
297333
end
298334

299335
class McpListTools < OpenAI::Internal::Type::BaseModel

0 commit comments

Comments
 (0)