openai 0.122.0 → 0.124.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 +24 -0
- data/README.md +1 -1
- data/lib/openai/models/admin/organization/audit_log_list_response.rb +10 -1
- data/lib/openai/models/admin/organization/external_key.rb +25 -1
- data/lib/openai/models/admin/organization/external_key_create_params.rb +78 -3
- data/lib/openai/models/beta/agent_output_command_execution_output_delta_event.rb +10 -1
- data/lib/openai/models/beta/agent_session.rb +128 -4
- data/lib/openai/models/beta/agent_session_created_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_connected_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_disconnected_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_expired_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_failed_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_pending_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_ready_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_reset_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_environment_suspended_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_error_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_failed_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_idle_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_in_progress_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_input_param.rb +87 -1
- data/lib/openai/models/beta/agent_session_requires_action_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_subagent_active_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_subagent_closed_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_subagent_created_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_cancelled_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_completed_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_content_part_added_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_content_part_done_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_created_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_failed_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_in_progress_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_item_added_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_item_done_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_output_text_delta_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_output_text_done_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_reasoning_summary_part_added_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_reasoning_summary_text_delta_event.rb +10 -1
- data/lib/openai/models/beta/agent_session_turn_reasoning_summary_text_done_event.rb +10 -1
- data/lib/openai/models/beta/agents/session_create_params.rb +69 -1
- data/lib/openai/models/beta/agents/session_update_params.rb +44 -1
- data/lib/openai/models/beta/agents/sessions/event_create_params.rb +2 -2
- data/lib/openai/models/beta/agents/sessions/event_stream_params.rb +13 -1
- data/lib/openai/models/beta/agents/sessions/turn.rb +41 -1
- data/lib/openai/models/beta/beta_response.rb +69 -4
- data/lib/openai/models/beta/beta_response_tool_search_output_item_param.rb +6 -3
- data/lib/openai/models/beta/beta_responses_client_event.rb +9 -3
- data/lib/openai/models/beta/beta_tool.rb +6 -3
- data/lib/openai/models/beta/response_compact_params.rb +2 -0
- data/lib/openai/models/beta/response_create_params.rb +9 -3
- data/lib/openai/models/beta/responses/input_token_count_params.rb +27 -15
- data/lib/openai/models/content_provenance_check_create_params.rb +2 -0
- data/lib/openai/models/image_edit_params.rb +84 -5
- data/lib/openai/models/image_generate_params.rb +4 -4
- data/lib/openai/models/images_response.rb +9 -12
- data/lib/openai/models/live/media_session_config.rb +12 -1
- data/lib/openai/models/live/session_accept_params.rb +12 -1
- data/lib/openai/models/responses/input_token_count_params.rb +27 -15
- data/lib/openai/models/responses/response.rb +69 -4
- data/lib/openai/models/responses/response_compact_params.rb +2 -0
- data/lib/openai/models/responses/response_create_params.rb +9 -3
- data/lib/openai/models/responses/response_tool_search_output_item_param.rb +6 -3
- data/lib/openai/models/responses/responses_client_event.rb +9 -3
- data/lib/openai/models/responses/tool.rb +6 -3
- data/lib/openai/models/video_create_error.rb +6 -4
- data/lib/openai/models/webhooks/agent_session_action_required_webhook_event.rb +1 -0
- data/lib/openai/models/webhooks/live_transport_connected_webhook_event.rb +74 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +4 -1
- data/lib/openai/resources/admin/organization/external_keys.rb +1 -1
- data/lib/openai/resources/beta/agents/sessions/events.rb +10 -3
- data/lib/openai/resources/beta/agents/sessions.rb +24 -5
- data/lib/openai/resources/beta/responses/input_tokens.rb +9 -6
- data/lib/openai/resources/beta/responses.rb +6 -2
- data/lib/openai/resources/content_provenance_checks.rb +1 -0
- data/lib/openai/resources/images.rb +20 -6
- data/lib/openai/resources/responses/input_tokens.rb +9 -5
- data/lib/openai/resources/responses.rb +6 -2
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +1 -0
- data/rbi/openai/models/admin/organization/audit_log_list_response.rbi +13 -1
- data/rbi/openai/models/admin/organization/external_key.rbi +44 -0
- data/rbi/openai/models/admin/organization/external_key_create_params.rbi +137 -4
- data/rbi/openai/models/beta/agent_output_command_execution_output_delta_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session.rbi +207 -0
- data/rbi/openai/models/beta/agent_session_created_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_environment_connected_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_disconnected_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_expired_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_failed_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_pending_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_ready_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_reset_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_environment_suspended_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_error_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_failed_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_idle_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_in_progress_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_input_param.rbi +159 -0
- data/rbi/openai/models/beta/agent_session_requires_action_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_subagent_active_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_subagent_closed_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_subagent_created_event.rbi +13 -1
- data/rbi/openai/models/beta/agent_session_turn_cancelled_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_completed_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_content_part_added_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_content_part_done_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_created_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_failed_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_in_progress_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_item_added_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_item_done_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_output_text_delta_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_output_text_done_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_reasoning_summary_part_added_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_reasoning_summary_text_delta_event.rbi +14 -1
- data/rbi/openai/models/beta/agent_session_turn_reasoning_summary_text_done_event.rbi +14 -1
- data/rbi/openai/models/beta/agents/session_create_params.rbi +138 -0
- data/rbi/openai/models/beta/agents/session_update_params.rbi +82 -0
- data/rbi/openai/models/beta/agents/sessions/event_create_params.rbi +3 -0
- data/rbi/openai/models/beta/agents/sessions/event_stream_params.rbi +15 -1
- data/rbi/openai/models/beta/agents/sessions/turn.rbi +74 -1
- data/rbi/openai/models/beta/beta_response.rbi +112 -3
- data/rbi/openai/models/beta/beta_response_tool_search_output_item_param.rbi +6 -3
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +9 -3
- data/rbi/openai/models/beta/beta_tool.rbi +6 -3
- data/rbi/openai/models/beta/response_create_params.rbi +9 -3
- data/rbi/openai/models/beta/responses/input_token_count_params.rbi +27 -15
- data/rbi/openai/models/content_provenance_check_create_params.rbi +2 -0
- data/rbi/openai/models/image_edit_params.rbi +143 -4
- data/rbi/openai/models/image_generate_params.rbi +4 -4
- data/rbi/openai/models/images_response.rbi +9 -12
- data/rbi/openai/models/live/media_session_config.rbi +12 -0
- data/rbi/openai/models/live/session_accept_params.rbi +12 -0
- data/rbi/openai/models/responses/input_token_count_params.rbi +27 -15
- data/rbi/openai/models/responses/response.rbi +115 -3
- data/rbi/openai/models/responses/response_create_params.rbi +9 -3
- data/rbi/openai/models/responses/response_tool_search_output_item_param.rbi +6 -3
- data/rbi/openai/models/responses/responses_client_event.rbi +9 -3
- data/rbi/openai/models/responses/tool.rbi +6 -3
- data/rbi/openai/models/video_create_error.rbi +6 -4
- data/rbi/openai/models/webhooks/agent_session_action_required_webhook_event.rbi +4 -0
- data/rbi/openai/models/webhooks/live_transport_connected_webhook_event.rbi +135 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +1 -0
- data/rbi/openai/resources/admin/organization/external_keys.rbi +2 -1
- data/rbi/openai/resources/beta/agents/sessions/events.rbi +9 -2
- data/rbi/openai/resources/beta/agents/sessions.rbi +21 -2
- data/rbi/openai/resources/beta/responses/input_tokens.rbi +9 -6
- data/rbi/openai/resources/beta/responses.rbi +6 -2
- data/rbi/openai/resources/content_provenance_checks.rbi +1 -0
- data/rbi/openai/resources/images.rbi +18 -4
- data/rbi/openai/resources/responses/input_tokens.rbi +9 -5
- data/rbi/openai/resources/responses.rbi +6 -2
- data/rbi/openai/resources/webhooks.rbi +1 -0
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +18 -3
- data/sig/openai/models/admin/organization/external_key.rbs +28 -0
- data/sig/openai/models/admin/organization/external_key_create_params.rbs +108 -0
- data/sig/openai/models/beta/agent_output_command_execution_output_delta_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session.rbs +126 -1
- data/sig/openai/models/beta/agent_session_created_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_connected_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_disconnected_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_expired_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_failed_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_pending_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_ready_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_reset_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_environment_suspended_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_error_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_failed_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_idle_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_in_progress_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_input_param.rbs +80 -1
- data/sig/openai/models/beta/agent_session_requires_action_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_subagent_active_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_subagent_closed_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_subagent_created_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_cancelled_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_completed_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_content_part_added_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_content_part_done_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_created_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_failed_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_in_progress_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_item_added_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_item_done_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_output_text_delta_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_output_text_done_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_added_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_reasoning_summary_part_done_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_reasoning_summary_text_delta_event.rbs +13 -2
- data/sig/openai/models/beta/agent_session_turn_reasoning_summary_text_done_event.rbs +13 -2
- data/sig/openai/models/beta/agents/session_create_params.rbs +78 -0
- data/sig/openai/models/beta/agents/session_update_params.rbs +46 -0
- data/sig/openai/models/beta/agents/sessions/event_stream_params.rbs +18 -1
- data/sig/openai/models/beta/agents/sessions/turn.rbs +40 -2
- data/sig/openai/models/beta/beta_response.rbs +73 -2
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +6 -3
- data/sig/openai/models/beta/beta_responses_client_event.rbs +6 -2
- data/sig/openai/models/beta/beta_tool.rbs +6 -3
- data/sig/openai/models/beta/response_create_params.rbs +6 -2
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +27 -15
- data/sig/openai/models/content_provenance_check_create_params.rbs +2 -0
- data/sig/openai/models/image_edit_params.rbs +87 -4
- data/sig/openai/models/image_generate_params.rbs +4 -4
- data/sig/openai/models/images_response.rbs +9 -12
- data/sig/openai/models/live/media_session_config.rbs +10 -0
- data/sig/openai/models/live/session_accept_params.rbs +10 -0
- data/sig/openai/models/responses/input_token_count_params.rbs +27 -15
- data/sig/openai/models/responses/response.rbs +73 -2
- data/sig/openai/models/responses/response_create_params.rbs +6 -2
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +6 -3
- data/sig/openai/models/responses/responses_client_event.rbs +6 -2
- data/sig/openai/models/responses/tool.rbs +6 -3
- data/sig/openai/models/video_create_error.rbs +9 -6
- data/sig/openai/models/webhooks/agent_session_action_required_webhook_event.rbs +2 -0
- data/sig/openai/models/webhooks/live_transport_connected_webhook_event.rbs +66 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +1 -0
- data/sig/openai/resources/admin/organization/external_keys.rbs +9 -0
- data/sig/openai/resources/beta/agents/sessions/events.rbs +1 -0
- data/sig/openai/resources/beta/agents/sessions.rbs +5 -0
- data/sig/openai/resources/images.rbs +2 -0
- data/sig/openai/resources/webhooks.rbs +1 -0
- metadata +4 -1
|
@@ -53,7 +53,13 @@ module OpenAI
|
|
|
53
53
|
# @return [Symbol, :"agent.session.turn.reasoning_summary_part.added"]
|
|
54
54
|
required :type, const: :"agent.session.turn.reasoning_summary_part.added"
|
|
55
55
|
|
|
56
|
-
# @!
|
|
56
|
+
# @!attribute obfuscation
|
|
57
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
58
|
+
#
|
|
59
|
+
# @return [String, nil]
|
|
60
|
+
optional :obfuscation, String
|
|
61
|
+
|
|
62
|
+
# @!method initialize(event_id:, item_id:, output_index:, part:, session_id:, summary_index:, turn_id:, obfuscation: nil, type: :"agent.session.turn.reasoning_summary_part.added")
|
|
57
63
|
# Emitted when a reasoning summary content part is added.
|
|
58
64
|
#
|
|
59
65
|
# @param event_id [String]
|
|
@@ -77,6 +83,9 @@ module OpenAI
|
|
|
77
83
|
# @param turn_id [String, nil]
|
|
78
84
|
# The ID of the turn associated with the event, when applicable.
|
|
79
85
|
#
|
|
86
|
+
# @param obfuscation [String]
|
|
87
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
88
|
+
#
|
|
80
89
|
# @param type [Symbol, :"agent.session.turn.reasoning_summary_part.added"]
|
|
81
90
|
# The type of the object. Always
|
|
82
91
|
# `agent.session.turn.reasoning_summary_part.added`.
|
|
@@ -58,7 +58,13 @@ module OpenAI
|
|
|
58
58
|
# @return [Symbol, :"agent.session.turn.reasoning_summary_part.done"]
|
|
59
59
|
required :type, const: :"agent.session.turn.reasoning_summary_part.done"
|
|
60
60
|
|
|
61
|
-
# @!
|
|
61
|
+
# @!attribute obfuscation
|
|
62
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
63
|
+
#
|
|
64
|
+
# @return [String, nil]
|
|
65
|
+
optional :obfuscation, String
|
|
66
|
+
|
|
67
|
+
# @!method initialize(event_id:, item_id:, output_index:, part:, session_id:, summary_index:, turn_id:, obfuscation: nil, status: :incomplete, type: :"agent.session.turn.reasoning_summary_part.done")
|
|
62
68
|
# Emitted when a reasoning summary part is complete.
|
|
63
69
|
#
|
|
64
70
|
# @param event_id [String]
|
|
@@ -82,6 +88,9 @@ module OpenAI
|
|
|
82
88
|
# @param turn_id [String, nil]
|
|
83
89
|
# The ID of the turn associated with the event, when applicable.
|
|
84
90
|
#
|
|
91
|
+
# @param obfuscation [String]
|
|
92
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
93
|
+
#
|
|
85
94
|
# @param status [Symbol, :incomplete, nil]
|
|
86
95
|
# Present as `incomplete` when summary generation was interrupted.
|
|
87
96
|
#
|
|
@@ -53,7 +53,13 @@ module OpenAI
|
|
|
53
53
|
# @return [Symbol, :"agent.session.turn.reasoning_summary_text.delta"]
|
|
54
54
|
required :type, const: :"agent.session.turn.reasoning_summary_text.delta"
|
|
55
55
|
|
|
56
|
-
# @!
|
|
56
|
+
# @!attribute obfuscation
|
|
57
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
58
|
+
#
|
|
59
|
+
# @return [String, nil]
|
|
60
|
+
optional :obfuscation, String
|
|
61
|
+
|
|
62
|
+
# @!method initialize(delta:, event_id:, item_id:, output_index:, session_id:, summary_index:, turn_id:, obfuscation: nil, type: :"agent.session.turn.reasoning_summary_text.delta")
|
|
57
63
|
# Emitted when text is appended to a reasoning summary.
|
|
58
64
|
#
|
|
59
65
|
# @param delta [String]
|
|
@@ -77,6 +83,9 @@ module OpenAI
|
|
|
77
83
|
# @param turn_id [String, nil]
|
|
78
84
|
# The ID of the turn associated with the event, when applicable.
|
|
79
85
|
#
|
|
86
|
+
# @param obfuscation [String]
|
|
87
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
88
|
+
#
|
|
80
89
|
# @param type [Symbol, :"agent.session.turn.reasoning_summary_text.delta"]
|
|
81
90
|
# The type of the object. Always
|
|
82
91
|
# `agent.session.turn.reasoning_summary_text.delta`.
|
|
@@ -52,7 +52,13 @@ module OpenAI
|
|
|
52
52
|
# @return [Symbol, :"agent.session.turn.reasoning_summary_text.done"]
|
|
53
53
|
required :type, const: :"agent.session.turn.reasoning_summary_text.done"
|
|
54
54
|
|
|
55
|
-
# @!
|
|
55
|
+
# @!attribute obfuscation
|
|
56
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
57
|
+
#
|
|
58
|
+
# @return [String, nil]
|
|
59
|
+
optional :obfuscation, String
|
|
60
|
+
|
|
61
|
+
# @!method initialize(event_id:, item_id:, output_index:, session_id:, summary_index:, text:, turn_id:, obfuscation: nil, type: :"agent.session.turn.reasoning_summary_text.done")
|
|
56
62
|
# Emitted when a reasoning summary content part is complete.
|
|
57
63
|
#
|
|
58
64
|
# @param event_id [String]
|
|
@@ -76,6 +82,9 @@ module OpenAI
|
|
|
76
82
|
# @param turn_id [String, nil]
|
|
77
83
|
# The ID of the turn associated with the event, when applicable.
|
|
78
84
|
#
|
|
85
|
+
# @param obfuscation [String]
|
|
86
|
+
# Random alphanumeric padding. Present when stream obfuscation is enabled.
|
|
87
|
+
#
|
|
79
88
|
# @param type [Symbol, :"agent.session.turn.reasoning_summary_text.done"]
|
|
80
89
|
# The type of the object. Always `agent.session.turn.reasoning_summary_text.done`.
|
|
81
90
|
end
|
|
@@ -47,6 +47,17 @@ module OpenAI
|
|
|
47
47
|
# @return [Hash{Symbol=>String}, nil]
|
|
48
48
|
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
49
49
|
|
|
50
|
+
# @!attribute prompt_cache_options
|
|
51
|
+
# Default prompt cache lifetime for turns in this session. Omit to use the model
|
|
52
|
+
# default.
|
|
53
|
+
#
|
|
54
|
+
# @return [OpenAI::Models::Beta::Agents::SessionCreateParams::PromptCacheOptions, nil]
|
|
55
|
+
optional(
|
|
56
|
+
:prompt_cache_options,
|
|
57
|
+
-> { OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions },
|
|
58
|
+
nil?: true
|
|
59
|
+
)
|
|
60
|
+
|
|
50
61
|
# @!attribute review
|
|
51
62
|
# Action review mode. Omit to use none.
|
|
52
63
|
#
|
|
@@ -66,13 +77,19 @@ module OpenAI
|
|
|
66
77
|
nil?: true
|
|
67
78
|
)
|
|
68
79
|
|
|
80
|
+
# @!attribute stream_options
|
|
81
|
+
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
82
|
+
#
|
|
83
|
+
# @return [OpenAI::Models::Beta::Agents::SessionCreateParams::StreamOptions, nil]
|
|
84
|
+
optional :stream_options, -> { OpenAI::Beta::Agents::SessionCreateParams::StreamOptions }
|
|
85
|
+
|
|
69
86
|
# @!attribute vault_ids
|
|
70
87
|
# The IDs of vaults made available to the session.
|
|
71
88
|
#
|
|
72
89
|
# @return [Array<String>, nil]
|
|
73
90
|
optional :vault_ids, OpenAI::Internal::Type::ArrayOf[String], nil?: true
|
|
74
91
|
|
|
75
|
-
# @!method initialize(environment:, agent: nil, agent_id: nil, input: nil, metadata: nil, review: nil, spend_control: nil, vault_ids: nil, request_options: {})
|
|
92
|
+
# @!method initialize(environment:, agent: nil, agent_id: nil, input: nil, metadata: nil, prompt_cache_options: nil, review: nil, spend_control: nil, stream_options: nil, vault_ids: nil, request_options: {})
|
|
76
93
|
# @param environment [OpenAI::Models::Beta::EnvironmentParam::None, OpenAI::Models::Beta::EnvironmentParam::OpenAIHosted, OpenAI::Models::Beta::EnvironmentParam::SelfHosted]
|
|
77
94
|
# An inline execution environment or a reference to an environment template.
|
|
78
95
|
#
|
|
@@ -94,6 +111,10 @@ module OpenAI
|
|
|
94
111
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
95
112
|
# characters. Omission or null defaults to an empty map.
|
|
96
113
|
#
|
|
114
|
+
# @param prompt_cache_options [OpenAI::Models::Beta::Agents::SessionCreateParams::PromptCacheOptions, nil]
|
|
115
|
+
# Default prompt cache lifetime for turns in this session. Omit to use the model
|
|
116
|
+
# default.
|
|
117
|
+
#
|
|
97
118
|
# @param review [Symbol, OpenAI::Models::Beta::Agents::SessionCreateParams::Review]
|
|
98
119
|
# Action review mode. Omit to use none.
|
|
99
120
|
#
|
|
@@ -101,6 +122,9 @@ module OpenAI
|
|
|
101
122
|
# Optional spending limit in USD cents. Omission or null creates an unlimited
|
|
102
123
|
# session.
|
|
103
124
|
#
|
|
125
|
+
# @param stream_options [OpenAI::Models::Beta::Agents::SessionCreateParams::StreamOptions]
|
|
126
|
+
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
127
|
+
#
|
|
104
128
|
# @param vault_ids [Array<String>, nil]
|
|
105
129
|
# The IDs of vaults made available to the session.
|
|
106
130
|
#
|
|
@@ -310,6 +334,34 @@ module OpenAI
|
|
|
310
334
|
]
|
|
311
335
|
end
|
|
312
336
|
|
|
337
|
+
class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
|
|
338
|
+
# @!attribute ttl
|
|
339
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
340
|
+
#
|
|
341
|
+
# @return [Symbol, OpenAI::Models::Beta::Agents::SessionCreateParams::PromptCacheOptions::Ttl, nil]
|
|
342
|
+
optional :ttl, enum: -> { OpenAI::Beta::Agents::SessionCreateParams::PromptCacheOptions::Ttl }
|
|
343
|
+
|
|
344
|
+
# @!method initialize(ttl: nil)
|
|
345
|
+
# Default prompt cache lifetime for turns in this session. Omit to use the model
|
|
346
|
+
# default.
|
|
347
|
+
#
|
|
348
|
+
# @param ttl [Symbol, OpenAI::Models::Beta::Agents::SessionCreateParams::PromptCacheOptions::Ttl]
|
|
349
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
350
|
+
|
|
351
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
352
|
+
#
|
|
353
|
+
# @see OpenAI::Models::Beta::Agents::SessionCreateParams::PromptCacheOptions#ttl
|
|
354
|
+
module Ttl
|
|
355
|
+
extend OpenAI::Internal::Type::Enum
|
|
356
|
+
|
|
357
|
+
TTL_30M = :"30m"
|
|
358
|
+
TTL_12H = :"12h"
|
|
359
|
+
|
|
360
|
+
# @!method self.values
|
|
361
|
+
# @return [Array<Symbol>]
|
|
362
|
+
end
|
|
363
|
+
end
|
|
364
|
+
|
|
313
365
|
# Action review mode. Omit to use none.
|
|
314
366
|
module Review
|
|
315
367
|
extend OpenAI::Internal::Type::Enum
|
|
@@ -338,6 +390,22 @@ module OpenAI
|
|
|
338
390
|
# @param limit [Integer, nil]
|
|
339
391
|
# Positive USD cents, or null to remove the limit.
|
|
340
392
|
end
|
|
393
|
+
|
|
394
|
+
class StreamOptions < OpenAI::Internal::Type::BaseModel
|
|
395
|
+
# @!attribute include_obfuscation
|
|
396
|
+
# Whether to include obfuscation padding in events on this connection. Defaults to
|
|
397
|
+
# `true`.
|
|
398
|
+
#
|
|
399
|
+
# @return [Boolean, nil]
|
|
400
|
+
optional :include_obfuscation, OpenAI::Internal::Type::Boolean
|
|
401
|
+
|
|
402
|
+
# @!method initialize(include_obfuscation: nil)
|
|
403
|
+
# Options for the event stream. Only allowed when `stream` is `true`.
|
|
404
|
+
#
|
|
405
|
+
# @param include_obfuscation [Boolean]
|
|
406
|
+
# Whether to include obfuscation padding in events on this connection. Defaults to
|
|
407
|
+
# `true`.
|
|
408
|
+
end
|
|
341
409
|
end
|
|
342
410
|
end
|
|
343
411
|
end
|
|
@@ -28,6 +28,17 @@ module OpenAI
|
|
|
28
28
|
# @return [Hash{Symbol=>String}, nil]
|
|
29
29
|
optional :metadata, OpenAI::Internal::Type::HashOf[String], nil?: true
|
|
30
30
|
|
|
31
|
+
# @!attribute prompt_cache_options
|
|
32
|
+
# Default prompt cache lifetime for future turns. Send null to clear the session
|
|
33
|
+
# default.
|
|
34
|
+
#
|
|
35
|
+
# @return [OpenAI::Models::Beta::Agents::SessionUpdateParams::PromptCacheOptions, nil]
|
|
36
|
+
optional(
|
|
37
|
+
:prompt_cache_options,
|
|
38
|
+
-> { OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions },
|
|
39
|
+
nil?: true
|
|
40
|
+
)
|
|
41
|
+
|
|
31
42
|
# @!attribute review
|
|
32
43
|
# Default action review for new root turns. Existing turns and their subagents
|
|
33
44
|
# keep their review mode.
|
|
@@ -48,7 +59,7 @@ module OpenAI
|
|
|
48
59
|
nil?: true
|
|
49
60
|
)
|
|
50
61
|
|
|
51
|
-
# @!method initialize(session_id:, agent: nil, metadata: nil, review: nil, spend_control: nil, request_options: {})
|
|
62
|
+
# @!method initialize(session_id:, agent: nil, metadata: nil, prompt_cache_options: nil, review: nil, spend_control: nil, request_options: {})
|
|
52
63
|
# @param session_id [String]
|
|
53
64
|
#
|
|
54
65
|
# @param agent [OpenAI::Models::Beta::Agents::SessionUpdateParams::Agent]
|
|
@@ -59,6 +70,10 @@ module OpenAI
|
|
|
59
70
|
# Up to 16 string key-value pairs, with keys up to 64 and values up to 512
|
|
60
71
|
# characters.
|
|
61
72
|
#
|
|
73
|
+
# @param prompt_cache_options [OpenAI::Models::Beta::Agents::SessionUpdateParams::PromptCacheOptions, nil]
|
|
74
|
+
# Default prompt cache lifetime for future turns. Send null to clear the session
|
|
75
|
+
# default.
|
|
76
|
+
#
|
|
62
77
|
# @param review [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::Review]
|
|
63
78
|
# Default action review for new root turns. Existing turns and their subagents
|
|
64
79
|
# keep their review mode.
|
|
@@ -189,6 +204,34 @@ module OpenAI
|
|
|
189
204
|
end
|
|
190
205
|
end
|
|
191
206
|
|
|
207
|
+
class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
|
|
208
|
+
# @!attribute ttl
|
|
209
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
210
|
+
#
|
|
211
|
+
# @return [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::PromptCacheOptions::Ttl, nil]
|
|
212
|
+
optional :ttl, enum: -> { OpenAI::Beta::Agents::SessionUpdateParams::PromptCacheOptions::Ttl }
|
|
213
|
+
|
|
214
|
+
# @!method initialize(ttl: nil)
|
|
215
|
+
# Default prompt cache lifetime for future turns. Send null to clear the session
|
|
216
|
+
# default.
|
|
217
|
+
#
|
|
218
|
+
# @param ttl [Symbol, OpenAI::Models::Beta::Agents::SessionUpdateParams::PromptCacheOptions::Ttl]
|
|
219
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
220
|
+
|
|
221
|
+
# Minimum lifetime for new prompt cache entries. Defaults to 30 minutes.
|
|
222
|
+
#
|
|
223
|
+
# @see OpenAI::Models::Beta::Agents::SessionUpdateParams::PromptCacheOptions#ttl
|
|
224
|
+
module Ttl
|
|
225
|
+
extend OpenAI::Internal::Type::Enum
|
|
226
|
+
|
|
227
|
+
TTL_30M = :"30m"
|
|
228
|
+
TTL_12H = :"12h"
|
|
229
|
+
|
|
230
|
+
# @!method self.values
|
|
231
|
+
# @return [Array<Symbol>]
|
|
232
|
+
end
|
|
233
|
+
end
|
|
234
|
+
|
|
192
235
|
# Default action review for new root turns. Existing turns and their subagents
|
|
193
236
|
# keep their review mode.
|
|
194
237
|
module Review
|
|
@@ -18,7 +18,7 @@ module OpenAI
|
|
|
18
18
|
# @!attribute events
|
|
19
19
|
# The input events to submit to the session.
|
|
20
20
|
#
|
|
21
|
-
# @return [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
|
|
21
|
+
# @return [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMcpApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
|
|
22
22
|
required :events, -> { OpenAI::Internal::Type::ArrayOf[union: OpenAI::Beta::AgentSessionInputParam] }
|
|
23
23
|
|
|
24
24
|
# @!attribute idempotency_key
|
|
@@ -29,7 +29,7 @@ module OpenAI
|
|
|
29
29
|
# @!method initialize(session_id:, events:, idempotency_key: nil, request_options: {})
|
|
30
30
|
# @param session_id [String]
|
|
31
31
|
#
|
|
32
|
-
# @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
|
|
32
|
+
# @param events [Array<OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMcpApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputComputerUseApprovalRequestResult, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputMessage, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputCancel, OpenAI::Models::Beta::AgentSessionInputParam::AgentSessionInputToolResult>]
|
|
33
33
|
# The input events to submit to the session.
|
|
34
34
|
#
|
|
35
35
|
# @param idempotency_key [String]
|
|
@@ -15,8 +15,20 @@ module OpenAI
|
|
|
15
15
|
# @return [String]
|
|
16
16
|
required :session_id, String
|
|
17
17
|
|
|
18
|
-
# @!
|
|
18
|
+
# @!attribute include_obfuscation
|
|
19
|
+
# Whether to include obfuscation padding in events on this connection. Defaults to
|
|
20
|
+
# `true`.
|
|
21
|
+
#
|
|
22
|
+
# @return [Boolean, nil]
|
|
23
|
+
optional :include_obfuscation, OpenAI::Internal::Type::Boolean
|
|
24
|
+
|
|
25
|
+
# @!method initialize(session_id:, include_obfuscation: nil, request_options: {})
|
|
19
26
|
# @param session_id [String]
|
|
27
|
+
#
|
|
28
|
+
# @param include_obfuscation [Boolean]
|
|
29
|
+
# Whether to include obfuscation padding in events on this connection. Defaults to
|
|
30
|
+
# `true`.
|
|
31
|
+
#
|
|
20
32
|
# @param request_options [OpenAI::RequestOptions, Hash{Symbol=>Object}]
|
|
21
33
|
end
|
|
22
34
|
end
|
|
@@ -76,7 +76,18 @@ module OpenAI
|
|
|
76
76
|
# @return [OpenAI::Models::Beta::TokenUsage, nil]
|
|
77
77
|
required :usage, -> { OpenAI::Beta::TokenUsage }, nil?: true
|
|
78
78
|
|
|
79
|
-
# @!
|
|
79
|
+
# @!attribute prompt_cache_options
|
|
80
|
+
# Prompt cache lifetime selected when this turn started, including an inherited
|
|
81
|
+
# session TTL. Null when the turn used the model default or no TTL was recorded.
|
|
82
|
+
#
|
|
83
|
+
# @return [OpenAI::Models::Beta::Agents::Sessions::Turn::PromptCacheOptions, nil]
|
|
84
|
+
optional(
|
|
85
|
+
:prompt_cache_options,
|
|
86
|
+
-> { OpenAI::Beta::Agents::Sessions::Turn::PromptCacheOptions },
|
|
87
|
+
nil?: true
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# @!method initialize(id:, agent_id:, completed_at:, created_at:, error:, session_id:, started_at:, status:, subagent_id:, usage:, prompt_cache_options: nil, object: :"agent.session.turn")
|
|
80
91
|
# The canonical public representation of a session turn.
|
|
81
92
|
#
|
|
82
93
|
# @param id [String]
|
|
@@ -112,6 +123,10 @@ module OpenAI
|
|
|
112
123
|
# Best-effort token usage for the turn, or null if unknown. Recorded usage may
|
|
113
124
|
# change.
|
|
114
125
|
#
|
|
126
|
+
# @param prompt_cache_options [OpenAI::Models::Beta::Agents::Sessions::Turn::PromptCacheOptions, nil]
|
|
127
|
+
# Prompt cache lifetime selected when this turn started, including an inherited
|
|
128
|
+
# session TTL. Null when the turn used the model default or no TTL was recorded.
|
|
129
|
+
#
|
|
115
130
|
# @param object [Symbol, :"agent.session.turn"]
|
|
116
131
|
# The object type. Always `agent.session.turn`.
|
|
117
132
|
|
|
@@ -142,6 +157,31 @@ module OpenAI
|
|
|
142
157
|
# @!method self.values
|
|
143
158
|
# @return [Array<Symbol>]
|
|
144
159
|
end
|
|
160
|
+
|
|
161
|
+
# @see OpenAI::Models::Beta::Agents::Sessions::Turn#prompt_cache_options
|
|
162
|
+
class PromptCacheOptions < OpenAI::Internal::Type::BaseModel
|
|
163
|
+
# @!attribute ttl
|
|
164
|
+
#
|
|
165
|
+
# @return [Symbol, OpenAI::Models::Beta::Agents::Sessions::Turn::PromptCacheOptions::Ttl]
|
|
166
|
+
required :ttl, enum: -> { OpenAI::Beta::Agents::Sessions::Turn::PromptCacheOptions::Ttl }
|
|
167
|
+
|
|
168
|
+
# @!method initialize(ttl:)
|
|
169
|
+
# Prompt cache lifetime selected when this turn started, including an inherited
|
|
170
|
+
# session TTL. Null when the turn used the model default or no TTL was recorded.
|
|
171
|
+
#
|
|
172
|
+
# @param ttl [Symbol, OpenAI::Models::Beta::Agents::Sessions::Turn::PromptCacheOptions::Ttl]
|
|
173
|
+
|
|
174
|
+
# @see OpenAI::Models::Beta::Agents::Sessions::Turn::PromptCacheOptions#ttl
|
|
175
|
+
module Ttl
|
|
176
|
+
extend OpenAI::Internal::Type::Enum
|
|
177
|
+
|
|
178
|
+
TTL_30M = :"30m"
|
|
179
|
+
TTL_12H = :"12h"
|
|
180
|
+
|
|
181
|
+
# @!method self.values
|
|
182
|
+
# @return [Array<Symbol>]
|
|
183
|
+
end
|
|
184
|
+
end
|
|
145
185
|
end
|
|
146
186
|
end
|
|
147
187
|
end
|
|
@@ -169,6 +169,15 @@ module OpenAI
|
|
|
169
169
|
# @return [OpenAI::Models::Beta::BetaResponse::Image, nil]
|
|
170
170
|
optional :image, -> { OpenAI::Beta::BetaResponse::Image }
|
|
171
171
|
|
|
172
|
+
# @!attribute input_transformations
|
|
173
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
174
|
+
#
|
|
175
|
+
# @return [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>, nil]
|
|
176
|
+
optional(
|
|
177
|
+
:input_transformations,
|
|
178
|
+
-> { OpenAI::Internal::Type::ArrayOf[OpenAI::Beta::BetaResponse::InputTransformation] }
|
|
179
|
+
)
|
|
180
|
+
|
|
172
181
|
# @!attribute max_output_tokens
|
|
173
182
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
174
183
|
# including visible output tokens and
|
|
@@ -354,7 +363,9 @@ module OpenAI
|
|
|
354
363
|
#
|
|
355
364
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
356
365
|
# the model will truncate the response to fit the context window by dropping
|
|
357
|
-
# items from the beginning of the conversation.
|
|
366
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
367
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
368
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
358
369
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
359
370
|
# for a model, the request will fail with a 400 error.
|
|
360
371
|
#
|
|
@@ -380,7 +391,7 @@ module OpenAI
|
|
|
380
391
|
# @return [String, nil]
|
|
381
392
|
optional :user, String
|
|
382
393
|
|
|
383
|
-
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
394
|
+
# @!method initialize(id:, access_programs:, created_at:, error:, incomplete_details:, instructions:, metadata:, model:, output:, parallel_tool_calls:, temperature:, tool_choice:, tools:, top_p:, background: nil, completed_at: nil, conversation: nil, image: nil, input_transformations: nil, max_output_tokens: nil, max_tool_calls: nil, moderation: nil, previous_response_id: nil, prompt: nil, prompt_cache_diagnostics: nil, prompt_cache_key: nil, prompt_cache_options: nil, prompt_cache_retention: nil, reasoning: nil, safety_identifier: nil, service_tier: nil, status: nil, text: nil, tool_usage: nil, top_logprobs: nil, truncation: nil, usage: nil, user: nil, object: :response)
|
|
384
395
|
# @param id [String]
|
|
385
396
|
# Unique identifier for this Response.
|
|
386
397
|
#
|
|
@@ -483,6 +494,9 @@ module OpenAI
|
|
|
483
494
|
#
|
|
484
495
|
# @param image [OpenAI::Models::Beta::BetaResponse::Image]
|
|
485
496
|
#
|
|
497
|
+
# @param input_transformations [Array<OpenAI::Models::Beta::BetaResponse::InputTransformation>]
|
|
498
|
+
# Reasoning inputs withheld from the model, in input order.
|
|
499
|
+
#
|
|
486
500
|
# @param max_output_tokens [Integer, nil]
|
|
487
501
|
# An upper bound for the number of tokens that can be generated for a response,
|
|
488
502
|
# including visible output tokens and
|
|
@@ -614,7 +628,9 @@ module OpenAI
|
|
|
614
628
|
#
|
|
615
629
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
616
630
|
# the model will truncate the response to fit the context window by dropping
|
|
617
|
-
# items from the beginning of the conversation.
|
|
631
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
632
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
633
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
618
634
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
619
635
|
# for a model, the request will fail with a 400 error.
|
|
620
636
|
#
|
|
@@ -1439,6 +1455,53 @@ module OpenAI
|
|
|
1439
1455
|
end
|
|
1440
1456
|
end
|
|
1441
1457
|
|
|
1458
|
+
class InputTransformation < OpenAI::Internal::Type::BaseModel
|
|
1459
|
+
# @!attribute id
|
|
1460
|
+
# The original reasoning item ID.
|
|
1461
|
+
#
|
|
1462
|
+
# @return [String]
|
|
1463
|
+
required :id, String
|
|
1464
|
+
|
|
1465
|
+
# @!attribute action
|
|
1466
|
+
#
|
|
1467
|
+
# @return [Symbol, :removed]
|
|
1468
|
+
required :action, const: :removed
|
|
1469
|
+
|
|
1470
|
+
# @!attribute reason
|
|
1471
|
+
#
|
|
1472
|
+
# @return [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
|
|
1473
|
+
required :reason, enum: -> { OpenAI::Beta::BetaResponse::InputTransformation::Reason }
|
|
1474
|
+
|
|
1475
|
+
# @!attribute type
|
|
1476
|
+
#
|
|
1477
|
+
# @return [Symbol, :reasoning]
|
|
1478
|
+
required :type, const: :reasoning
|
|
1479
|
+
|
|
1480
|
+
# @!method initialize(id:, reason:, action: :removed, type: :reasoning)
|
|
1481
|
+
# @param id [String]
|
|
1482
|
+
# The original reasoning item ID.
|
|
1483
|
+
#
|
|
1484
|
+
# @param reason [Symbol, OpenAI::Models::Beta::BetaResponse::InputTransformation::Reason]
|
|
1485
|
+
#
|
|
1486
|
+
# @param action [Symbol, :removed]
|
|
1487
|
+
#
|
|
1488
|
+
# @param type [Symbol, :reasoning]
|
|
1489
|
+
|
|
1490
|
+
# @see OpenAI::Models::Beta::BetaResponse::InputTransformation#reason
|
|
1491
|
+
module Reason
|
|
1492
|
+
extend OpenAI::Internal::Type::Enum
|
|
1493
|
+
|
|
1494
|
+
ORGANIZATION_MISMATCH = :organization_mismatch
|
|
1495
|
+
END_USER_MISMATCH = :end_user_mismatch
|
|
1496
|
+
MODEL_MISMATCH = :model_mismatch
|
|
1497
|
+
PREFIX_MISMATCH = :prefix_mismatch
|
|
1498
|
+
TURN_BOUNDARY = :turn_boundary
|
|
1499
|
+
|
|
1500
|
+
# @!method self.values
|
|
1501
|
+
# @return [Array<Symbol>]
|
|
1502
|
+
end
|
|
1503
|
+
end
|
|
1504
|
+
|
|
1442
1505
|
# @see OpenAI::Models::Beta::BetaResponse#moderation
|
|
1443
1506
|
class Moderation < OpenAI::Internal::Type::BaseModel
|
|
1444
1507
|
# @!attribute input
|
|
@@ -2372,7 +2435,9 @@ module OpenAI
|
|
|
2372
2435
|
#
|
|
2373
2436
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
2374
2437
|
# the model will truncate the response to fit the context window by dropping
|
|
2375
|
-
# items from the beginning of the conversation.
|
|
2438
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
2439
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
2440
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
2376
2441
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
2377
2442
|
# for a model, the request will fail with a 400 error.
|
|
2378
2443
|
#
|
|
@@ -811,7 +811,8 @@ module OpenAI
|
|
|
811
811
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
812
812
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
813
813
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
814
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
814
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
815
|
+
# `gpt-image-2.6-sunburst`.
|
|
815
816
|
#
|
|
816
817
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
817
818
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -943,7 +944,8 @@ module OpenAI
|
|
|
943
944
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
944
945
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
945
946
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
946
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
947
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
948
|
+
# `gpt-image-2.6-sunburst`.
|
|
947
949
|
#
|
|
948
950
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
949
951
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -1092,7 +1094,8 @@ module OpenAI
|
|
|
1092
1094
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
1093
1095
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
1094
1096
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
1095
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
1097
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
1098
|
+
# `gpt-image-2.6-sunburst`.
|
|
1096
1099
|
#
|
|
1097
1100
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
1098
1101
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -473,7 +473,9 @@ module OpenAI
|
|
|
473
473
|
#
|
|
474
474
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
475
475
|
# the model will truncate the response to fit the context window by dropping
|
|
476
|
-
# items from the beginning of the conversation.
|
|
476
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
477
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
478
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
477
479
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
478
480
|
# for a model, the request will fail with a 400 error.
|
|
479
481
|
#
|
|
@@ -770,7 +772,9 @@ module OpenAI
|
|
|
770
772
|
#
|
|
771
773
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
772
774
|
# the model will truncate the response to fit the context window by dropping
|
|
773
|
-
# items from the beginning of the conversation.
|
|
775
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
776
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
777
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
774
778
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
775
779
|
# for a model, the request will fail with a 400 error.
|
|
776
780
|
#
|
|
@@ -2409,7 +2413,9 @@ module OpenAI
|
|
|
2409
2413
|
#
|
|
2410
2414
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
2411
2415
|
# the model will truncate the response to fit the context window by dropping
|
|
2412
|
-
# items from the beginning of the conversation.
|
|
2416
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
2417
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
2418
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
2413
2419
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
2414
2420
|
# for a model, the request will fail with a 400 error.
|
|
2415
2421
|
#
|
|
@@ -681,7 +681,8 @@ module OpenAI
|
|
|
681
681
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
682
682
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
683
683
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
684
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
684
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
685
|
+
# `gpt-image-2.6-sunburst`.
|
|
685
686
|
#
|
|
686
687
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
687
688
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -798,7 +799,8 @@ module OpenAI
|
|
|
798
799
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
799
800
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
800
801
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
801
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
802
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
803
|
+
# `gpt-image-2.6-sunburst`.
|
|
802
804
|
#
|
|
803
805
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
804
806
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -947,7 +949,8 @@ module OpenAI
|
|
|
947
949
|
# `gpt-image-2`, `gpt-image-2-2026-04-21`, `gpt-image-2.5-sunburst`,
|
|
948
950
|
# `gpt-image-2.5-sunburst-2026-09-08`, `gpt-image-2.5-flare`,
|
|
949
951
|
# `gpt-image-2.5-flare-2026-09-08`, `gpt-image-2.6-sunburst`,
|
|
950
|
-
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
952
|
+
# `gpt-image-2.6-flare`, or `chatgpt-image-latest`. Default:
|
|
953
|
+
# `gpt-image-2.6-sunburst`.
|
|
951
954
|
#
|
|
952
955
|
# `gpt-image-1` was shut down on October 23, 2026. Use `gpt-image-2.5-sunburst` or
|
|
953
956
|
# `gpt-image-2.5-flare` instead.
|
|
@@ -31,6 +31,8 @@ module OpenAI
|
|
|
31
31
|
optional :input, union: -> { OpenAI::Beta::ResponseCompactParams::Input }, nil?: true
|
|
32
32
|
|
|
33
33
|
# @!attribute instructions
|
|
34
|
+
# @deprecated
|
|
35
|
+
#
|
|
34
36
|
# A system (or developer) message inserted into the model's context. When used
|
|
35
37
|
# along with `previous_response_id`, the instructions from a previous response
|
|
36
38
|
# will not be carried over to the next response. This makes it simple to swap out
|
|
@@ -364,7 +364,9 @@ module OpenAI
|
|
|
364
364
|
#
|
|
365
365
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
366
366
|
# the model will truncate the response to fit the context window by dropping
|
|
367
|
-
# items from the beginning of the conversation.
|
|
367
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
368
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
369
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
368
370
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
369
371
|
# for a model, the request will fail with a 400 error.
|
|
370
372
|
#
|
|
@@ -632,7 +634,9 @@ module OpenAI
|
|
|
632
634
|
#
|
|
633
635
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
634
636
|
# the model will truncate the response to fit the context window by dropping
|
|
635
|
-
# items from the beginning of the conversation.
|
|
637
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
638
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
639
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
636
640
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
637
641
|
# for a model, the request will fail with a 400 error.
|
|
638
642
|
#
|
|
@@ -2019,7 +2023,9 @@ module OpenAI
|
|
|
2019
2023
|
#
|
|
2020
2024
|
# - `auto`: If the input to this Response exceeds the model's context window size,
|
|
2021
2025
|
# the model will truncate the response to fit the context window by dropping
|
|
2022
|
-
# items from the beginning of the conversation.
|
|
2026
|
+
# items from the beginning of the conversation. On some models, trimming can
|
|
2027
|
+
# begin earlier because the API subtracts the model's maximum output allowance
|
|
2028
|
+
# from its input limit, even if you set a lower `max_output_tokens`.
|
|
2023
2029
|
# - `disabled` (default): If the input size will exceed the context window size
|
|
2024
2030
|
# for a model, the request will fail with a 400 error.
|
|
2025
2031
|
module Truncation
|