openai 0.113.0 → 0.115.0
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 +4 -4
- data/CHANGELOG.md +54 -0
- data/README.md +17 -2
- data/docs/architecture/security-model.md +11 -16
- data/examples/responses/websocket_workflows.rb +78 -3
- data/lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb +10 -8
- data/lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb +8 -7
- data/lib/openai/helpers/chat/tool_runner.rb +1 -1
- data/lib/openai/helpers/live/websocket.rb +31 -0
- data/lib/openai/helpers/realtime/connection.rb +33 -0
- data/lib/openai/helpers/realtime/connection_manager.rb +1 -0
- data/lib/openai/helpers/realtime/conversation_item_variant_resolver.rb +5 -0
- data/lib/openai/helpers/realtime/recovery.rb +5 -1
- data/lib/openai/helpers/realtime/translation.rb +5 -0
- data/lib/openai/helpers/realtime/transports/async_websocket.rb +19 -0
- data/lib/openai/helpers/responses_websocket/connection.rb +53 -15
- data/lib/openai/helpers/responses_websocket/connection_manager.rb +1 -0
- data/lib/openai/helpers/responses_websocket/connection_resources.rb +1 -1
- data/lib/openai/helpers/structured_output/response_parser.rb +1 -0
- data/lib/openai/helpers/structured_output.rb +58 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +11 -0
- data/lib/openai/helpers/websocket/resource.rb +1 -0
- data/lib/openai/helpers/websocket/typed_connection.rb +1 -0
- data/lib/openai/internal/type/array_of.rb +1 -1
- data/lib/openai/internal/type/hash_of.rb +1 -1
- data/lib/openai/internal/type/request_parameters.rb +2 -1
- data/lib/openai/internal/type/union.rb +18 -6
- data/lib/openai/models/admin/organization/external_key.rb +169 -0
- data/lib/openai/models/admin/organization/external_key_create_params.rb +311 -0
- data/lib/openai/models/admin/organization/external_key_delete_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_list_params.rb +69 -0
- data/lib/openai/models/admin/organization/external_key_retrieve_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_params.rb +24 -0
- data/lib/openai/models/admin/organization/external_key_validate_response.rb +20 -0
- data/lib/openai/models/audio/speech_model.rb +12 -0
- data/lib/openai/models/audio_model.rb +15 -0
- data/lib/openai/models/beta/agent.rb +49 -1
- data/lib/openai/models/beta/agent_create_params.rb +51 -1
- data/lib/openai/models/beta/agent_session.rb +75 -2
- data/lib/openai/models/beta/agent_update_params.rb +62 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +94 -2
- data/lib/openai/models/beta/agents/session_list_params.rb +16 -1
- data/lib/openai/models/beta/agents/session_update_params.rb +50 -5
- data/lib/openai/models/beta/assistant_update_params.rb +18 -0
- data/lib/openai/models/beta/beta_response.rb +224 -1
- data/lib/openai/models/beta/beta_response_configuration_update_item.rb +64 -3
- data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +64 -4
- data/lib/openai/models/beta/beta_response_input_file.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_file_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_image_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_item.rb +2 -3
- data/lib/openai/models/beta/beta_response_input_text.rb +9 -9
- data/lib/openai/models/beta/beta_response_input_text_content.rb +9 -9
- data/lib/openai/models/beta/beta_response_item.rb +11 -11
- data/lib/openai/models/beta/beta_response_output_item.rb +9 -9
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/beta/beta_responses_client_event.rb +20 -1
- data/lib/openai/models/beta/beta_tool.rb +6 -6
- data/lib/openai/models/beta/response_compact_params.rb +6 -0
- data/lib/openai/models/beta/response_create_params.rb +6 -0
- data/lib/openai/models/chat/chat_completion_content_part.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_image.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_input_audio.rb +9 -9
- data/lib/openai/models/chat/chat_completion_content_part_text.rb +9 -9
- data/lib/openai/models/chat_model.rb +6 -0
- data/lib/openai/models/conversations/computer_screenshot_content.rb +9 -9
- data/lib/openai/models/conversations/conversation_item.rb +2 -2
- data/lib/openai/models/image_edit_params.rb +46 -25
- data/lib/openai/models/live/fork_server_event.rb +43 -3
- data/lib/openai/models/live/server_event.rb +43 -3
- data/lib/openai/models/live/sideband_client_event.rb +40 -1
- data/lib/openai/models/live/sideband_server_event.rb +43 -3
- data/lib/openai/models/realtime/audio_transcription.rb +15 -0
- data/lib/openai/models/realtime/conversation_item_added.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_create_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_created_event.rb +2 -2
- data/lib/openai/models/realtime/conversation_item_done.rb +2 -2
- data/lib/openai/models/realtime/realtime_response.rb +2 -2
- data/lib/openai/models/realtime/realtime_response_create_params.rb +2 -2
- data/lib/openai/models/realtime/realtime_server_event.rb +2 -2
- data/lib/openai/models/realtime/realtime_session.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_request.rb +18 -0
- data/lib/openai/models/realtime/realtime_session_create_response.rb +18 -0
- data/lib/openai/models/realtime/response_output_item_added_event.rb +2 -2
- data/lib/openai/models/realtime/response_output_item_done_event.rb +2 -2
- data/lib/openai/models/responses/response.rb +221 -1
- data/lib/openai/models/responses/response_compact_params.rb +6 -0
- data/lib/openai/models/responses/response_configuration_update_item.rb +50 -3
- data/lib/openai/models/responses/response_configuration_update_item_param.rb +50 -4
- data/lib/openai/models/responses/response_input_file.rb +9 -9
- data/lib/openai/models/responses/response_input_file_content.rb +9 -9
- data/lib/openai/models/responses/response_input_image.rb +9 -9
- data/lib/openai/models/responses/response_input_image_content.rb +9 -9
- data/lib/openai/models/responses/response_input_item.rb +2 -3
- data/lib/openai/models/responses/response_input_text.rb +9 -9
- data/lib/openai/models/responses/response_input_text_content.rb +9 -9
- data/lib/openai/models/responses/response_item.rb +2 -2
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +6 -6
- data/lib/openai/models/responses/responses_client_event.rb +14 -1
- data/lib/openai/models/responses/tool.rb +6 -6
- data/lib/openai/net_http_client.rb +6 -0
- data/lib/openai/providers/vertex.rb +0 -10
- data/lib/openai/resources/admin/organization/external_keys.rb +132 -0
- data/lib/openai/resources/admin/organization.rb +4 -0
- data/lib/openai/resources/audio/speech.rb +8 -0
- data/lib/openai/resources/audio/translations.rb +8 -0
- data/lib/openai/resources/beta/agents/sessions.rb +22 -6
- data/lib/openai/resources/beta/agents.rb +17 -2
- data/lib/openai/resources/images.rb +36 -18
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +8 -0
- data/rbi/openai/helpers/live/websocket.rbi +1 -12
- data/rbi/openai/helpers/realtime/connection.rbi +5 -0
- data/rbi/openai/helpers/realtime/transports/async_websocket.rbi +5 -0
- data/rbi/openai/helpers/responses_websocket/connection.rbi +7 -2
- data/rbi/openai/helpers/structured_output.rbi +10 -0
- data/rbi/openai/internal/type/array_of.rbi +1 -1
- data/rbi/openai/internal/type/hash_of.rbi +1 -1
- data/rbi/openai/internal/type/union.rbi +5 -0
- data/rbi/openai/models/admin/organization/external_key.rbi +301 -0
- data/rbi/openai/models/admin/organization/external_key_create_params.rbi +532 -0
- data/rbi/openai/models/admin/organization/external_key_delete_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_list_params.rbi +129 -0
- data/rbi/openai/models/admin/organization/external_key_retrieve_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_params.rbi +57 -0
- data/rbi/openai/models/admin/organization/external_key_validate_response.rbi +50 -0
- data/rbi/openai/models/beta/agent.rbi +103 -1
- data/rbi/openai/models/beta/agent_create_params.rbi +109 -0
- data/rbi/openai/models/beta/agent_session.rbi +136 -3
- data/rbi/openai/models/beta/agent_update_params.rbi +120 -0
- data/rbi/openai/models/beta/agents/session_create_params.rbi +153 -0
- data/rbi/openai/models/beta/agents/session_list_params.rbi +19 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +94 -6
- data/rbi/openai/models/beta/beta_response.rbi +394 -0
- data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +113 -3
- data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +125 -4
- data/rbi/openai/models/beta/beta_response_input_file.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_file_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_image_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_input_text_content.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_output_item.rbi +9 -9
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +17 -0
- data/rbi/openai/models/beta/beta_tool.rbi +6 -6
- data/rbi/openai/models/chat/chat_completion_content_part.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_image.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_input_audio.rbi +9 -9
- data/rbi/openai/models/chat/chat_completion_content_part_text.rbi +9 -9
- data/rbi/openai/models/conversations/computer_screenshot_content.rbi +9 -9
- data/rbi/openai/models/decision_create_params.rbi +4 -1
- data/rbi/openai/models/image_edit_params.rbi +49 -24
- data/rbi/openai/models/live/fork_server_event.rbi +65 -1
- data/rbi/openai/models/live/server_event.rbi +65 -1
- data/rbi/openai/models/live/sideband_client_event.rbi +60 -0
- data/rbi/openai/models/live/sideband_server_event.rbi +65 -1
- data/rbi/openai/models/realtime/conversation_item_added.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_created_event.rbi +6 -3
- data/rbi/openai/models/realtime/conversation_item_done.rbi +6 -3
- data/rbi/openai/models/realtime/realtime_response.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_response_create_params.rbi +8 -4
- data/rbi/openai/models/realtime/realtime_server_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_added_event.rbi +6 -3
- data/rbi/openai/models/realtime/response_output_item_done_event.rbi +6 -3
- data/rbi/openai/models/responses/response.rbi +394 -0
- data/rbi/openai/models/responses/response_configuration_update_item.rbi +76 -3
- data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +74 -4
- data/rbi/openai/models/responses/response_input_file.rbi +9 -9
- data/rbi/openai/models/responses/response_input_file_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image.rbi +9 -9
- data/rbi/openai/models/responses/response_input_image_content.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text.rbi +9 -9
- data/rbi/openai/models/responses/response_input_text_content.rbi +9 -9
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +6 -6
- data/rbi/openai/models/responses/responses_client_event.rbi +17 -0
- data/rbi/openai/models/responses/tool.rbi +6 -6
- data/rbi/openai/net_http_client.rbi +5 -0
- data/rbi/openai/resources/admin/organization/external_keys.rbi +86 -0
- data/rbi/openai/resources/admin/organization.rbi +3 -0
- data/rbi/openai/resources/audio/speech.rbi +8 -0
- data/rbi/openai/resources/audio/translations.rbi +6 -0
- data/rbi/openai/resources/beta/agents/sessions.rbi +18 -2
- data/rbi/openai/resources/beta/agents.rbi +15 -0
- data/rbi/openai/resources/images.rbi +34 -16
- data/rbi/openai/resources/responses.rbi +2 -0
- data/realtime.md +6 -0
- data/responses-websocket.md +53 -0
- data/sig/openai/helpers/live/websocket.rbs +1 -9
- data/sig/openai/helpers/realtime/connection.rbs +3 -0
- data/sig/openai/helpers/realtime/transports/async_websocket.rbs +3 -0
- data/sig/openai/helpers/responses_websocket/connection.rbs +7 -1
- data/sig/openai/helpers/structured_output.rbs +9 -0
- data/sig/openai/internal/type/union.rbs +4 -0
- data/sig/openai/models/admin/organization/external_key.rbs +186 -0
- data/sig/openai/models/admin/organization/external_key_create_params.rbs +423 -0
- data/sig/openai/models/admin/organization/external_key_delete_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_list_params.rbs +81 -0
- data/sig/openai/models/admin/organization/external_key_retrieve_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_params.rbs +27 -0
- data/sig/openai/models/admin/organization/external_key_validate_response.rbs +17 -0
- data/sig/openai/models/admin/organization/external_storage_create_params.rbs +72 -2
- data/sig/openai/models/audio/speech_create_params.rbs +15 -2
- data/sig/openai/models/audio/transcription_create_params.rbs +30 -2
- data/sig/openai/models/audio/voice_create_params.rbs +47 -2
- data/sig/openai/models/beta/agent.rbs +54 -2
- data/sig/openai/models/beta/agent_create_params.rbs +54 -0
- data/sig/openai/models/beta/agent_session.rbs +82 -3
- data/sig/openai/models/beta/agent_update_params.rbs +64 -0
- data/sig/openai/models/beta/agents/session_create_params.rbs +91 -0
- data/sig/openai/models/beta/agents/session_list_params.rbs +20 -0
- data/sig/openai/models/beta/agents/session_update_params.rbs +48 -6
- data/sig/openai/models/beta/assistant_create_params.rbs +5 -2
- data/sig/openai/models/beta/beta_response.rbs +223 -0
- data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +58 -2
- data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +58 -2
- data/sig/openai/models/beta/beta_response_input_file.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_image.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text.rbs +9 -9
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_output_item.rbs +9 -9
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +17 -0
- data/sig/openai/models/beta/beta_tool.rbs +4 -4
- data/sig/openai/models/beta/response_create_params.rbs +5 -2
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +11 -5
- data/sig/openai/models/beta/thread_create_params.rbs +11 -5
- data/sig/openai/models/beta/threads/message_create_params.rbs +6 -3
- data/sig/openai/models/beta/threads/run_create_params.rbs +6 -3
- data/sig/openai/models/chat/chat_completion_content_part.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +9 -9
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +9 -9
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +9 -9
- data/sig/openai/models/decision_create_params.rbs +27 -2
- data/sig/openai/models/eval_create_params.rbs +25 -4
- data/sig/openai/models/evals/run_create_params.rbs +52 -8
- data/sig/openai/models/image_edit_params.rbs +47 -16
- data/sig/openai/models/live/fork_server_event.rbs +39 -0
- data/sig/openai/models/live/server_event.rbs +39 -0
- data/sig/openai/models/live/session_accept_params.rbs +39 -2
- data/sig/openai/models/live/sideband_client_event.rbs +32 -0
- data/sig/openai/models/live/sideband_server_event.rbs +39 -0
- data/sig/openai/models/realtime/conversation_item.rbs +1 -0
- data/sig/openai/models/responses/input_token_count_params.rbs +10 -2
- data/sig/openai/models/responses/response.rbs +223 -0
- data/sig/openai/models/responses/response_configuration_update_item.rbs +45 -2
- data/sig/openai/models/responses/response_configuration_update_item_param.rbs +45 -2
- data/sig/openai/models/responses/response_create_params.rbs +5 -2
- data/sig/openai/models/responses/response_input_file.rbs +9 -9
- data/sig/openai/models/responses/response_input_file_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_image.rbs +9 -9
- data/sig/openai/models/responses/response_input_image_content.rbs +6 -6
- data/sig/openai/models/responses/response_input_text.rbs +9 -9
- data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +4 -4
- data/sig/openai/models/responses/responses_client_event.rbs +17 -0
- data/sig/openai/models/responses/tool.rbs +4 -4
- data/sig/openai/models/video_edit_params.rbs +11 -2
- data/sig/openai/models/video_extend_params.rbs +11 -2
- data/sig/openai/net_http_client.rbs +3 -0
- data/sig/openai/resources/admin/organization/external_keys.rbs +70 -0
- data/sig/openai/resources/admin/organization/external_storage.rbs +23 -1
- data/sig/openai/resources/admin/organization.rbs +2 -0
- data/sig/openai/resources/audio/speech.rbs +2 -1
- data/sig/openai/resources/audio/transcriptions.rbs +14 -2
- data/sig/openai/resources/audio/voices.rbs +14 -1
- data/sig/openai/resources/beta/agents/sessions.rbs +4 -0
- data/sig/openai/resources/beta/agents.rbs +4 -0
- data/sig/openai/resources/beta/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/beta/responses.rbs +4 -2
- data/sig/openai/resources/decisions.rbs +7 -1
- data/sig/openai/resources/images.rbs +2 -0
- data/sig/openai/resources/responses/input_tokens.rbs +2 -1
- data/sig/openai/resources/responses.rbs +5 -2
- data/sig/openai/resources/videos.rbs +2 -2
- metadata +25 -1
|
@@ -20,6 +20,23 @@ module OpenAI
|
|
|
20
20
|
sig { returns(String) }
|
|
21
21
|
attr_accessor :agent_id
|
|
22
22
|
|
|
23
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
24
|
+
# object replaces the settings; null or an empty object enables background
|
|
25
|
+
# compaction.
|
|
26
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentUpdateParams::Compaction)) }
|
|
27
|
+
attr_reader :compaction
|
|
28
|
+
|
|
29
|
+
sig { params(compaction: T.nilable(OpenAI::Beta::AgentUpdateParams::Compaction::OrHash)).void }
|
|
30
|
+
attr_writer :compaction
|
|
31
|
+
|
|
32
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
33
|
+
# values.
|
|
34
|
+
sig { returns(T.nilable(OpenAI::Beta::AgentUpdateParams::Experimental)) }
|
|
35
|
+
attr_reader :experimental
|
|
36
|
+
|
|
37
|
+
sig { params(experimental: OpenAI::Beta::AgentUpdateParams::Experimental::OrHash).void }
|
|
38
|
+
attr_writer :experimental
|
|
39
|
+
|
|
23
40
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
24
41
|
# to leave unchanged.
|
|
25
42
|
sig { returns(T.nilable(String)) }
|
|
@@ -94,6 +111,10 @@ module OpenAI
|
|
|
94
111
|
|
|
95
112
|
agent_id: String,
|
|
96
113
|
|
|
114
|
+
compaction: T.nilable(OpenAI::Beta::AgentUpdateParams::Compaction::OrHash),
|
|
115
|
+
|
|
116
|
+
experimental: OpenAI::Beta::AgentUpdateParams::Experimental::OrHash,
|
|
117
|
+
|
|
97
118
|
instructions: T.nilable(String),
|
|
98
119
|
|
|
99
120
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
@@ -132,6 +153,15 @@ module OpenAI
|
|
|
132
153
|
|
|
133
154
|
agent_id:,
|
|
134
155
|
|
|
156
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
157
|
+
# object replaces the settings; null or an empty object enables background
|
|
158
|
+
# compaction.
|
|
159
|
+
compaction: nil,
|
|
160
|
+
|
|
161
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
162
|
+
# values.
|
|
163
|
+
experimental: nil,
|
|
164
|
+
|
|
135
165
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
136
166
|
# to leave unchanged.
|
|
137
167
|
instructions: nil,
|
|
@@ -172,6 +202,8 @@ module OpenAI
|
|
|
172
202
|
override.returns(
|
|
173
203
|
{
|
|
174
204
|
agent_id: String,
|
|
205
|
+
compaction: T.nilable(OpenAI::Beta::AgentUpdateParams::Compaction),
|
|
206
|
+
experimental: OpenAI::Beta::AgentUpdateParams::Experimental,
|
|
175
207
|
instructions: T.nilable(String),
|
|
176
208
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
177
209
|
model: String,
|
|
@@ -200,6 +232,94 @@ module OpenAI
|
|
|
200
232
|
def to_hash
|
|
201
233
|
end
|
|
202
234
|
|
|
235
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
236
|
+
OrHash = T.type_alias do
|
|
237
|
+
T.any(
|
|
238
|
+
OpenAI::Beta::AgentUpdateParams::Compaction,
|
|
239
|
+
OpenAI::Internal::AnyHash
|
|
240
|
+
)
|
|
241
|
+
end
|
|
242
|
+
|
|
243
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
244
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
245
|
+
# token usage.
|
|
246
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
247
|
+
attr_accessor :async
|
|
248
|
+
|
|
249
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
250
|
+
# object replaces the settings; null or an empty object enables background
|
|
251
|
+
# compaction.
|
|
252
|
+
sig do
|
|
253
|
+
params(
|
|
254
|
+
|
|
255
|
+
async: T.nilable(T::Boolean)
|
|
256
|
+
)
|
|
257
|
+
.returns(T.attached_class)
|
|
258
|
+
end
|
|
259
|
+
def self.new(
|
|
260
|
+
|
|
261
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
262
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
263
|
+
# token usage.
|
|
264
|
+
|
|
265
|
+
async: nil
|
|
266
|
+
)
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
sig do
|
|
270
|
+
override.returns(
|
|
271
|
+
{async: T.nilable(T::Boolean)}
|
|
272
|
+
)
|
|
273
|
+
end
|
|
274
|
+
def to_hash
|
|
275
|
+
end
|
|
276
|
+
|
|
277
|
+
end
|
|
278
|
+
|
|
279
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
280
|
+
OrHash = T.type_alias do
|
|
281
|
+
T.any(
|
|
282
|
+
OpenAI::Beta::AgentUpdateParams::Experimental,
|
|
283
|
+
OpenAI::Internal::AnyHash
|
|
284
|
+
)
|
|
285
|
+
end
|
|
286
|
+
|
|
287
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
288
|
+
# current setting.
|
|
289
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
290
|
+
attr_reader :time_awareness
|
|
291
|
+
|
|
292
|
+
sig { params(time_awareness: T::Boolean).void }
|
|
293
|
+
attr_writer :time_awareness
|
|
294
|
+
|
|
295
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
296
|
+
# values.
|
|
297
|
+
sig do
|
|
298
|
+
params(
|
|
299
|
+
|
|
300
|
+
time_awareness: T::Boolean
|
|
301
|
+
)
|
|
302
|
+
.returns(T.attached_class)
|
|
303
|
+
end
|
|
304
|
+
def self.new(
|
|
305
|
+
|
|
306
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
307
|
+
# current setting.
|
|
308
|
+
|
|
309
|
+
time_awareness: nil
|
|
310
|
+
)
|
|
311
|
+
end
|
|
312
|
+
|
|
313
|
+
sig do
|
|
314
|
+
override.returns(
|
|
315
|
+
{time_awareness: T::Boolean}
|
|
316
|
+
)
|
|
317
|
+
end
|
|
318
|
+
def to_hash
|
|
319
|
+
end
|
|
320
|
+
|
|
321
|
+
end
|
|
322
|
+
|
|
203
323
|
# The service tier used for model requests.
|
|
204
324
|
module ServiceTier
|
|
205
325
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -59,6 +59,13 @@ module OpenAI
|
|
|
59
59
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
60
60
|
attr_accessor :metadata
|
|
61
61
|
|
|
62
|
+
# Action review mode. Omit to use none.
|
|
63
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol)) }
|
|
64
|
+
attr_reader :review
|
|
65
|
+
|
|
66
|
+
sig { params(review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol).void }
|
|
67
|
+
attr_writer :review
|
|
68
|
+
|
|
62
69
|
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
63
70
|
# session.
|
|
64
71
|
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl)) }
|
|
@@ -90,6 +97,8 @@ module OpenAI
|
|
|
90
97
|
|
|
91
98
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
92
99
|
|
|
100
|
+
review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
|
|
101
|
+
|
|
93
102
|
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl::OrHash),
|
|
94
103
|
|
|
95
104
|
vault_ids: T.nilable(T::Array[String]),
|
|
@@ -121,6 +130,9 @@ module OpenAI
|
|
|
121
130
|
# characters. Omission or null defaults to an empty map.
|
|
122
131
|
metadata: nil,
|
|
123
132
|
|
|
133
|
+
# Action review mode. Omit to use none.
|
|
134
|
+
review: nil,
|
|
135
|
+
|
|
124
136
|
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
125
137
|
# session.
|
|
126
138
|
spend_control: nil,
|
|
@@ -144,6 +156,7 @@ module OpenAI
|
|
|
144
156
|
agent_id: String,
|
|
145
157
|
input: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Input::Variants),
|
|
146
158
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
159
|
+
review: OpenAI::Beta::Agents::SessionCreateParams::Review::OrSymbol,
|
|
147
160
|
spend_control: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::SpendControl),
|
|
148
161
|
vault_ids: T.nilable(T::Array[String]),
|
|
149
162
|
request_options: OpenAI::RequestOptions
|
|
@@ -161,6 +174,25 @@ module OpenAI
|
|
|
161
174
|
)
|
|
162
175
|
end
|
|
163
176
|
|
|
177
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
178
|
+
# object replaces the settings; null or an empty object enables background
|
|
179
|
+
# compaction.
|
|
180
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction)) }
|
|
181
|
+
attr_reader :compaction
|
|
182
|
+
|
|
183
|
+
sig {
|
|
184
|
+
params(compaction: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction::OrHash)).void
|
|
185
|
+
}
|
|
186
|
+
attr_writer :compaction
|
|
187
|
+
|
|
188
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
189
|
+
# values.
|
|
190
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental)) }
|
|
191
|
+
attr_reader :experimental
|
|
192
|
+
|
|
193
|
+
sig { params(experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental::OrHash).void }
|
|
194
|
+
attr_writer :experimental
|
|
195
|
+
|
|
164
196
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
165
197
|
# to leave unchanged.
|
|
166
198
|
sig { returns(T.nilable(String)) }
|
|
@@ -226,6 +258,10 @@ module OpenAI
|
|
|
226
258
|
sig do
|
|
227
259
|
params(
|
|
228
260
|
|
|
261
|
+
compaction: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction::OrHash),
|
|
262
|
+
|
|
263
|
+
experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental::OrHash,
|
|
264
|
+
|
|
229
265
|
instructions: T.nilable(String),
|
|
230
266
|
|
|
231
267
|
model: String,
|
|
@@ -256,6 +292,15 @@ module OpenAI
|
|
|
256
292
|
end
|
|
257
293
|
def self.new(
|
|
258
294
|
|
|
295
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
296
|
+
# object replaces the settings; null or an empty object enables background
|
|
297
|
+
# compaction.
|
|
298
|
+
compaction: nil,
|
|
299
|
+
|
|
300
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
301
|
+
# values.
|
|
302
|
+
experimental: nil,
|
|
303
|
+
|
|
259
304
|
# Additional instructions appended to the agent's default base instructions. Omit
|
|
260
305
|
# to leave unchanged.
|
|
261
306
|
instructions: nil,
|
|
@@ -287,6 +332,8 @@ module OpenAI
|
|
|
287
332
|
sig do
|
|
288
333
|
override.returns(
|
|
289
334
|
{
|
|
335
|
+
compaction: T.nilable(OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction),
|
|
336
|
+
experimental: OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental,
|
|
290
337
|
instructions: T.nilable(String),
|
|
291
338
|
model: String,
|
|
292
339
|
multi_agent: T.nilable(OpenAI::Beta::MultiAgentConfigParam),
|
|
@@ -312,6 +359,94 @@ module OpenAI
|
|
|
312
359
|
def to_hash
|
|
313
360
|
end
|
|
314
361
|
|
|
362
|
+
class Compaction < OpenAI::Internal::Type::BaseModel
|
|
363
|
+
OrHash = T.type_alias do
|
|
364
|
+
T.any(
|
|
365
|
+
OpenAI::Beta::Agents::SessionCreateParams::Agent::Compaction,
|
|
366
|
+
OpenAI::Internal::AnyHash
|
|
367
|
+
)
|
|
368
|
+
end
|
|
369
|
+
|
|
370
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
371
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
372
|
+
# token usage.
|
|
373
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
374
|
+
attr_accessor :async
|
|
375
|
+
|
|
376
|
+
# Context compaction settings. Omit to keep the current settings. A supplied
|
|
377
|
+
# object replaces the settings; null or an empty object enables background
|
|
378
|
+
# compaction.
|
|
379
|
+
sig do
|
|
380
|
+
params(
|
|
381
|
+
|
|
382
|
+
async: T.nilable(T::Boolean)
|
|
383
|
+
)
|
|
384
|
+
.returns(T.attached_class)
|
|
385
|
+
end
|
|
386
|
+
def self.new(
|
|
387
|
+
|
|
388
|
+
# Whether to compact context in the background. Omission or null defaults to true.
|
|
389
|
+
# Set to false to use blocking compaction. Background compaction may increase
|
|
390
|
+
# token usage.
|
|
391
|
+
|
|
392
|
+
async: nil
|
|
393
|
+
)
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
sig do
|
|
397
|
+
override.returns(
|
|
398
|
+
{async: T.nilable(T::Boolean)}
|
|
399
|
+
)
|
|
400
|
+
end
|
|
401
|
+
def to_hash
|
|
402
|
+
end
|
|
403
|
+
|
|
404
|
+
end
|
|
405
|
+
|
|
406
|
+
class Experimental < OpenAI::Internal::Type::BaseModel
|
|
407
|
+
OrHash = T.type_alias do
|
|
408
|
+
T.any(
|
|
409
|
+
OpenAI::Beta::Agents::SessionCreateParams::Agent::Experimental,
|
|
410
|
+
OpenAI::Internal::AnyHash
|
|
411
|
+
)
|
|
412
|
+
end
|
|
413
|
+
|
|
414
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
415
|
+
# current setting.
|
|
416
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
417
|
+
attr_reader :time_awareness
|
|
418
|
+
|
|
419
|
+
sig { params(time_awareness: T::Boolean).void }
|
|
420
|
+
attr_writer :time_awareness
|
|
421
|
+
|
|
422
|
+
# Experimental settings to merge by key. Omitted settings keep their current
|
|
423
|
+
# values.
|
|
424
|
+
sig do
|
|
425
|
+
params(
|
|
426
|
+
|
|
427
|
+
time_awareness: T::Boolean
|
|
428
|
+
)
|
|
429
|
+
.returns(T.attached_class)
|
|
430
|
+
end
|
|
431
|
+
def self.new(
|
|
432
|
+
|
|
433
|
+
# Whether to give the model periodic current-time reminders. Omit to keep the
|
|
434
|
+
# current setting.
|
|
435
|
+
|
|
436
|
+
time_awareness: nil
|
|
437
|
+
)
|
|
438
|
+
end
|
|
439
|
+
|
|
440
|
+
sig do
|
|
441
|
+
override.returns(
|
|
442
|
+
{time_awareness: T::Boolean}
|
|
443
|
+
)
|
|
444
|
+
end
|
|
445
|
+
def to_hash
|
|
446
|
+
end
|
|
447
|
+
|
|
448
|
+
end
|
|
449
|
+
|
|
315
450
|
# The service tier used for model requests.
|
|
316
451
|
module ServiceTier
|
|
317
452
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -367,6 +502,24 @@ module OpenAI
|
|
|
367
502
|
|
|
368
503
|
end
|
|
369
504
|
|
|
505
|
+
# Action review mode. Omit to use none.
|
|
506
|
+
module Review
|
|
507
|
+
extend OpenAI::Internal::Type::Enum
|
|
508
|
+
|
|
509
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Agents::SessionCreateParams::Review) }
|
|
510
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
511
|
+
|
|
512
|
+
# Keep the existing execution behavior without automatic action review.
|
|
513
|
+
NONE = T.let(:none, OpenAI::Beta::Agents::SessionCreateParams::Review::TaggedSymbol)
|
|
514
|
+
|
|
515
|
+
# Review eligible actions automatically. Deny manual approval fallbacks.
|
|
516
|
+
AUTO_REVIEW = T.let(:auto_review, OpenAI::Beta::Agents::SessionCreateParams::Review::TaggedSymbol)
|
|
517
|
+
|
|
518
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::SessionCreateParams::Review::TaggedSymbol]) }
|
|
519
|
+
def self.values
|
|
520
|
+
end
|
|
521
|
+
end
|
|
522
|
+
|
|
370
523
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
371
524
|
OrHash = T.type_alias do
|
|
372
525
|
T.any(
|
|
@@ -41,6 +41,16 @@ module OpenAI
|
|
|
41
41
|
sig { params(limit: Integer).void }
|
|
42
42
|
attr_writer :limit
|
|
43
43
|
|
|
44
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
45
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
46
|
+
# characters. New sessions and metadata updates may take time to appear in
|
|
47
|
+
# filtered results.
|
|
48
|
+
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
49
|
+
attr_reader :metadata
|
|
50
|
+
|
|
51
|
+
sig { params(metadata: T::Hash[Symbol, String]).void }
|
|
52
|
+
attr_writer :metadata
|
|
53
|
+
|
|
44
54
|
# The order in which resources are returned. Defaults to `desc`.
|
|
45
55
|
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionListParams::Order::OrSymbol)) }
|
|
46
56
|
attr_reader :order
|
|
@@ -57,6 +67,8 @@ module OpenAI
|
|
|
57
67
|
|
|
58
68
|
limit: Integer,
|
|
59
69
|
|
|
70
|
+
metadata: T::Hash[Symbol, String],
|
|
71
|
+
|
|
60
72
|
order: OpenAI::Beta::Agents::SessionListParams::Order::OrSymbol,
|
|
61
73
|
|
|
62
74
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -75,6 +87,12 @@ module OpenAI
|
|
|
75
87
|
# The maximum number of resources to return, between 1 and 100. Defaults to 20.
|
|
76
88
|
limit: nil,
|
|
77
89
|
|
|
90
|
+
# Exact string matches supplied as `metadata[key]=value`. All supplied pairs must
|
|
91
|
+
# match. Up to 16 pairs, with keys from 1 to 64 characters and values up to 512
|
|
92
|
+
# characters. New sessions and metadata updates may take time to appear in
|
|
93
|
+
# filtered results.
|
|
94
|
+
metadata: nil,
|
|
95
|
+
|
|
78
96
|
# The order in which resources are returned. Defaults to `desc`.
|
|
79
97
|
order: nil,
|
|
80
98
|
|
|
@@ -88,6 +106,7 @@ module OpenAI
|
|
|
88
106
|
after: String,
|
|
89
107
|
agent_id: String,
|
|
90
108
|
limit: Integer,
|
|
109
|
+
metadata: T::Hash[Symbol, String],
|
|
91
110
|
order: OpenAI::Beta::Agents::SessionListParams::Order::OrSymbol,
|
|
92
111
|
request_options: OpenAI::RequestOptions
|
|
93
112
|
}
|
|
@@ -22,7 +22,7 @@ module OpenAI
|
|
|
22
22
|
sig { returns(String) }
|
|
23
23
|
attr_accessor :session_id
|
|
24
24
|
|
|
25
|
-
#
|
|
25
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
26
26
|
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent)) }
|
|
27
27
|
attr_reader :agent
|
|
28
28
|
|
|
@@ -35,6 +35,14 @@ module OpenAI
|
|
|
35
35
|
sig { returns(T.nilable(T::Hash[Symbol, String])) }
|
|
36
36
|
attr_accessor :metadata
|
|
37
37
|
|
|
38
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
39
|
+
# keep their review mode.
|
|
40
|
+
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol)) }
|
|
41
|
+
attr_reader :review
|
|
42
|
+
|
|
43
|
+
sig { params(review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol).void }
|
|
44
|
+
attr_writer :review
|
|
45
|
+
|
|
38
46
|
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
39
47
|
# spend.
|
|
40
48
|
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl)) }
|
|
@@ -54,6 +62,8 @@ module OpenAI
|
|
|
54
62
|
|
|
55
63
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
56
64
|
|
|
65
|
+
review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
|
|
66
|
+
|
|
57
67
|
spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl::OrHash),
|
|
58
68
|
|
|
59
69
|
request_options: OpenAI::RequestOptions::OrHash
|
|
@@ -64,7 +74,7 @@ module OpenAI
|
|
|
64
74
|
|
|
65
75
|
session_id:,
|
|
66
76
|
|
|
67
|
-
#
|
|
77
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
68
78
|
agent: nil,
|
|
69
79
|
|
|
70
80
|
# Replaces all metadata. Omit to leave unchanged, or pass null or {} to clear it.
|
|
@@ -72,6 +82,10 @@ module OpenAI
|
|
|
72
82
|
# characters.
|
|
73
83
|
metadata: nil,
|
|
74
84
|
|
|
85
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
86
|
+
# keep their review mode.
|
|
87
|
+
review: nil,
|
|
88
|
+
|
|
75
89
|
# Omit to retain the limit; null or a null limit removes it without resetting
|
|
76
90
|
# spend.
|
|
77
91
|
spend_control: nil,
|
|
@@ -86,6 +100,7 @@ module OpenAI
|
|
|
86
100
|
session_id: String,
|
|
87
101
|
agent: OpenAI::Beta::Agents::SessionUpdateParams::Agent,
|
|
88
102
|
metadata: T.nilable(T::Hash[Symbol, String]),
|
|
103
|
+
review: OpenAI::Beta::Agents::SessionUpdateParams::Review::OrSymbol,
|
|
89
104
|
spend_control: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::SpendControl),
|
|
90
105
|
request_options: OpenAI::RequestOptions
|
|
91
106
|
}
|
|
@@ -120,7 +135,29 @@ module OpenAI
|
|
|
120
135
|
sig { returns(T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::OrSymbol)) }
|
|
121
136
|
attr_accessor :service_tier
|
|
122
137
|
|
|
123
|
-
#
|
|
138
|
+
# Replaces the session tools. Functions and MCP servers change on the next model
|
|
139
|
+
# call. Built-in tools change by the next turn. Omit to keep the current tools, or
|
|
140
|
+
# pass null or an empty array to clear them.
|
|
141
|
+
sig {
|
|
142
|
+
returns(
|
|
143
|
+
T.nilable(
|
|
144
|
+
T::Array[
|
|
145
|
+
T.any(
|
|
146
|
+
OpenAI::Beta::AgentToolParam::Function,
|
|
147
|
+
OpenAI::Beta::AgentToolParam::ToolSearch,
|
|
148
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling,
|
|
149
|
+
OpenAI::Beta::AgentToolParam::Mcp,
|
|
150
|
+
OpenAI::Beta::AgentToolParam::WebSearch,
|
|
151
|
+
OpenAI::Beta::AgentToolParam::ComputerUse,
|
|
152
|
+
OpenAI::Beta::AgentToolParam::Automations
|
|
153
|
+
)
|
|
154
|
+
]
|
|
155
|
+
)
|
|
156
|
+
)
|
|
157
|
+
}
|
|
158
|
+
attr_accessor :tools
|
|
159
|
+
|
|
160
|
+
# Agent settings to update on this session. Omitted fields stay unchanged.
|
|
124
161
|
sig do
|
|
125
162
|
params(
|
|
126
163
|
|
|
@@ -128,7 +165,21 @@ module OpenAI
|
|
|
128
165
|
|
|
129
166
|
reasoning: OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning::OrHash,
|
|
130
167
|
|
|
131
|
-
service_tier: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::OrSymbol)
|
|
168
|
+
service_tier: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::OrSymbol),
|
|
169
|
+
|
|
170
|
+
tools: T.nilable(
|
|
171
|
+
T::Array[
|
|
172
|
+
T.any(
|
|
173
|
+
OpenAI::Beta::AgentToolParam::Function::OrHash,
|
|
174
|
+
OpenAI::Beta::AgentToolParam::ToolSearch::OrHash,
|
|
175
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling::OrHash,
|
|
176
|
+
OpenAI::Beta::AgentToolParam::Mcp::OrHash,
|
|
177
|
+
OpenAI::Beta::AgentToolParam::WebSearch::OrHash,
|
|
178
|
+
OpenAI::Beta::AgentToolParam::ComputerUse::OrHash,
|
|
179
|
+
OpenAI::Beta::AgentToolParam::Automations::OrHash
|
|
180
|
+
)
|
|
181
|
+
]
|
|
182
|
+
)
|
|
132
183
|
)
|
|
133
184
|
.returns(T.attached_class)
|
|
134
185
|
end
|
|
@@ -141,8 +192,13 @@ module OpenAI
|
|
|
141
192
|
reasoning: nil,
|
|
142
193
|
|
|
143
194
|
# Omit to keep the current tier. Null resets it to auto.
|
|
195
|
+
service_tier: nil,
|
|
196
|
+
|
|
197
|
+
# Replaces the session tools. Functions and MCP servers change on the next model
|
|
198
|
+
# call. Built-in tools change by the next turn. Omit to keep the current tools, or
|
|
199
|
+
# pass null or an empty array to clear them.
|
|
144
200
|
|
|
145
|
-
|
|
201
|
+
tools: nil
|
|
146
202
|
)
|
|
147
203
|
end
|
|
148
204
|
|
|
@@ -151,7 +207,20 @@ module OpenAI
|
|
|
151
207
|
{
|
|
152
208
|
model: String,
|
|
153
209
|
reasoning: OpenAI::Beta::Agents::SessionUpdateParams::Agent::Reasoning,
|
|
154
|
-
service_tier: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::OrSymbol)
|
|
210
|
+
service_tier: T.nilable(OpenAI::Beta::Agents::SessionUpdateParams::Agent::ServiceTier::OrSymbol),
|
|
211
|
+
tools: T.nilable(
|
|
212
|
+
T::Array[
|
|
213
|
+
T.any(
|
|
214
|
+
OpenAI::Beta::AgentToolParam::Function,
|
|
215
|
+
OpenAI::Beta::AgentToolParam::ToolSearch,
|
|
216
|
+
OpenAI::Beta::AgentToolParam::ProgrammaticToolCalling,
|
|
217
|
+
OpenAI::Beta::AgentToolParam::Mcp,
|
|
218
|
+
OpenAI::Beta::AgentToolParam::WebSearch,
|
|
219
|
+
OpenAI::Beta::AgentToolParam::ComputerUse,
|
|
220
|
+
OpenAI::Beta::AgentToolParam::Automations
|
|
221
|
+
)
|
|
222
|
+
]
|
|
223
|
+
)
|
|
155
224
|
}
|
|
156
225
|
)
|
|
157
226
|
end
|
|
@@ -262,6 +331,25 @@ module OpenAI
|
|
|
262
331
|
end
|
|
263
332
|
end
|
|
264
333
|
|
|
334
|
+
# Default action review for new root turns. Existing turns and their subagents
|
|
335
|
+
# keep their review mode.
|
|
336
|
+
module Review
|
|
337
|
+
extend OpenAI::Internal::Type::Enum
|
|
338
|
+
|
|
339
|
+
TaggedSymbol = T.type_alias { T.all(Symbol, OpenAI::Beta::Agents::SessionUpdateParams::Review) }
|
|
340
|
+
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
341
|
+
|
|
342
|
+
# Keep the existing execution behavior without automatic action review.
|
|
343
|
+
NONE = T.let(:none, OpenAI::Beta::Agents::SessionUpdateParams::Review::TaggedSymbol)
|
|
344
|
+
|
|
345
|
+
# Review eligible actions automatically. Deny manual approval fallbacks.
|
|
346
|
+
AUTO_REVIEW = T.let(:auto_review, OpenAI::Beta::Agents::SessionUpdateParams::Review::TaggedSymbol)
|
|
347
|
+
|
|
348
|
+
sig { override.returns(T::Array[OpenAI::Beta::Agents::SessionUpdateParams::Review::TaggedSymbol]) }
|
|
349
|
+
def self.values
|
|
350
|
+
end
|
|
351
|
+
end
|
|
352
|
+
|
|
265
353
|
class SpendControl < OpenAI::Internal::Type::BaseModel
|
|
266
354
|
OrHash = T.type_alias do
|
|
267
355
|
T.any(
|