openai 0.84.0 → 0.86.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 +110 -0
- data/README.md +95 -13
- data/SECURITY.md +10 -0
- data/docs/architecture/security-model.md +293 -0
- data/lib/openai/auth/workload_identity_auth.rb +2 -2
- data/lib/openai/auth/x509_token_exchange.rb +7 -1
- data/lib/openai/auth/x509_transport.rb +21 -3
- data/lib/openai/client.rb +8 -2
- data/lib/openai/errors.rb +28 -9
- data/lib/openai/file_part.rb +35 -2
- data/lib/openai/helpers/realtime/client_extension.rb +37 -121
- data/lib/openai/helpers/realtime/connection.rb +13 -90
- data/lib/openai/helpers/realtime/connection_manager.rb +22 -77
- data/lib/openai/helpers/realtime/connection_resources.rb +3 -1
- data/lib/openai/helpers/realtime/errors.rb +3 -27
- data/lib/openai/helpers/realtime/transports/async_websocket.rb +25 -368
- data/lib/openai/helpers/responses_websocket/client_extension.rb +62 -0
- data/lib/openai/helpers/responses_websocket/connection.rb +288 -0
- data/lib/openai/helpers/responses_websocket/connection_manager.rb +34 -0
- data/lib/openai/helpers/responses_websocket/connection_resources.rb +22 -0
- data/lib/openai/helpers/responses_websocket/errors.rb +56 -0
- data/lib/openai/helpers/responses_websocket/resources/responses_extension.rb +31 -0
- data/lib/openai/helpers/responses_websocket/transports/async_websocket.rb +29 -0
- data/lib/openai/helpers/responses_websocket/unknown_server_event.rb +54 -0
- data/lib/openai/helpers/responses_websocket.rb +12 -0
- data/lib/openai/helpers/sorbet.rb +7 -1
- data/lib/openai/helpers/streaming/chat_completion_stream.rb +65 -15
- data/lib/openai/helpers/streaming/chat_events.rb +9 -7
- data/lib/openai/helpers/streaming/response_stream.rb +79 -68
- data/lib/openai/helpers/structured_output/array_of.rb +2 -2
- data/lib/openai/helpers/structured_output/base_model.rb +19 -5
- data/lib/openai/helpers/structured_output/chat_completion_parser.rb +6 -3
- data/lib/openai/helpers/structured_output/json_schema_converter.rb +35 -12
- data/lib/openai/helpers/structured_output/response_parser.rb +125 -2
- data/lib/openai/helpers/websocket/async_websocket_transport.rb +422 -0
- data/lib/openai/helpers/websocket/client_request.rb +131 -0
- data/lib/openai/helpers/websocket/connection.rb +104 -0
- data/lib/openai/helpers/websocket/connection_manager.rb +104 -0
- data/lib/openai/helpers/websocket/errors.rb +32 -0
- data/lib/openai/helpers/websocket/protocol.rb +26 -0
- data/lib/openai/helpers/websocket.rb +10 -0
- data/lib/openai/internal/conversation_cursor_page.rb +1 -1
- data/lib/openai/internal/cursor_page.rb +1 -1
- data/lib/openai/internal/next_cursor_page.rb +1 -1
- data/lib/openai/internal/page.rb +1 -1
- data/lib/openai/internal/transport/base_client.rb +45 -8
- data/lib/openai/internal/transport/request_body_merge.rb +71 -0
- data/lib/openai/internal/type/base_page.rb +2 -2
- data/lib/openai/internal/type/base_stream.rb +8 -0
- data/lib/openai/internal/type/converter.rb +10 -2
- data/lib/openai/internal/type/duplicable_response_carrier.rb +23 -0
- data/lib/openai/internal/type/file_input.rb +3 -3
- data/lib/openai/internal/type/union.rb +24 -4
- data/lib/openai/internal/util.rb +139 -20
- data/lib/openai/internal/vector_store_file_uploader.rb +1 -1
- data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rb +9 -1
- data/lib/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rb +14 -1
- data/lib/openai/models/admin/organization/usage_costs_params.rb +1 -1
- data/lib/openai/models/audio/transcription_create_response.rb +5 -5
- data/lib/openai/models/batch.rb +2 -2
- data/lib/openai/models/beta/beta_custom_tool.rb +13 -1
- data/lib/openai/models/beta/beta_function_tool.rb +8 -1
- data/lib/openai/models/beta/beta_namespace_tool.rb +10 -1
- data/lib/openai/models/beta/beta_response.rb +150 -11
- data/lib/openai/models/beta/beta_response_configuration_update_item.rb +103 -0
- data/lib/openai/models/beta/beta_response_configuration_update_item_param.rb +104 -0
- data/lib/openai/models/beta/beta_response_custom_tool_call.rb +9 -1
- data/lib/openai/models/beta/beta_response_custom_tool_call_item.rb +3 -1
- data/lib/openai/models/beta/beta_response_error.rb +96 -1
- data/lib/openai/models/beta/beta_response_function_call_arguments_done_event.rb +1 -9
- data/lib/openai/models/beta/beta_response_function_tool_call.rb +9 -1
- data/lib/openai/models/beta/beta_response_function_tool_call_item.rb +3 -1
- data/lib/openai/models/beta/beta_response_function_web_search.rb +1 -0
- data/lib/openai/models/beta/beta_response_incomplete_event.rb +4 -0
- data/lib/openai/models/beta/beta_response_inject_event.rb +2 -2
- data/lib/openai/models/beta/beta_response_inject_failed_event.rb +2 -2
- data/lib/openai/models/beta/beta_response_input_item.rb +6 -1
- data/lib/openai/models/beta/beta_response_item.rb +5 -1
- data/lib/openai/models/beta/beta_response_steer_accepted_event.rb +81 -0
- data/lib/openai/models/beta/beta_response_steer_error_code.rb +61 -0
- data/lib/openai/models/beta/beta_response_steer_event.rb +75 -0
- data/lib/openai/models/beta/beta_response_steer_failed_event.rb +151 -0
- data/lib/openai/models/beta/beta_response_steer_input.rb +360 -0
- data/lib/openai/models/beta/beta_response_steer_input_content.rb +28 -0
- data/lib/openai/models/beta/beta_response_steer_pending_event.rb +113 -0
- data/lib/openai/models/beta/beta_response_steer_pending_reason.rb +26 -0
- data/lib/openai/models/beta/beta_response_steer_required_input.rb +215 -0
- data/lib/openai/models/beta/beta_response_stream_event.rb +4 -0
- data/lib/openai/models/beta/beta_responses_client_event.rb +50 -8
- data/lib/openai/models/beta/beta_responses_server_event.rb +165 -5
- data/lib/openai/models/beta/response_compact_params.rb +23 -18
- data/lib/openai/models/beta/response_create_params.rb +19 -7
- data/lib/openai/models/beta/responses/beta_response_item_list.rb +2 -2
- data/lib/openai/models/beta/responses/input_token_count_params.rb +3 -3
- data/lib/openai/models/chat/completion_create_params.rb +4 -4
- data/lib/openai/models/chat_model.rb +1 -0
- data/lib/openai/models/conversations/conversation_create_params.rb +2 -2
- data/lib/openai/models/conversations/conversation_item.rb +5 -1
- data/lib/openai/models/conversations/conversation_item_list.rb +2 -2
- data/lib/openai/models/conversations/item_create_params.rb +2 -2
- data/lib/openai/models/error_object.rb +90 -1
- data/lib/openai/models/eval_create_response.rb +1 -1
- data/lib/openai/models/eval_list_response.rb +1 -1
- data/lib/openai/models/eval_retrieve_response.rb +1 -1
- data/lib/openai/models/eval_update_response.rb +1 -1
- data/lib/openai/models/evals/create_eval_completions_run_data_source.rb +2 -2
- data/lib/openai/models/responses/custom_tool.rb +13 -1
- data/lib/openai/models/responses/function_tool.rb +8 -1
- data/lib/openai/models/responses/input_token_count_params.rb +3 -3
- data/lib/openai/models/responses/namespace_tool.rb +10 -1
- data/lib/openai/models/responses/response.rb +151 -14
- data/lib/openai/models/responses/response_compact_params.rb +23 -18
- data/lib/openai/models/responses/response_configuration_update_item.rb +56 -0
- data/lib/openai/models/responses/response_configuration_update_item_param.rb +57 -0
- data/lib/openai/models/responses/response_create_params.rb +15 -6
- data/lib/openai/models/responses/response_custom_tool_call.rb +9 -1
- data/lib/openai/models/responses/response_custom_tool_call_item.rb +3 -1
- data/lib/openai/models/responses/response_error.rb +96 -1
- data/lib/openai/models/responses/response_function_call_arguments_done_event.rb +1 -9
- data/lib/openai/models/responses/response_function_tool_call.rb +9 -1
- data/lib/openai/models/responses/response_function_tool_call_item.rb +3 -1
- data/lib/openai/models/responses/response_function_web_search.rb +1 -0
- data/lib/openai/models/responses/response_incomplete_event.rb +4 -0
- data/lib/openai/models/responses/response_input_item.rb +6 -1
- data/lib/openai/models/responses/response_item.rb +5 -1
- data/lib/openai/models/responses/response_item_list.rb +2 -2
- data/lib/openai/models/responses/response_steer_accepted_event.rb +79 -0
- data/lib/openai/models/responses/response_steer_error_code.rb +59 -0
- data/lib/openai/models/responses/response_steer_event.rb +73 -0
- data/lib/openai/models/responses/response_steer_failed_event.rb +149 -0
- data/lib/openai/models/responses/response_steer_input.rb +304 -0
- data/lib/openai/models/responses/response_steer_input_content.rb +26 -0
- data/lib/openai/models/responses/response_steer_pending_event.rb +111 -0
- data/lib/openai/models/responses/response_steer_pending_reason.rb +24 -0
- data/lib/openai/models/responses/response_steer_required_input.rb +213 -0
- data/lib/openai/models/responses/response_stream_event.rb +4 -0
- data/lib/openai/models/responses/responses_client_event.rb +881 -769
- data/lib/openai/models/responses/responses_server_event.rb +163 -5
- data/lib/openai/models/safety/alert_retrieve_params.rb +24 -0
- data/lib/openai/models/safety/safety_alert.rb +96 -0
- data/lib/openai/models/video_create_error.rb +93 -1
- data/lib/openai/models/webhooks/safety_alert_created_webhook_event.rb +63 -0
- data/lib/openai/models/webhooks/safety_org_alert_created_webhook_event.rb +63 -0
- data/lib/openai/models/webhooks/unwrap_webhook_event.rb +7 -1
- data/lib/openai/models.rb +2 -0
- data/lib/openai/net_http_client.rb +17 -3
- data/lib/openai/providers/bedrock.rb +22 -13
- data/lib/openai/request_options.rb +18 -4
- data/lib/openai/resources/admin/organization/projects/service_accounts/api_keys.rb +3 -1
- data/lib/openai/resources/beta/responses/input_items.rb +1 -1
- data/lib/openai/resources/beta/responses/input_tokens.rb +1 -1
- data/lib/openai/resources/beta/responses.rb +6 -6
- data/lib/openai/resources/chat/completions.rb +2 -2
- data/lib/openai/resources/containers/files.rb +1 -0
- data/lib/openai/resources/conversations/items.rb +3 -3
- data/lib/openai/resources/conversations.rb +1 -1
- data/lib/openai/resources/responses/input_items.rb +1 -1
- data/lib/openai/resources/responses/input_tokens.rb +1 -1
- data/lib/openai/resources/responses.rb +42 -10
- data/lib/openai/resources/safety/alerts.rb +37 -0
- data/lib/openai/resources/safety.rb +18 -0
- data/lib/openai/resources/webhooks.rb +1 -1
- data/lib/openai/response_carrier.rb +42 -0
- data/lib/openai/version.rb +1 -1
- data/lib/openai.rb +32 -0
- data/rbi/openai/auth/subject_token_providers.rbi +72 -0
- data/rbi/openai/client.rbi +3 -0
- data/rbi/openai/errors.rbi +53 -4
- data/rbi/openai/file_part.rbi +5 -0
- data/rbi/openai/helpers/realtime/extensions.rbi +3 -3
- data/rbi/openai/helpers/responses_websocket/connection.rbi +82 -0
- data/rbi/openai/helpers/responses_websocket/connection_manager.rbi +39 -0
- data/rbi/openai/helpers/responses_websocket/connection_resources.rbi +17 -0
- data/rbi/openai/helpers/responses_websocket/extensions.rbi +108 -0
- data/rbi/openai/helpers/responses_websocket/transports/async_websocket.rbi +28 -0
- data/rbi/openai/helpers/responses_websocket/unknown_server_event.rbi +29 -0
- data/rbi/openai/helpers/streaming/chat_completion_stream.rbi +214 -0
- data/rbi/openai/helpers/streaming/events.rbi +61 -4
- data/rbi/openai/helpers/streaming/exceptions.rbi +30 -0
- data/rbi/openai/helpers/streaming/response_stream.rbi +7 -3
- data/rbi/openai/helpers/structured_output/response_parser.rbi +23 -0
- data/rbi/openai/helpers/websocket.rbi +33 -0
- data/rbi/openai/internal/transport/base_client.rbi +11 -0
- data/rbi/openai/internal/type/base_stream.rbi +4 -0
- data/rbi/openai/internal/util.rbi +1 -0
- data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbi +10 -0
- data/rbi/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbi +19 -1
- data/rbi/openai/models/admin/organization/usage_costs_params.rbi +2 -2
- data/rbi/openai/models/batch.rbi +2 -2
- data/rbi/openai/models/beta/beta_custom_tool.rbi +15 -0
- data/rbi/openai/models/beta/beta_function_tool.rbi +11 -0
- data/rbi/openai/models/beta/beta_namespace_tool.rbi +15 -0
- data/rbi/openai/models/beta/beta_response.rbi +301 -9
- data/rbi/openai/models/beta/beta_response_configuration_update_item.rbi +200 -0
- data/rbi/openai/models/beta/beta_response_configuration_update_item_param.rbi +207 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call.rbi +13 -0
- data/rbi/openai/models/beta/beta_response_custom_tool_call_item.rbi +6 -0
- data/rbi/openai/models/beta/beta_response_error.rbi +161 -3
- data/rbi/openai/models/beta/beta_response_function_call_arguments_done_event.rbi +0 -10
- data/rbi/openai/models/beta/beta_response_function_tool_call.rbi +13 -0
- data/rbi/openai/models/beta/beta_response_function_tool_call_item.rbi +6 -0
- data/rbi/openai/models/beta/beta_response_function_web_search.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_incomplete_event.rbi +4 -0
- data/rbi/openai/models/beta/beta_response_inject_created_event.rbi +1 -1
- data/rbi/openai/models/beta/beta_response_inject_event.rbi +3 -0
- data/rbi/openai/models/beta/beta_response_inject_failed_event.rbi +4 -1
- data/rbi/openai/models/beta/beta_response_input_item.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_item.rbi +1 -0
- data/rbi/openai/models/beta/beta_response_steer_accepted_event.rbi +148 -0
- data/rbi/openai/models/beta/beta_response_steer_error_code.rbi +65 -0
- data/rbi/openai/models/beta/beta_response_steer_event.rbi +118 -0
- data/rbi/openai/models/beta/beta_response_steer_failed_event.rbi +271 -0
- data/rbi/openai/models/beta/beta_response_steer_input.rbi +602 -0
- data/rbi/openai/models/beta/beta_response_steer_input_content.rbi +31 -0
- data/rbi/openai/models/beta/beta_response_steer_pending_event.rbi +222 -0
- data/rbi/openai/models/beta/beta_response_steer_pending_reason.rbi +35 -0
- data/rbi/openai/models/beta/beta_response_steer_required_input.rbi +379 -0
- data/rbi/openai/models/beta/beta_responses_client_event.rbi +72 -43
- data/rbi/openai/models/beta/beta_responses_server_event.rbi +283 -80
- data/rbi/openai/models/beta/response_compact_params.rbi +25 -21
- data/rbi/openai/models/beta/response_create_params.rbi +16 -3
- data/rbi/openai/models/beta/responses/beta_response_item_list.rbi +1 -0
- data/rbi/openai/models/chat/completion_create_params.rbi +3 -3
- data/rbi/openai/models/chat_model.rbi +1 -0
- data/rbi/openai/models/conversations/conversation_create_params.rbi +3 -0
- data/rbi/openai/models/conversations/conversation_item.rbi +1 -0
- data/rbi/openai/models/conversations/conversation_item_list.rbi +1 -0
- data/rbi/openai/models/conversations/item_create_params.rbi +3 -0
- data/rbi/openai/models/error_object.rbi +156 -3
- data/rbi/openai/models/eval_create_response.rbi +1 -1
- data/rbi/openai/models/eval_list_response.rbi +1 -1
- data/rbi/openai/models/eval_retrieve_response.rbi +1 -1
- data/rbi/openai/models/eval_update_response.rbi +1 -1
- data/rbi/openai/models/evals/create_eval_completions_run_data_source.rbi +2 -2
- data/rbi/openai/models/realtime/conversation_created_event.rbi +4 -1
- data/rbi/openai/models/realtime/conversation_item_create_event.rbi +2 -2
- data/rbi/openai/models/realtime/conversation_item_delete_event.rbi +1 -1
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbi +5 -3
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbi +2 -2
- data/rbi/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbi +1 -1
- data/rbi/openai/models/realtime/conversation_item_retrieve_event.rbi +1 -1
- data/rbi/openai/models/realtime/conversation_item_truncate_event.rbi +1 -1
- data/rbi/openai/models/realtime/input_audio_buffer_append_event.rbi +1 -1
- data/rbi/openai/models/realtime/input_audio_buffer_clear_event.rbi +1 -1
- data/rbi/openai/models/realtime/input_audio_buffer_commit_event.rbi +1 -1
- data/rbi/openai/models/realtime/output_audio_buffer_clear_event.rbi +1 -1
- data/rbi/openai/models/realtime/rate_limits_updated_event.rbi +4 -4
- data/rbi/openai/models/realtime/response_cancel_event.rbi +1 -1
- data/rbi/openai/models/realtime/response_content_part_added_event.rbi +4 -4
- data/rbi/openai/models/realtime/response_content_part_done_event.rbi +4 -4
- data/rbi/openai/models/realtime/response_create_event.rbi +5 -1
- data/rbi/openai/models/realtime/session_update_event.rbi +1 -1
- data/rbi/openai/models/responses/custom_tool.rbi +15 -0
- data/rbi/openai/models/responses/function_tool.rbi +11 -0
- data/rbi/openai/models/responses/namespace_tool.rbi +15 -0
- data/rbi/openai/models/responses/response.rbi +299 -8
- data/rbi/openai/models/responses/response_compact_params.rbi +25 -21
- data/rbi/openai/models/responses/response_configuration_update_item.rbi +112 -0
- data/rbi/openai/models/responses/response_configuration_update_item_param.rbi +117 -0
- data/rbi/openai/models/responses/response_create_params.rbi +14 -2
- data/rbi/openai/models/responses/response_custom_tool_call.rbi +13 -0
- data/rbi/openai/models/responses/response_custom_tool_call_item.rbi +6 -0
- data/rbi/openai/models/responses/response_error.rbi +161 -3
- data/rbi/openai/models/responses/response_function_call_arguments_done_event.rbi +1 -17
- data/rbi/openai/models/responses/response_function_tool_call.rbi +13 -0
- data/rbi/openai/models/responses/response_function_tool_call_item.rbi +6 -0
- data/rbi/openai/models/responses/response_function_web_search.rbi +1 -0
- data/rbi/openai/models/responses/response_incomplete_event.rbi +4 -0
- data/rbi/openai/models/responses/response_input_item.rbi +1 -0
- data/rbi/openai/models/responses/response_item.rbi +1 -0
- data/rbi/openai/models/responses/response_item_list.rbi +1 -0
- data/rbi/openai/models/responses/response_steer_accepted_event.rbi +146 -0
- data/rbi/openai/models/responses/response_steer_error_code.rbi +63 -0
- data/rbi/openai/models/responses/response_steer_event.rbi +119 -0
- data/rbi/openai/models/responses/response_steer_failed_event.rbi +272 -0
- data/rbi/openai/models/responses/response_steer_input.rbi +474 -0
- data/rbi/openai/models/responses/response_steer_input_content.rbi +29 -0
- data/rbi/openai/models/responses/response_steer_pending_event.rbi +220 -0
- data/rbi/openai/models/responses/response_steer_pending_reason.rbi +33 -0
- data/rbi/openai/models/responses/response_steer_required_input.rbi +377 -0
- data/rbi/openai/models/responses/responses_client_event.rbi +1228 -1036
- data/rbi/openai/models/responses/responses_server_event.rbi +410 -75
- data/rbi/openai/models/safety/alert_retrieve_params.rbi +55 -0
- data/rbi/openai/models/safety/safety_alert.rbi +147 -0
- data/rbi/openai/models/video_create_error.rbi +149 -3
- data/rbi/openai/models/webhooks/safety_alert_created_webhook_event.rbi +130 -0
- data/rbi/openai/models/webhooks/safety_org_alert_created_webhook_event.rbi +130 -0
- data/rbi/openai/models/webhooks/unwrap_webhook_event.rbi +3 -1
- data/rbi/openai/models.rbi +2 -0
- data/rbi/openai/resources/admin/organization/projects/service_accounts/api_keys.rbi +3 -0
- data/rbi/openai/resources/admin/organization/usage.rbi +1 -1
- data/rbi/openai/resources/audio/speech.rbi +1 -1
- data/rbi/openai/resources/beta/responses.rbi +10 -9
- data/rbi/openai/resources/chat/completions.rbi +2 -2
- data/rbi/openai/resources/containers/files/content.rbi +1 -1
- data/rbi/openai/resources/conversations/items.rbi +1 -0
- data/rbi/openai/resources/conversations.rbi +1 -0
- data/rbi/openai/resources/files.rbi +5 -1
- data/rbi/openai/resources/responses.rbi +155 -9
- data/rbi/openai/resources/safety/alerts.rbi +30 -0
- data/rbi/openai/resources/safety.rbi +18 -0
- data/rbi/openai/resources/skills/content.rbi +5 -1
- data/rbi/openai/resources/skills/versions/content.rbi +3 -1
- data/rbi/openai/resources/videos.rbi +1 -1
- data/rbi/openai/resources/webhooks.rbi +3 -1
- data/rbi/openai/response_carrier.rbi +25 -0
- data/sig/openai/auth/subject_token_providers.rbs +42 -0
- data/sig/openai/client.rbs +2 -0
- data/sig/openai/errors.rbs +36 -2
- data/sig/openai/file_part.rbs +3 -0
- data/sig/openai/helpers/realtime/extensions.rbs +2 -2
- data/sig/openai/helpers/responses_websocket/connection.rbs +48 -0
- data/sig/openai/helpers/responses_websocket/connection_manager.rbs +19 -0
- data/sig/openai/helpers/responses_websocket/connection_resources.rbs +12 -0
- data/sig/openai/helpers/responses_websocket/extensions.rbs +55 -0
- data/sig/openai/helpers/responses_websocket/transports/async_websocket.rbs +19 -0
- data/sig/openai/helpers/responses_websocket/unknown_server_event.rbs +15 -0
- data/sig/openai/helpers/streaming/exceptions.rbs +24 -0
- data/sig/openai/helpers/streaming/response_stream.rbs +103 -0
- data/sig/openai/helpers/structured_output/response_parser.rbs +10 -0
- data/sig/openai/helpers/websocket.rbs +18 -0
- data/sig/openai/internal/transport/base_client.rbs +5 -0
- data/sig/openai/internal/type/base_stream.rbs +2 -0
- data/sig/openai/internal/type/request_parameters.rbs +1 -1
- data/sig/openai/internal/util.rbs +1 -0
- data/sig/openai/models/admin/organization/admin_api_key.rbs +18 -18
- data/sig/openai/models/admin/organization/admin_api_key_create_params.rbs +7 -4
- data/sig/openai/models/admin/organization/admin_api_key_create_response.rbs +6 -6
- data/sig/openai/models/admin/organization/admin_api_key_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/admin_api_key_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/admin_api_key_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/admin_api_key_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/audit_log_list_params.rbs +27 -27
- data/sig/openai/models/admin/organization/audit_log_list_response.rbs +428 -423
- data/sig/openai/models/admin/organization/certificate.rbs +6 -6
- data/sig/openai/models/admin/organization/certificate_activate_params.rbs +5 -3
- data/sig/openai/models/admin/organization/certificate_activate_response.rbs +5 -4
- data/sig/openai/models/admin/organization/certificate_create_params.rbs +7 -4
- data/sig/openai/models/admin/organization/certificate_deactivate_params.rbs +5 -3
- data/sig/openai/models/admin/organization/certificate_deactivate_response.rbs +5 -4
- data/sig/openai/models/admin/organization/certificate_delete_params.rbs +2 -3
- data/sig/openai/models/admin/organization/certificate_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/certificate_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/certificate_list_response.rbs +5 -4
- data/sig/openai/models/admin/organization/certificate_retrieve_params.rbs +4 -4
- data/sig/openai/models/admin/organization/certificate_update_params.rbs +7 -4
- data/sig/openai/models/admin/organization/data_retention_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/data_retention_update_params.rbs +3 -3
- data/sig/openai/models/admin/organization/group_create_params.rbs +2 -2
- data/sig/openai/models/admin/organization/group_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/group_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/group_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/group_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/group_update_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/role_create_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/role_create_response.rbs +4 -4
- data/sig/openai/models/admin/organization/groups/role_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/groups/role_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/user_create_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/user_create_response.rbs +2 -2
- data/sig/openai/models/admin/organization/groups/user_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/groups/user_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/groups/user_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/groups/user_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/invite.rbs +6 -6
- data/sig/openai/models/admin/organization/invite_create_params.rbs +4 -4
- data/sig/openai/models/admin/organization/invite_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/invite_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/invite_list_params.rbs +8 -5
- data/sig/openai/models/admin/organization/invite_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/organization_data_retention.rbs +2 -2
- data/sig/openai/models/admin/organization/organization_spend_alert.rbs +6 -6
- data/sig/openai/models/admin/organization/organization_spend_alert_deleted.rbs +2 -2
- data/sig/openai/models/admin/organization/organization_spend_limit.rbs +2 -2
- data/sig/openai/models/admin/organization/organization_spend_limit_deleted.rbs +2 -2
- data/sig/openai/models/admin/organization/organization_user.rbs +46 -46
- data/sig/openai/models/admin/organization/project.rbs +12 -12
- data/sig/openai/models/admin/organization/project_archive_params.rbs +2 -2
- data/sig/openai/models/admin/organization/project_create_params.rbs +8 -8
- data/sig/openai/models/admin/organization/project_list_params.rbs +10 -6
- data/sig/openai/models/admin/organization/project_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/project_update_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/api_key_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/api_key_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/api_key_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/api_key_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/certificate_activate_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/certificate_activate_response.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/certificate_deactivate_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/certificate_deactivate_response.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/certificate_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/certificate_list_response.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/data_retention_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/data_retention_update_params.rbs +3 -3
- data/sig/openai/models/admin/organization/projects/group_create_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/group_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/group_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/group_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/group_retrieve_params.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/groups/role_create_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/groups/role_create_response.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/groups/role_delete_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/groups/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/groups/role_retrieve_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/hosted_tool_permission_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/hosted_tool_permission_update_params.rbs +12 -12
- data/sig/openai/models/admin/organization/projects/model_permission_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/model_permission_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/model_permission_update_params.rbs +3 -3
- data/sig/openai/models/admin/organization/projects/project_api_key.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/project_data_retention.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_group.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_model_permissions.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_model_permissions_deleted.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_rate_limit.rbs +10 -10
- data/sig/openai/models/admin/organization/projects/project_service_account.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_spend_alert.rbs +6 -6
- data/sig/openai/models/admin/organization/projects/project_spend_alert_deleted.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_spend_limit.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_spend_limit_deleted.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/project_user.rbs +6 -6
- data/sig/openai/models/admin/organization/projects/rate_limit_list_rate_limits_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/rate_limit_update_rate_limit_params.rbs +14 -14
- data/sig/openai/models/admin/organization/projects/role_create_params.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/role_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/role_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/role_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/role_update_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/service_account_create_params.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/service_account_create_response.rbs +4 -4
- data/sig/openai/models/admin/organization/projects/service_account_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/service_account_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/service_account_list_params.rbs +9 -5
- data/sig/openai/models/admin/organization/projects/service_account_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/service_account_update_params.rbs +6 -6
- data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_params.rbs +11 -6
- data/sig/openai/models/admin/organization/projects/service_accounts/api_key_create_response.rbs +9 -4
- data/sig/openai/models/admin/organization/projects/spend_alert_create_params.rbs +7 -7
- data/sig/openai/models/admin/organization/projects/spend_alert_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/spend_alert_list_params.rbs +10 -10
- data/sig/openai/models/admin/organization/projects/spend_alert_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/spend_alert_update_params.rbs +7 -7
- data/sig/openai/models/admin/organization/projects/spend_limit_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/spend_limit_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/spend_limit_update_params.rbs +3 -3
- data/sig/openai/models/admin/organization/projects/user_create_params.rbs +6 -6
- data/sig/openai/models/admin/organization/projects/user_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/user_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/user_list_params.rbs +9 -5
- data/sig/openai/models/admin/organization/projects/user_retrieve_params.rbs +6 -3
- data/sig/openai/models/admin/organization/projects/user_update_params.rbs +8 -4
- data/sig/openai/models/admin/organization/projects/users/role_create_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/users/role_create_response.rbs +2 -2
- data/sig/openai/models/admin/organization/projects/users/role_delete_params.rbs +7 -3
- data/sig/openai/models/admin/organization/projects/users/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/projects/users/role_retrieve_params.rbs +7 -3
- data/sig/openai/models/admin/organization/role.rbs +2 -2
- data/sig/openai/models/admin/organization/role_create_params.rbs +4 -4
- data/sig/openai/models/admin/organization/role_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/role_delete_response.rbs +6 -2
- data/sig/openai/models/admin/organization/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/role_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/role_update_params.rbs +8 -8
- data/sig/openai/models/admin/organization/spend_alert_create_params.rbs +7 -7
- data/sig/openai/models/admin/organization/spend_alert_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/spend_alert_list_params.rbs +10 -10
- data/sig/openai/models/admin/organization/spend_alert_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/spend_alert_update_params.rbs +7 -7
- data/sig/openai/models/admin/organization/spend_limit_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/spend_limit_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/spend_limit_update_params.rbs +3 -3
- data/sig/openai/models/admin/organization/usage_audio_speeches_params.rbs +20 -20
- data/sig/openai/models/admin/organization/usage_audio_speeches_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_params.rbs +20 -20
- data/sig/openai/models/admin/organization/usage_audio_transcriptions_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_params.rbs +14 -14
- data/sig/openai/models/admin/organization/usage_code_interpreter_sessions_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_completions_params.rbs +22 -22
- data/sig/openai/models/admin/organization/usage_completions_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_costs_params.rbs +18 -18
- data/sig/openai/models/admin/organization/usage_costs_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_embeddings_params.rbs +20 -20
- data/sig/openai/models/admin/organization/usage_embeddings_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_file_search_calls_params.rbs +20 -20
- data/sig/openai/models/admin/organization/usage_file_search_calls_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_images_params.rbs +24 -24
- data/sig/openai/models/admin/organization/usage_images_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_moderations_params.rbs +20 -20
- data/sig/openai/models/admin/organization/usage_moderations_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_vector_stores_params.rbs +14 -14
- data/sig/openai/models/admin/organization/usage_vector_stores_response.rbs +142 -142
- data/sig/openai/models/admin/organization/usage_web_search_calls_params.rbs +22 -22
- data/sig/openai/models/admin/organization/usage_web_search_calls_response.rbs +142 -142
- data/sig/openai/models/admin/organization/user_delete_params.rbs +2 -2
- data/sig/openai/models/admin/organization/user_delete_response.rbs +2 -2
- data/sig/openai/models/admin/organization/user_list_params.rbs +10 -6
- data/sig/openai/models/admin/organization/user_retrieve_params.rbs +2 -2
- data/sig/openai/models/admin/organization/user_update_params.rbs +10 -10
- data/sig/openai/models/admin/organization/users/role_create_params.rbs +6 -3
- data/sig/openai/models/admin/organization/users/role_create_response.rbs +2 -2
- data/sig/openai/models/admin/organization/users/role_delete_params.rbs +6 -3
- data/sig/openai/models/admin/organization/users/role_list_params.rbs +8 -8
- data/sig/openai/models/admin/organization/users/role_retrieve_params.rbs +6 -3
- data/sig/openai/models/audio/speech_create_params.rbs +10 -10
- data/sig/openai/models/audio/transcription.rbs +19 -18
- data/sig/openai/models/audio/transcription_create_params.rbs +30 -30
- data/sig/openai/models/audio/transcription_diarized.rbs +12 -12
- data/sig/openai/models/audio/transcription_diarized_segment.rbs +2 -2
- data/sig/openai/models/audio/transcription_text_delta_event.rbs +10 -10
- data/sig/openai/models/audio/transcription_text_done_event.rbs +18 -18
- data/sig/openai/models/audio/transcription_text_segment_event.rbs +2 -2
- data/sig/openai/models/audio/transcription_verbose.rbs +8 -8
- data/sig/openai/models/audio/translation_create_params.rbs +8 -8
- data/sig/openai/models/audio/translation_verbose.rbs +2 -2
- data/sig/openai/models/auto_file_chunking_strategy_param.rbs +2 -2
- data/sig/openai/models/batch.rbs +34 -34
- data/sig/openai/models/batch_cancel_params.rbs +2 -2
- data/sig/openai/models/batch_create_params.rbs +8 -8
- data/sig/openai/models/batch_error.rbs +5 -5
- data/sig/openai/models/batch_list_params.rbs +8 -5
- data/sig/openai/models/batch_retrieve_params.rbs +2 -2
- data/sig/openai/models/beta/assistant.rbs +18 -18
- data/sig/openai/models/beta/assistant_create_params.rbs +42 -42
- data/sig/openai/models/beta/assistant_delete_params.rbs +2 -2
- data/sig/openai/models/beta/assistant_deleted.rbs +2 -2
- data/sig/openai/models/beta/assistant_list_params.rbs +10 -10
- data/sig/openai/models/beta/assistant_retrieve_params.rbs +2 -2
- data/sig/openai/models/beta/assistant_stream_event.rbs +53 -50
- data/sig/openai/models/beta/assistant_tool_choice.rbs +2 -2
- data/sig/openai/models/beta/assistant_update_params.rbs +32 -32
- data/sig/openai/models/beta/beta_apply_patch_tool.rbs +4 -4
- data/sig/openai/models/beta/beta_compacted_response.rbs +2 -2
- data/sig/openai/models/beta/beta_computer_action.rbs +25 -25
- data/sig/openai/models/beta/beta_computer_tool.rbs +2 -2
- data/sig/openai/models/beta/beta_computer_use_preview_tool.rbs +2 -2
- data/sig/openai/models/beta/beta_container_auto.rbs +10 -10
- data/sig/openai/models/beta/beta_container_network_policy_allowlist.rbs +4 -4
- data/sig/openai/models/beta/beta_container_network_policy_disabled.rbs +2 -2
- data/sig/openai/models/beta/beta_container_reference.rbs +2 -2
- data/sig/openai/models/beta/beta_custom_tool.rbs +21 -14
- data/sig/openai/models/beta/beta_easy_input_message.rbs +4 -4
- data/sig/openai/models/beta/beta_file_search_tool.rbs +14 -14
- data/sig/openai/models/beta/beta_function_shell_tool.rbs +6 -6
- data/sig/openai/models/beta/beta_function_tool.rbs +17 -10
- data/sig/openai/models/beta/beta_inline_skill.rbs +2 -2
- data/sig/openai/models/beta/beta_inline_skill_source.rbs +3 -3
- data/sig/openai/models/beta/beta_local_environment.rbs +3 -3
- data/sig/openai/models/beta/beta_mcp_tool_call_error.rbs +6 -6
- data/sig/openai/models/beta/beta_namespace_tool.rbs +23 -16
- data/sig/openai/models/beta/beta_response.rbs +191 -69
- data/sig/openai/models/beta/beta_response_apply_patch_tool_call.rbs +18 -18
- data/sig/openai/models/beta/beta_response_apply_patch_tool_call_output.rbs +14 -14
- data/sig/openai/models/beta/beta_response_audio_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_audio_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_audio_transcript_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_audio_transcript_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_call_code_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_call_code_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_call_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_call_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_call_interpreting_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_code_interpreter_tool_call.rbs +8 -8
- data/sig/openai/models/beta/beta_response_compaction_item.rbs +6 -6
- data/sig/openai/models/beta/beta_response_compaction_item_param.rbs +6 -6
- data/sig/openai/models/beta/beta_response_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_computer_tool_call.rbs +8 -8
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_item.rbs +10 -10
- data/sig/openai/models/beta/beta_response_computer_tool_call_output_screenshot.rbs +4 -4
- data/sig/openai/models/beta/beta_response_configuration_update_item.rbs +91 -0
- data/sig/openai/models/beta/beta_response_configuration_update_item_param.rbs +87 -0
- data/sig/openai/models/beta/beta_response_container_reference.rbs +2 -2
- data/sig/openai/models/beta/beta_response_content.rbs +2 -2
- data/sig/openai/models/beta/beta_response_content_part_added_event.rbs +6 -6
- data/sig/openai/models/beta/beta_response_content_part_done_event.rbs +6 -6
- data/sig/openai/models/beta/beta_response_created_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_custom_tool_call.rbs +21 -14
- data/sig/openai/models/beta/beta_response_custom_tool_call_input_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_custom_tool_call_input_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_custom_tool_call_item.rbs +13 -10
- data/sig/openai/models/beta/beta_response_custom_tool_call_output.rbs +12 -12
- data/sig/openai/models/beta/beta_response_custom_tool_call_output_item.rbs +8 -8
- data/sig/openai/models/beta/beta_response_error.rbs +82 -3
- data/sig/openai/models/beta/beta_response_error_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_failed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_file_search_call_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_file_search_call_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_file_search_call_searching_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_file_search_tool_call.rbs +16 -16
- data/sig/openai/models/beta/beta_response_format_text_config.rbs +4 -4
- data/sig/openai/models/beta/beta_response_format_text_json_schema_config.rbs +6 -6
- data/sig/openai/models/beta/beta_response_function_call_arguments_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_function_call_arguments_done_event.rbs +4 -9
- data/sig/openai/models/beta/beta_response_function_shell_call_output_content.rbs +4 -4
- data/sig/openai/models/beta/beta_response_function_shell_tool_call.rbs +12 -12
- data/sig/openai/models/beta/beta_response_function_shell_tool_call_output.rbs +18 -18
- data/sig/openai/models/beta/beta_response_function_tool_call.rbs +23 -16
- data/sig/openai/models/beta/beta_response_function_tool_call_item.rbs +13 -10
- data/sig/openai/models/beta/beta_response_function_tool_call_output_item.rbs +18 -18
- data/sig/openai/models/beta/beta_response_function_web_search.rbs +21 -19
- data/sig/openai/models/beta/beta_response_image_gen_call_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_image_gen_call_generating_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_image_gen_call_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_image_gen_call_partial_image_event.rbs +12 -12
- data/sig/openai/models/beta/beta_response_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_incomplete_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_inject_created_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_inject_event.rbs +2 -2
- data/sig/openai/models/beta/beta_response_inject_failed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_input_audio.rbs +2 -2
- data/sig/openai/models/beta/beta_response_input_file.rbs +16 -16
- data/sig/openai/models/beta/beta_response_input_file_content.rbs +16 -16
- data/sig/openai/models/beta/beta_response_input_image.rbs +10 -10
- data/sig/openai/models/beta/beta_response_input_image_content.rbs +12 -12
- data/sig/openai/models/beta/beta_response_input_item.rbs +237 -228
- data/sig/openai/models/beta/beta_response_input_message_item.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text.rbs +6 -6
- data/sig/openai/models/beta/beta_response_input_text_content.rbs +6 -6
- data/sig/openai/models/beta/beta_response_item.rbs +93 -92
- data/sig/openai/models/beta/beta_response_local_environment.rbs +2 -2
- data/sig/openai/models/beta/beta_response_mcp_call_arguments_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_call_arguments_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_call_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_call_failed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_call_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_list_tools_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_list_tools_failed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_mcp_list_tools_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_audio.rbs +2 -2
- data/sig/openai/models/beta/beta_response_output_item.rbs +92 -92
- data/sig/openai/models/beta/beta_response_output_item_added_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_item_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_output_message.rbs +8 -8
- data/sig/openai/models/beta/beta_response_output_refusal.rbs +2 -2
- data/sig/openai/models/beta/beta_response_output_text.rbs +13 -12
- data/sig/openai/models/beta/beta_response_output_text_annotation_added_event.rbs +13 -12
- data/sig/openai/models/beta/beta_response_prompt.rbs +4 -4
- data/sig/openai/models/beta/beta_response_queued_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_reasoning_item.rbs +14 -14
- data/sig/openai/models/beta/beta_response_reasoning_summary_part_added_event.rbs +6 -6
- data/sig/openai/models/beta/beta_response_reasoning_summary_part_done_event.rbs +8 -8
- data/sig/openai/models/beta/beta_response_reasoning_summary_text_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_reasoning_summary_text_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_reasoning_text_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_reasoning_text_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_refusal_delta_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_refusal_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_shell_call_command_added_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_shell_call_command_delta_event.rbs +6 -6
- data/sig/openai/models/beta/beta_response_shell_call_command_done_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_shell_call_output_content_delta_event.rbs +6 -6
- data/sig/openai/models/beta/beta_response_shell_call_output_content_done_event.rbs +10 -10
- data/sig/openai/models/beta/beta_response_steer_accepted_event.rbs +53 -0
- data/sig/openai/models/beta/beta_response_steer_error_code.rbs +31 -0
- data/sig/openai/models/beta/beta_response_steer_event.rbs +34 -0
- data/sig/openai/models/beta/beta_response_steer_failed_event.rbs +102 -0
- data/sig/openai/models/beta/beta_response_steer_input.rbs +214 -0
- data/sig/openai/models/beta/beta_response_steer_input_content.rbs +18 -0
- data/sig/openai/models/beta/beta_response_steer_pending_event.rbs +63 -0
- data/sig/openai/models/beta/beta_response_steer_pending_reason.rbs +16 -0
- data/sig/openai/models/beta/beta_response_steer_required_input.rbs +161 -0
- data/sig/openai/models/beta/beta_response_text_config.rbs +4 -4
- data/sig/openai/models/beta/beta_response_text_delta_event.rbs +8 -8
- data/sig/openai/models/beta/beta_response_text_done_event.rbs +8 -8
- data/sig/openai/models/beta/beta_response_tool_search_call.rbs +6 -6
- data/sig/openai/models/beta/beta_response_tool_search_output_item.rbs +6 -6
- data/sig/openai/models/beta/beta_response_tool_search_output_item_param.rbs +12 -12
- data/sig/openai/models/beta/beta_response_web_search_call_completed_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_web_search_call_in_progress_event.rbs +4 -4
- data/sig/openai/models/beta/beta_response_web_search_call_searching_event.rbs +4 -4
- data/sig/openai/models/beta/beta_responses_client_event.rbs +108 -97
- data/sig/openai/models/beta/beta_responses_server_event.rbs +444 -370
- data/sig/openai/models/beta/beta_skill_reference.rbs +3 -3
- data/sig/openai/models/beta/beta_tool.rbs +80 -74
- data/sig/openai/models/beta/beta_tool_choice_allowed.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_choice_apply_patch.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_choice_custom.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_choice_function.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_choice_mcp.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_choice_shell.rbs +2 -2
- data/sig/openai/models/beta/beta_tool_search_tool.rbs +8 -8
- data/sig/openai/models/beta/beta_web_search_preview_tool.rbs +16 -16
- data/sig/openai/models/beta/beta_web_search_tool.rbs +20 -20
- data/sig/openai/models/beta/chatkit/chat_session.rbs +2 -2
- data/sig/openai/models/beta/chatkit/chat_session_chatkit_configuration_param.rbs +14 -14
- data/sig/openai/models/beta/chatkit/chat_session_expires_after_param.rbs +2 -2
- data/sig/openai/models/beta/chatkit/chat_session_rate_limits_param.rbs +2 -2
- data/sig/openai/models/beta/chatkit/chat_session_workflow_param.rbs +8 -8
- data/sig/openai/models/beta/chatkit/chatkit_response_output_text.rbs +10 -10
- data/sig/openai/models/beta/chatkit/chatkit_thread.rbs +8 -8
- data/sig/openai/models/beta/chatkit/chatkit_thread_assistant_message_item.rbs +4 -4
- data/sig/openai/models/beta/chatkit/chatkit_thread_item_list.rbs +14 -14
- data/sig/openai/models/beta/chatkit/chatkit_thread_user_message_item.rbs +8 -8
- data/sig/openai/models/beta/chatkit/chatkit_widget_item.rbs +4 -4
- data/sig/openai/models/beta/chatkit/session_cancel_params.rbs +2 -2
- data/sig/openai/models/beta/chatkit/session_create_params.rbs +8 -8
- data/sig/openai/models/beta/chatkit/thread_delete_params.rbs +2 -2
- data/sig/openai/models/beta/chatkit/thread_delete_response.rbs +2 -2
- data/sig/openai/models/beta/chatkit/thread_list_items_params.rbs +10 -10
- data/sig/openai/models/beta/chatkit/thread_list_params.rbs +12 -12
- data/sig/openai/models/beta/chatkit/thread_retrieve_params.rbs +2 -2
- data/sig/openai/models/beta/code_interpreter_tool.rbs +2 -2
- data/sig/openai/models/beta/file_search_tool.rbs +10 -10
- data/sig/openai/models/beta/function_tool.rbs +2 -2
- data/sig/openai/models/beta/message_stream_event.rbs +10 -10
- data/sig/openai/models/beta/response_cancel_params.rbs +4 -4
- data/sig/openai/models/beta/response_compact_params.rbs +25 -23
- data/sig/openai/models/beta/response_create_params.rbs +102 -95
- data/sig/openai/models/beta/response_delete_params.rbs +4 -4
- data/sig/openai/models/beta/response_retrieve_params.rbs +10 -10
- data/sig/openai/models/beta/responses/beta_response_item_list.rbs +2 -2
- data/sig/openai/models/beta/responses/input_item_list_params.rbs +12 -12
- data/sig/openai/models/beta/responses/input_token_count_params.rbs +44 -44
- data/sig/openai/models/beta/responses/input_token_count_response.rbs +2 -2
- data/sig/openai/models/beta/run_step_stream_event.rbs +14 -14
- data/sig/openai/models/beta/run_stream_event.rbs +23 -20
- data/sig/openai/models/beta/thread.rbs +10 -10
- data/sig/openai/models/beta/thread_create_and_run_params.rbs +76 -76
- data/sig/openai/models/beta/thread_create_params.rbs +38 -38
- data/sig/openai/models/beta/thread_delete_params.rbs +2 -2
- data/sig/openai/models/beta/thread_deleted.rbs +6 -2
- data/sig/openai/models/beta/thread_retrieve_params.rbs +2 -2
- data/sig/openai/models/beta/thread_stream_event.rbs +7 -3
- data/sig/openai/models/beta/thread_update_params.rbs +14 -14
- data/sig/openai/models/beta/threads/file_citation_annotation.rbs +2 -2
- data/sig/openai/models/beta/threads/file_citation_delta_annotation.rbs +12 -12
- data/sig/openai/models/beta/threads/file_path_annotation.rbs +2 -2
- data/sig/openai/models/beta/threads/file_path_delta_annotation.rbs +12 -12
- data/sig/openai/models/beta/threads/image_file.rbs +2 -2
- data/sig/openai/models/beta/threads/image_file_content_block.rbs +2 -2
- data/sig/openai/models/beta/threads/image_file_delta.rbs +4 -4
- data/sig/openai/models/beta/threads/image_file_delta_block.rbs +4 -4
- data/sig/openai/models/beta/threads/image_url.rbs +2 -2
- data/sig/openai/models/beta/threads/image_url_content_block.rbs +2 -2
- data/sig/openai/models/beta/threads/image_url_delta.rbs +4 -4
- data/sig/openai/models/beta/threads/image_url_delta_block.rbs +4 -4
- data/sig/openai/models/beta/threads/message.rbs +8 -8
- data/sig/openai/models/beta/threads/message_create_params.rbs +12 -12
- data/sig/openai/models/beta/threads/message_delete_params.rbs +6 -3
- data/sig/openai/models/beta/threads/message_deleted.rbs +2 -2
- data/sig/openai/models/beta/threads/message_delta.rbs +4 -4
- data/sig/openai/models/beta/threads/message_delta_event.rbs +2 -2
- data/sig/openai/models/beta/threads/message_list_params.rbs +12 -12
- data/sig/openai/models/beta/threads/message_retrieve_params.rbs +6 -3
- data/sig/openai/models/beta/threads/message_update_params.rbs +4 -4
- data/sig/openai/models/beta/threads/refusal_content_block.rbs +2 -2
- data/sig/openai/models/beta/threads/refusal_delta_block.rbs +2 -2
- data/sig/openai/models/beta/threads/required_action_function_tool_call.rbs +2 -2
- data/sig/openai/models/beta/threads/run.rbs +12 -12
- data/sig/openai/models/beta/threads/run_cancel_params.rbs +6 -3
- data/sig/openai/models/beta/threads/run_create_params.rbs +46 -46
- data/sig/openai/models/beta/threads/run_list_params.rbs +10 -10
- data/sig/openai/models/beta/threads/run_retrieve_params.rbs +6 -3
- data/sig/openai/models/beta/threads/run_submit_tool_outputs_params.rbs +5 -5
- data/sig/openai/models/beta/threads/run_update_params.rbs +4 -4
- data/sig/openai/models/beta/threads/runs/code_interpreter_logs.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/code_interpreter_output_image.rbs +6 -6
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call.rbs +6 -6
- data/sig/openai/models/beta/threads/runs/code_interpreter_tool_call_delta.rbs +10 -10
- data/sig/openai/models/beta/threads/runs/file_search_tool_call.rbs +12 -12
- data/sig/openai/models/beta/threads/runs/file_search_tool_call_delta.rbs +8 -3
- data/sig/openai/models/beta/threads/runs/function_tool_call.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/function_tool_call_delta.rbs +11 -10
- data/sig/openai/models/beta/threads/runs/message_creation_step_details.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/run_step.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/run_step_delta.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/run_step_delta_event.rbs +2 -2
- data/sig/openai/models/beta/threads/runs/run_step_delta_message_delta.rbs +6 -6
- data/sig/openai/models/beta/threads/runs/step_list_params.rbs +12 -12
- data/sig/openai/models/beta/threads/runs/step_retrieve_params.rbs +4 -4
- data/sig/openai/models/beta/threads/runs/tool_call_delta_object.rbs +4 -4
- data/sig/openai/models/beta/threads/runs/tool_calls_step_details.rbs +2 -2
- data/sig/openai/models/beta/threads/text_content_block.rbs +2 -2
- data/sig/openai/models/beta/threads/text_content_block_param.rbs +2 -2
- data/sig/openai/models/beta/threads/text_delta.rbs +4 -4
- data/sig/openai/models/beta/threads/text_delta_block.rbs +4 -4
- data/sig/openai/models/chat/chat_completion.rbs +24 -24
- data/sig/openai/models/chat/chat_completion_allowed_tool_choice.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_assistant_message_param.rbs +14 -14
- data/sig/openai/models/chat/chat_completion_chunk.rbs +46 -46
- data/sig/openai/models/chat/chat_completion_content_part.rbs +11 -10
- data/sig/openai/models/chat/chat_completion_content_part_image.rbs +8 -8
- data/sig/openai/models/chat/chat_completion_content_part_input_audio.rbs +6 -6
- data/sig/openai/models/chat/chat_completion_content_part_refusal.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_content_part_text.rbs +6 -6
- data/sig/openai/models/chat/chat_completion_custom_tool.rbs +10 -10
- data/sig/openai/models/chat/chat_completion_deleted.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_developer_message_param.rbs +4 -4
- data/sig/openai/models/chat/chat_completion_function_message_param.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_function_tool.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_message.rbs +12 -12
- data/sig/openai/models/chat/chat_completion_message_custom_tool_call.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_message_function_tool_call.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_named_tool_choice.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_named_tool_choice_custom.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_prediction_content.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_store_message.rbs +12 -12
- data/sig/openai/models/chat/chat_completion_stream_options.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_system_message_param.rbs +4 -4
- data/sig/openai/models/chat/chat_completion_tool_message_param.rbs +2 -2
- data/sig/openai/models/chat/chat_completion_user_message_param.rbs +4 -4
- data/sig/openai/models/chat/completion_create_params.rbs +98 -98
- data/sig/openai/models/chat/completion_delete_params.rbs +2 -2
- data/sig/openai/models/chat/completion_list_params.rbs +12 -12
- data/sig/openai/models/chat/completion_retrieve_params.rbs +2 -2
- data/sig/openai/models/chat/completion_update_params.rbs +6 -3
- data/sig/openai/models/chat/completions/message_list_params.rbs +8 -8
- data/sig/openai/models/chat_model.rbs +3 -1
- data/sig/openai/models/completion.rbs +6 -6
- data/sig/openai/models/completion_choice.rbs +8 -8
- data/sig/openai/models/completion_create_params.rbs +32 -32
- data/sig/openai/models/completion_usage.rbs +24 -24
- data/sig/openai/models/container_create_params.rbs +12 -12
- data/sig/openai/models/container_create_response.rbs +14 -14
- data/sig/openai/models/container_delete_params.rbs +2 -2
- data/sig/openai/models/container_list_params.rbs +10 -10
- data/sig/openai/models/container_list_response.rbs +14 -14
- data/sig/openai/models/container_retrieve_params.rbs +2 -2
- data/sig/openai/models/container_retrieve_response.rbs +14 -14
- data/sig/openai/models/containers/file_create_params.rbs +6 -6
- data/sig/openai/models/containers/file_create_response.rbs +2 -2
- data/sig/openai/models/containers/file_delete_params.rbs +6 -3
- data/sig/openai/models/containers/file_list_params.rbs +8 -8
- data/sig/openai/models/containers/file_list_response.rbs +2 -2
- data/sig/openai/models/containers/file_retrieve_params.rbs +6 -3
- data/sig/openai/models/containers/file_retrieve_response.rbs +2 -2
- data/sig/openai/models/containers/files/content_retrieve_params.rbs +6 -3
- data/sig/openai/models/content_provenance_check.rbs +4 -4
- data/sig/openai/models/content_provenance_check_create_params.rbs +5 -3
- data/sig/openai/models/conversations/computer_screenshot_content.rbs +6 -6
- data/sig/openai/models/conversations/conversation.rbs +2 -2
- data/sig/openai/models/conversations/conversation_create_params.rbs +6 -6
- data/sig/openai/models/conversations/conversation_delete_params.rbs +2 -2
- data/sig/openai/models/conversations/conversation_deleted.rbs +2 -2
- data/sig/openai/models/conversations/conversation_deleted_resource.rbs +2 -2
- data/sig/openai/models/conversations/conversation_item.rbs +47 -46
- data/sig/openai/models/conversations/conversation_item_list.rbs +2 -2
- data/sig/openai/models/conversations/conversation_retrieve_params.rbs +2 -2
- data/sig/openai/models/conversations/conversation_update_params.rbs +6 -3
- data/sig/openai/models/conversations/item_create_params.rbs +4 -4
- data/sig/openai/models/conversations/item_delete_params.rbs +6 -3
- data/sig/openai/models/conversations/item_list_params.rbs +10 -10
- data/sig/openai/models/conversations/item_retrieve_params.rbs +4 -4
- data/sig/openai/models/conversations/message.rbs +6 -6
- data/sig/openai/models/conversations/summary_text_content.rbs +2 -2
- data/sig/openai/models/conversations/text_content.rbs +2 -2
- data/sig/openai/models/create_embedding_response.rbs +2 -2
- data/sig/openai/models/custom_tool_input_format.rbs +4 -4
- data/sig/openai/models/deleted_skill.rbs +3 -2
- data/sig/openai/models/embedding.rbs +2 -2
- data/sig/openai/models/embedding_create_params.rbs +8 -8
- data/sig/openai/models/error_object.rbs +82 -3
- data/sig/openai/models/eval_create_params.rbs +40 -40
- data/sig/openai/models/eval_create_response.rbs +22 -22
- data/sig/openai/models/eval_custom_data_source_config.rbs +2 -2
- data/sig/openai/models/eval_delete_params.rbs +2 -2
- data/sig/openai/models/eval_list_params.rbs +10 -10
- data/sig/openai/models/eval_list_response.rbs +22 -22
- data/sig/openai/models/eval_retrieve_params.rbs +2 -2
- data/sig/openai/models/eval_retrieve_response.rbs +22 -22
- data/sig/openai/models/eval_stored_completions_data_source_config.rbs +4 -4
- data/sig/openai/models/eval_update_params.rbs +9 -5
- data/sig/openai/models/eval_update_response.rbs +22 -22
- data/sig/openai/models/evals/create_eval_completions_run_data_source.rbs +49 -49
- data/sig/openai/models/evals/create_eval_jsonl_run_data_source.rbs +8 -8
- data/sig/openai/models/evals/run_cancel_params.rbs +6 -3
- data/sig/openai/models/evals/run_cancel_response.rbs +66 -66
- data/sig/openai/models/evals/run_create_params.rbs +68 -68
- data/sig/openai/models/evals/run_create_response.rbs +66 -66
- data/sig/openai/models/evals/run_delete_params.rbs +6 -3
- data/sig/openai/models/evals/run_delete_response.rbs +2 -2
- data/sig/openai/models/evals/run_list_params.rbs +10 -10
- data/sig/openai/models/evals/run_list_response.rbs +66 -66
- data/sig/openai/models/evals/run_retrieve_params.rbs +6 -3
- data/sig/openai/models/evals/run_retrieve_response.rbs +66 -66
- data/sig/openai/models/evals/runs/output_item_list_params.rbs +10 -10
- data/sig/openai/models/evals/runs/output_item_list_response.rbs +8 -8
- data/sig/openai/models/evals/runs/output_item_retrieve_params.rbs +7 -3
- data/sig/openai/models/evals/runs/output_item_retrieve_response.rbs +8 -8
- data/sig/openai/models/file_content_params.rbs +2 -2
- data/sig/openai/models/file_create_params.rbs +6 -6
- data/sig/openai/models/file_delete_params.rbs +2 -2
- data/sig/openai/models/file_deleted.rbs +2 -2
- data/sig/openai/models/file_list_params.rbs +10 -10
- data/sig/openai/models/file_object.rbs +6 -6
- data/sig/openai/models/file_retrieve_params.rbs +2 -2
- data/sig/openai/models/fine_tuning/alpha/grader_run_params.rbs +4 -4
- data/sig/openai/models/fine_tuning/alpha/grader_validate_params.rbs +3 -3
- data/sig/openai/models/fine_tuning/alpha/grader_validate_response.rbs +2 -2
- data/sig/openai/models/fine_tuning/checkpoints/permission_create_params.rbs +6 -3
- data/sig/openai/models/fine_tuning/checkpoints/permission_create_response.rbs +2 -2
- data/sig/openai/models/fine_tuning/checkpoints/permission_delete_params.rbs +6 -3
- data/sig/openai/models/fine_tuning/checkpoints/permission_delete_response.rbs +2 -2
- data/sig/openai/models/fine_tuning/checkpoints/permission_list_params.rbs +10 -10
- data/sig/openai/models/fine_tuning/checkpoints/permission_list_response.rbs +2 -2
- data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_params.rbs +10 -10
- data/sig/openai/models/fine_tuning/checkpoints/permission_retrieve_response.rbs +8 -8
- data/sig/openai/models/fine_tuning/dpo_hyperparameters.rbs +8 -8
- data/sig/openai/models/fine_tuning/dpo_method.rbs +2 -2
- data/sig/openai/models/fine_tuning/fine_tuning_job.rbs +22 -22
- data/sig/openai/models/fine_tuning/fine_tuning_job_event.rbs +6 -6
- data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration.rbs +6 -6
- data/sig/openai/models/fine_tuning/fine_tuning_job_wandb_integration_object.rbs +2 -2
- data/sig/openai/models/fine_tuning/job_cancel_params.rbs +2 -3
- data/sig/openai/models/fine_tuning/job_create_params.rbs +36 -36
- data/sig/openai/models/fine_tuning/job_list_events_params.rbs +9 -5
- data/sig/openai/models/fine_tuning/job_list_params.rbs +10 -6
- data/sig/openai/models/fine_tuning/job_pause_params.rbs +2 -3
- data/sig/openai/models/fine_tuning/job_resume_params.rbs +2 -3
- data/sig/openai/models/fine_tuning/job_retrieve_params.rbs +2 -3
- data/sig/openai/models/fine_tuning/jobs/checkpoint_list_params.rbs +9 -5
- data/sig/openai/models/fine_tuning/jobs/fine_tuning_job_checkpoint.rbs +16 -16
- data/sig/openai/models/fine_tuning/reinforcement_hyperparameters.rbs +14 -14
- data/sig/openai/models/fine_tuning/reinforcement_method.rbs +2 -2
- data/sig/openai/models/fine_tuning/supervised_hyperparameters.rbs +6 -6
- data/sig/openai/models/fine_tuning/supervised_method.rbs +2 -2
- data/sig/openai/models/function_definition.rbs +6 -6
- data/sig/openai/models/graders/grader_input_item.rbs +5 -5
- data/sig/openai/models/graders/label_model_grader.rbs +9 -9
- data/sig/openai/models/graders/multi_grader.rbs +2 -2
- data/sig/openai/models/graders/python_grader.rbs +3 -3
- data/sig/openai/models/graders/score_model_grader.rbs +23 -23
- data/sig/openai/models/graders/string_check_grader.rbs +2 -2
- data/sig/openai/models/graders/text_similarity_grader.rbs +2 -2
- data/sig/openai/models/image.rbs +4 -4
- data/sig/openai/models/image_create_variation_params.rbs +12 -12
- data/sig/openai/models/image_edit_completed_event.rbs +2 -2
- data/sig/openai/models/image_edit_params.rbs +26 -26
- data/sig/openai/models/image_edit_partial_image_event.rbs +2 -2
- data/sig/openai/models/image_gen_completed_event.rbs +2 -2
- data/sig/openai/models/image_gen_partial_image_event.rbs +2 -2
- data/sig/openai/models/image_generate_params.rbs +26 -26
- data/sig/openai/models/image_input_reference_param.rbs +2 -2
- data/sig/openai/models/images_response.rbs +14 -14
- data/sig/openai/models/model.rbs +4 -4
- data/sig/openai/models/model_delete_params.rbs +5 -2
- data/sig/openai/models/model_list_params.rbs +2 -2
- data/sig/openai/models/model_retrieve_params.rbs +5 -2
- data/sig/openai/models/moderation_create_params.rbs +4 -4
- data/sig/openai/models/moderation_image_url_input.rbs +5 -2
- data/sig/openai/models/moderation_text_input.rbs +2 -2
- data/sig/openai/models/other_file_chunking_strategy_object.rbs +2 -2
- data/sig/openai/models/realtime/audio_transcription.rbs +12 -12
- data/sig/openai/models/realtime/call_accept_params.rbs +30 -30
- data/sig/openai/models/realtime/call_create_params.rbs +7 -4
- data/sig/openai/models/realtime/call_hangup_params.rbs +2 -2
- data/sig/openai/models/realtime/call_refer_params.rbs +6 -3
- data/sig/openai/models/realtime/call_reject_params.rbs +7 -4
- data/sig/openai/models/realtime/client_secret_create_params.rbs +10 -10
- data/sig/openai/models/realtime/conversation_created_event.rbs +6 -6
- data/sig/openai/models/realtime/conversation_item_added.rbs +4 -4
- data/sig/openai/models/realtime/conversation_item_create_event.rbs +6 -6
- data/sig/openai/models/realtime/conversation_item_created_event.rbs +4 -4
- data/sig/openai/models/realtime/conversation_item_delete_event.rbs +7 -3
- data/sig/openai/models/realtime/conversation_item_deleted_event.rbs +2 -2
- data/sig/openai/models/realtime/conversation_item_done.rbs +4 -4
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_completed_event.rbs +14 -14
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_delta_event.rbs +8 -8
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_failed_event.rbs +7 -7
- data/sig/openai/models/realtime/conversation_item_input_audio_transcription_segment.rbs +2 -2
- data/sig/openai/models/realtime/conversation_item_retrieve_event.rbs +4 -4
- data/sig/openai/models/realtime/conversation_item_truncate_event.rbs +4 -4
- data/sig/openai/models/realtime/conversation_item_truncated_event.rbs +2 -2
- data/sig/openai/models/realtime/conversation_item_with_reference.rbs +30 -30
- data/sig/openai/models/realtime/input_audio_buffer_append_event.rbs +7 -3
- data/sig/openai/models/realtime/input_audio_buffer_clear_event.rbs +5 -2
- data/sig/openai/models/realtime/input_audio_buffer_cleared_event.rbs +2 -2
- data/sig/openai/models/realtime/input_audio_buffer_commit_event.rbs +5 -2
- data/sig/openai/models/realtime/input_audio_buffer_committed_event.rbs +4 -4
- data/sig/openai/models/realtime/input_audio_buffer_dtmf_event_received_event.rbs +2 -2
- data/sig/openai/models/realtime/input_audio_buffer_speech_started_event.rbs +2 -2
- data/sig/openai/models/realtime/input_audio_buffer_speech_stopped_event.rbs +2 -2
- data/sig/openai/models/realtime/input_audio_buffer_timeout_triggered.rbs +2 -2
- data/sig/openai/models/realtime/mcp_list_tools_completed.rbs +6 -2
- data/sig/openai/models/realtime/mcp_list_tools_failed.rbs +2 -2
- data/sig/openai/models/realtime/mcp_list_tools_in_progress.rbs +2 -2
- data/sig/openai/models/realtime/output_audio_buffer_clear_event.rbs +5 -2
- data/sig/openai/models/realtime/rate_limits_updated_event.rbs +10 -10
- data/sig/openai/models/realtime/realtime_audio_config.rbs +4 -4
- data/sig/openai/models/realtime/realtime_audio_config_input.rbs +10 -10
- data/sig/openai/models/realtime/realtime_audio_config_output.rbs +6 -6
- data/sig/openai/models/realtime/realtime_audio_formats.rbs +8 -8
- data/sig/openai/models/realtime/realtime_audio_input_turn_detection.rbs +22 -22
- data/sig/openai/models/realtime/realtime_conversation_item_assistant_message.rbs +18 -18
- data/sig/openai/models/realtime/realtime_conversation_item_function_call.rbs +10 -10
- data/sig/openai/models/realtime/realtime_conversation_item_function_call_output.rbs +8 -8
- data/sig/openai/models/realtime/realtime_conversation_item_system_message.rbs +14 -14
- data/sig/openai/models/realtime/realtime_conversation_item_user_message.rbs +22 -22
- data/sig/openai/models/realtime/realtime_error.rbs +6 -6
- data/sig/openai/models/realtime/realtime_error_event.rbs +2 -2
- data/sig/openai/models/realtime/realtime_function_tool.rbs +8 -8
- data/sig/openai/models/realtime/realtime_mcp_approval_request.rbs +2 -2
- data/sig/openai/models/realtime/realtime_mcp_approval_response.rbs +4 -4
- data/sig/openai/models/realtime/realtime_mcp_list_tools.rbs +8 -8
- data/sig/openai/models/realtime/realtime_mcp_protocol_error.rbs +2 -2
- data/sig/openai/models/realtime/realtime_mcp_tool_call.rbs +8 -8
- data/sig/openai/models/realtime/realtime_mcp_tool_execution_error.rbs +2 -2
- data/sig/openai/models/realtime/realtime_mcphttp_error.rbs +2 -2
- data/sig/openai/models/realtime/realtime_reasoning.rbs +2 -2
- data/sig/openai/models/realtime/realtime_response.rbs +28 -28
- data/sig/openai/models/realtime/realtime_response_create_audio_output.rbs +6 -6
- data/sig/openai/models/realtime/realtime_response_create_mcp_tool.rbs +32 -32
- data/sig/openai/models/realtime/realtime_response_create_params.rbs +24 -24
- data/sig/openai/models/realtime/realtime_response_status.rbs +8 -8
- data/sig/openai/models/realtime/realtime_response_usage.rbs +10 -10
- data/sig/openai/models/realtime/realtime_response_usage_input_token_details.rbs +18 -14
- data/sig/openai/models/realtime/realtime_response_usage_output_token_details.rbs +2 -2
- data/sig/openai/models/realtime/realtime_server_event.rbs +8 -8
- data/sig/openai/models/realtime/realtime_session.rbs +68 -68
- data/sig/openai/models/realtime/realtime_session_create_request.rbs +28 -28
- data/sig/openai/models/realtime/realtime_session_create_response.rbs +113 -110
- data/sig/openai/models/realtime/realtime_tools_config_union.rbs +38 -32
- data/sig/openai/models/realtime/realtime_tracing_config.rbs +4 -4
- data/sig/openai/models/realtime/realtime_transcription_session_audio.rbs +2 -2
- data/sig/openai/models/realtime/realtime_transcription_session_audio_input.rbs +10 -10
- data/sig/openai/models/realtime/realtime_transcription_session_audio_input_turn_detection.rbs +22 -22
- data/sig/openai/models/realtime/realtime_transcription_session_create_request.rbs +6 -6
- data/sig/openai/models/realtime/realtime_transcription_session_create_response.rbs +20 -20
- data/sig/openai/models/realtime/realtime_transcription_session_turn_detection.rbs +8 -8
- data/sig/openai/models/realtime/realtime_translation_client_secret_create_request.rbs +6 -6
- data/sig/openai/models/realtime/realtime_translation_input_audio_buffer_append_event.rbs +4 -4
- data/sig/openai/models/realtime/realtime_translation_input_transcript_delta_event.rbs +4 -4
- data/sig/openai/models/realtime/realtime_translation_output_audio_delta_event.rbs +10 -10
- data/sig/openai/models/realtime/realtime_translation_output_transcript_delta_event.rbs +4 -4
- data/sig/openai/models/realtime/realtime_translation_session.rbs +12 -12
- data/sig/openai/models/realtime/realtime_translation_session_close_event.rbs +2 -2
- data/sig/openai/models/realtime/realtime_translation_session_closed_event.rbs +2 -2
- data/sig/openai/models/realtime/realtime_translation_session_create_request.rbs +12 -12
- data/sig/openai/models/realtime/realtime_translation_session_created_event.rbs +2 -2
- data/sig/openai/models/realtime/realtime_translation_session_update_event.rbs +4 -4
- data/sig/openai/models/realtime/realtime_translation_session_update_request.rbs +12 -12
- data/sig/openai/models/realtime/realtime_translation_session_updated_event.rbs +2 -2
- data/sig/openai/models/realtime/realtime_truncation_retention_ratio.rbs +6 -6
- data/sig/openai/models/realtime/response_audio_delta_event.rbs +2 -2
- data/sig/openai/models/realtime/response_audio_done_event.rbs +2 -2
- data/sig/openai/models/realtime/response_audio_transcript_delta_event.rbs +2 -2
- data/sig/openai/models/realtime/response_audio_transcript_done_event.rbs +2 -2
- data/sig/openai/models/realtime/response_cancel_event.rbs +4 -4
- data/sig/openai/models/realtime/response_content_part_added_event.rbs +10 -10
- data/sig/openai/models/realtime/response_content_part_done_event.rbs +10 -10
- data/sig/openai/models/realtime/response_create_event.rbs +6 -6
- data/sig/openai/models/realtime/response_created_event.rbs +2 -2
- data/sig/openai/models/realtime/response_done_event.rbs +2 -2
- data/sig/openai/models/realtime/response_function_call_arguments_delta_event.rbs +2 -2
- data/sig/openai/models/realtime/response_function_call_arguments_done_event.rbs +2 -2
- data/sig/openai/models/realtime/response_mcp_call_arguments_delta.rbs +4 -4
- data/sig/openai/models/realtime/response_mcp_call_arguments_done.rbs +2 -2
- data/sig/openai/models/realtime/response_mcp_call_completed.rbs +2 -2
- data/sig/openai/models/realtime/response_mcp_call_failed.rbs +2 -2
- data/sig/openai/models/realtime/response_mcp_call_in_progress.rbs +2 -2
- data/sig/openai/models/realtime/response_output_item_added_event.rbs +2 -2
- data/sig/openai/models/realtime/response_output_item_done_event.rbs +2 -2
- data/sig/openai/models/realtime/response_text_delta_event.rbs +2 -2
- data/sig/openai/models/realtime/response_text_done_event.rbs +2 -2
- data/sig/openai/models/realtime/session_created_event.rbs +2 -2
- data/sig/openai/models/realtime/session_update_event.rbs +4 -4
- data/sig/openai/models/realtime/session_updated_event.rbs +2 -2
- data/sig/openai/models/realtime/transcription_session_update.rbs +24 -24
- data/sig/openai/models/realtime/transcription_session_updated_event.rbs +18 -18
- data/sig/openai/models/reasoning.rbs +10 -10
- data/sig/openai/models/response_format_json_object.rbs +2 -2
- data/sig/openai/models/response_format_json_schema.rbs +8 -8
- data/sig/openai/models/response_format_text.rbs +2 -2
- data/sig/openai/models/response_format_text_grammar.rbs +2 -2
- data/sig/openai/models/response_format_text_python.rbs +2 -2
- data/sig/openai/models/responses/apply_patch_tool.rbs +4 -4
- data/sig/openai/models/responses/compacted_response.rbs +2 -2
- data/sig/openai/models/responses/computer_action.rbs +25 -25
- data/sig/openai/models/responses/computer_tool.rbs +2 -2
- data/sig/openai/models/responses/computer_use_preview_tool.rbs +2 -2
- data/sig/openai/models/responses/container_auto.rbs +10 -10
- data/sig/openai/models/responses/container_network_policy_allowlist.rbs +4 -4
- data/sig/openai/models/responses/container_network_policy_disabled.rbs +2 -2
- data/sig/openai/models/responses/container_reference.rbs +2 -2
- data/sig/openai/models/responses/custom_tool.rbs +17 -10
- data/sig/openai/models/responses/easy_input_message.rbs +4 -4
- data/sig/openai/models/responses/file_search_tool.rbs +14 -14
- data/sig/openai/models/responses/function_shell_tool.rbs +6 -6
- data/sig/openai/models/responses/function_tool.rbs +17 -10
- data/sig/openai/models/responses/inline_skill.rbs +2 -2
- data/sig/openai/models/responses/inline_skill_source.rbs +3 -3
- data/sig/openai/models/responses/input_item_list_params.rbs +10 -10
- data/sig/openai/models/responses/input_token_count_params.rbs +32 -32
- data/sig/openai/models/responses/input_token_count_response.rbs +2 -2
- data/sig/openai/models/responses/local_environment.rbs +3 -3
- data/sig/openai/models/responses/mcp_tool_call_error.rbs +6 -6
- data/sig/openai/models/responses/namespace_tool.rbs +23 -16
- data/sig/openai/models/responses/response.rbs +178 -58
- data/sig/openai/models/responses/response_apply_patch_tool_call.rbs +16 -16
- data/sig/openai/models/responses/response_apply_patch_tool_call_output.rbs +12 -12
- data/sig/openai/models/responses/response_audio_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_audio_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_audio_transcript_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_audio_transcript_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_cancel_params.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_call_code_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_call_code_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_call_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_call_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_call_interpreting_event.rbs +2 -2
- data/sig/openai/models/responses/response_code_interpreter_tool_call.rbs +6 -6
- data/sig/openai/models/responses/response_compact_params.rbs +23 -21
- data/sig/openai/models/responses/response_compaction_item.rbs +4 -4
- data/sig/openai/models/responses/response_compaction_item_param.rbs +3 -3
- data/sig/openai/models/responses/response_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_computer_tool_call.rbs +31 -31
- data/sig/openai/models/responses/response_computer_tool_call_output_item.rbs +8 -8
- data/sig/openai/models/responses/response_computer_tool_call_output_screenshot.rbs +4 -4
- data/sig/openai/models/responses/response_configuration_update_item.rbs +46 -0
- data/sig/openai/models/responses/response_configuration_update_item_param.rbs +46 -0
- data/sig/openai/models/responses/response_container_reference.rbs +2 -2
- data/sig/openai/models/responses/response_content.rbs +2 -2
- data/sig/openai/models/responses/response_content_part_added_event.rbs +4 -4
- data/sig/openai/models/responses/response_content_part_done_event.rbs +4 -4
- data/sig/openai/models/responses/response_create_params.rbs +83 -78
- data/sig/openai/models/responses/response_created_event.rbs +2 -2
- data/sig/openai/models/responses/response_custom_tool_call.rbs +19 -12
- data/sig/openai/models/responses/response_custom_tool_call_input_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_custom_tool_call_input_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_custom_tool_call_item.rbs +11 -8
- data/sig/openai/models/responses/response_custom_tool_call_output.rbs +10 -10
- data/sig/openai/models/responses/response_custom_tool_call_output_item.rbs +6 -6
- data/sig/openai/models/responses/response_delete_params.rbs +2 -2
- data/sig/openai/models/responses/response_error.rbs +79 -3
- data/sig/openai/models/responses/response_error_event.rbs +2 -2
- data/sig/openai/models/responses/response_failed_event.rbs +2 -2
- data/sig/openai/models/responses/response_file_search_call_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_file_search_call_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_file_search_call_searching_event.rbs +2 -2
- data/sig/openai/models/responses/response_file_search_tool_call.rbs +14 -14
- data/sig/openai/models/responses/response_format_text_json_schema_config.rbs +6 -6
- data/sig/openai/models/responses/response_function_call_arguments_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_function_call_arguments_done_event.rbs +2 -7
- data/sig/openai/models/responses/response_function_shell_call_output_content.rbs +4 -4
- data/sig/openai/models/responses/response_function_shell_tool_call.rbs +10 -10
- data/sig/openai/models/responses/response_function_shell_tool_call_output.rbs +16 -16
- data/sig/openai/models/responses/response_function_tool_call.rbs +21 -14
- data/sig/openai/models/responses/response_function_tool_call_item.rbs +11 -8
- data/sig/openai/models/responses/response_function_tool_call_output_item.rbs +16 -16
- data/sig/openai/models/responses/response_function_web_search.rbs +19 -17
- data/sig/openai/models/responses/response_image_gen_call_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_image_gen_call_generating_event.rbs +2 -2
- data/sig/openai/models/responses/response_image_gen_call_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_image_gen_call_partial_image_event.rbs +10 -10
- data/sig/openai/models/responses/response_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_incomplete_event.rbs +2 -2
- data/sig/openai/models/responses/response_input_audio.rbs +2 -2
- data/sig/openai/models/responses/response_input_file.rbs +16 -16
- data/sig/openai/models/responses/response_input_file_content.rbs +16 -16
- data/sig/openai/models/responses/response_input_image.rbs +10 -10
- data/sig/openai/models/responses/response_input_image_content.rbs +12 -12
- data/sig/openai/models/responses/response_input_item.rbs +167 -158
- data/sig/openai/models/responses/response_input_message_item.rbs +4 -4
- data/sig/openai/models/responses/response_input_text.rbs +6 -6
- data/sig/openai/models/responses/response_input_text_content.rbs +6 -6
- data/sig/openai/models/responses/response_item.rbs +47 -46
- data/sig/openai/models/responses/response_item_list.rbs +2 -2
- data/sig/openai/models/responses/response_local_environment.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_call_arguments_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_call_arguments_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_call_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_call_failed_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_call_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_list_tools_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_list_tools_failed_event.rbs +2 -2
- data/sig/openai/models/responses/response_mcp_list_tools_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_output_audio.rbs +2 -2
- data/sig/openai/models/responses/response_output_item.rbs +46 -46
- data/sig/openai/models/responses/response_output_item_added_event.rbs +2 -2
- data/sig/openai/models/responses/response_output_item_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_output_message.rbs +6 -6
- data/sig/openai/models/responses/response_output_refusal.rbs +2 -2
- data/sig/openai/models/responses/response_output_text.rbs +13 -12
- data/sig/openai/models/responses/response_output_text_annotation_added_event.rbs +11 -10
- data/sig/openai/models/responses/response_prompt.rbs +4 -4
- data/sig/openai/models/responses/response_queued_event.rbs +2 -2
- data/sig/openai/models/responses/response_reasoning_item.rbs +12 -12
- data/sig/openai/models/responses/response_reasoning_summary_part_added_event.rbs +4 -4
- data/sig/openai/models/responses/response_reasoning_summary_part_done_event.rbs +6 -6
- data/sig/openai/models/responses/response_reasoning_summary_text_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_reasoning_summary_text_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_reasoning_text_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_reasoning_text_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_refusal_delta_event.rbs +2 -2
- data/sig/openai/models/responses/response_refusal_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_retrieve_params.rbs +8 -8
- data/sig/openai/models/responses/response_shell_call_command_added_event.rbs +2 -2
- data/sig/openai/models/responses/response_shell_call_command_delta_event.rbs +4 -4
- data/sig/openai/models/responses/response_shell_call_command_done_event.rbs +2 -2
- data/sig/openai/models/responses/response_shell_call_output_content_delta_event.rbs +4 -4
- data/sig/openai/models/responses/response_shell_call_output_content_done_event.rbs +8 -8
- data/sig/openai/models/responses/response_steer_accepted_event.rbs +51 -0
- data/sig/openai/models/responses/response_steer_error_code.rbs +29 -0
- data/sig/openai/models/responses/response_steer_event.rbs +32 -0
- data/sig/openai/models/responses/response_steer_failed_event.rbs +100 -0
- data/sig/openai/models/responses/response_steer_input.rbs +182 -0
- data/sig/openai/models/responses/response_steer_input_content.rbs +16 -0
- data/sig/openai/models/responses/response_steer_pending_event.rbs +61 -0
- data/sig/openai/models/responses/response_steer_pending_reason.rbs +13 -0
- data/sig/openai/models/responses/response_steer_required_input.rbs +159 -0
- data/sig/openai/models/responses/response_text_config.rbs +4 -4
- data/sig/openai/models/responses/response_text_delta_event.rbs +6 -6
- data/sig/openai/models/responses/response_text_done_event.rbs +6 -6
- data/sig/openai/models/responses/response_tool_search_call.rbs +4 -4
- data/sig/openai/models/responses/response_tool_search_output_item.rbs +4 -4
- data/sig/openai/models/responses/response_tool_search_output_item_param.rbs +10 -10
- data/sig/openai/models/responses/response_web_search_call_completed_event.rbs +2 -2
- data/sig/openai/models/responses/response_web_search_call_in_progress_event.rbs +2 -2
- data/sig/openai/models/responses/response_web_search_call_searching_event.rbs +2 -2
- data/sig/openai/models/responses/responses_client_event.rbs +360 -344
- data/sig/openai/models/responses/responses_server_event.rbs +328 -254
- data/sig/openai/models/responses/skill_reference.rbs +3 -3
- data/sig/openai/models/responses/tool.rbs +80 -74
- data/sig/openai/models/responses/tool_choice_allowed.rbs +2 -2
- data/sig/openai/models/responses/tool_choice_apply_patch.rbs +2 -2
- data/sig/openai/models/responses/tool_choice_custom.rbs +2 -2
- data/sig/openai/models/responses/tool_choice_function.rbs +2 -2
- data/sig/openai/models/responses/tool_choice_mcp.rbs +3 -2
- data/sig/openai/models/responses/tool_choice_shell.rbs +2 -2
- data/sig/openai/models/responses/tool_search_tool.rbs +8 -8
- data/sig/openai/models/responses/web_search_preview_tool.rbs +16 -16
- data/sig/openai/models/responses/web_search_tool.rbs +20 -20
- data/sig/openai/models/safety/alert_retrieve_params.rbs +22 -0
- data/sig/openai/models/safety/safety_alert.rbs +81 -0
- data/sig/openai/models/skill.rbs +2 -2
- data/sig/openai/models/skill_create_params.rbs +6 -4
- data/sig/openai/models/skill_delete_params.rbs +2 -2
- data/sig/openai/models/skill_list.rbs +2 -2
- data/sig/openai/models/skill_list_params.rbs +8 -8
- data/sig/openai/models/skill_retrieve_params.rbs +2 -2
- data/sig/openai/models/skill_update_params.rbs +6 -3
- data/sig/openai/models/skills/content_retrieve_params.rbs +2 -2
- data/sig/openai/models/skills/deleted_skill_version.rbs +2 -2
- data/sig/openai/models/skills/skill_version.rbs +2 -2
- data/sig/openai/models/skills/skill_version_list.rbs +2 -2
- data/sig/openai/models/skills/version_create_params.rbs +6 -6
- data/sig/openai/models/skills/version_delete_params.rbs +6 -3
- data/sig/openai/models/skills/version_list_params.rbs +8 -8
- data/sig/openai/models/skills/version_retrieve_params.rbs +6 -3
- data/sig/openai/models/skills/versions/content_retrieve_params.rbs +6 -3
- data/sig/openai/models/static_file_chunking_strategy_object.rbs +2 -2
- data/sig/openai/models/static_file_chunking_strategy_object_param.rbs +2 -2
- data/sig/openai/models/upload.rbs +4 -4
- data/sig/openai/models/upload_cancel_params.rbs +2 -2
- data/sig/openai/models/upload_complete_params.rbs +8 -4
- data/sig/openai/models/upload_create_params.rbs +6 -6
- data/sig/openai/models/uploads/part_create_params.rbs +6 -3
- data/sig/openai/models/uploads/upload_part.rbs +2 -2
- data/sig/openai/models/vector_store.rbs +8 -8
- data/sig/openai/models/vector_store_create_params.rbs +16 -16
- data/sig/openai/models/vector_store_delete_params.rbs +2 -2
- data/sig/openai/models/vector_store_deleted.rbs +2 -2
- data/sig/openai/models/vector_store_list_params.rbs +10 -10
- data/sig/openai/models/vector_store_retrieve_params.rbs +2 -2
- data/sig/openai/models/vector_store_search_params.rbs +14 -14
- data/sig/openai/models/vector_store_update_params.rbs +10 -10
- data/sig/openai/models/vector_stores/file_batch_cancel_params.rbs +6 -3
- data/sig/openai/models/vector_stores/file_batch_create_params.rbs +14 -14
- data/sig/openai/models/vector_stores/file_batch_list_files_params.rbs +12 -12
- data/sig/openai/models/vector_stores/file_batch_retrieve_params.rbs +6 -3
- data/sig/openai/models/vector_stores/file_content_params.rbs +6 -3
- data/sig/openai/models/vector_stores/file_content_response.rbs +2 -2
- data/sig/openai/models/vector_stores/file_create_params.rbs +6 -6
- data/sig/openai/models/vector_stores/file_delete_params.rbs +6 -3
- data/sig/openai/models/vector_stores/file_list_params.rbs +12 -12
- data/sig/openai/models/vector_stores/file_retrieve_params.rbs +6 -3
- data/sig/openai/models/vector_stores/file_update_params.rbs +3 -3
- data/sig/openai/models/vector_stores/vector_store_file.rbs +6 -6
- data/sig/openai/models/vector_stores/vector_store_file_batch.rbs +2 -2
- data/sig/openai/models/vector_stores/vector_store_file_deleted.rbs +2 -2
- data/sig/openai/models/video.rbs +2 -2
- data/sig/openai/models/video_create_character_params.rbs +6 -3
- data/sig/openai/models/video_create_error.rbs +87 -3
- data/sig/openai/models/video_create_params.rbs +10 -10
- data/sig/openai/models/video_delete_params.rbs +2 -2
- data/sig/openai/models/video_delete_response.rbs +2 -2
- data/sig/openai/models/video_download_content_params.rbs +4 -4
- data/sig/openai/models/video_edit_params.rbs +6 -3
- data/sig/openai/models/video_extend_params.rbs +3 -3
- data/sig/openai/models/video_get_character_params.rbs +2 -2
- data/sig/openai/models/video_list_params.rbs +8 -8
- data/sig/openai/models/video_remix_params.rbs +6 -3
- data/sig/openai/models/video_retrieve_params.rbs +2 -2
- data/sig/openai/models/webhooks/batch_cancelled_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/batch_completed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/batch_expired_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/batch_failed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/eval_run_canceled_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/eval_run_failed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/eval_run_succeeded_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/fine_tuning_job_cancelled_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/fine_tuning_job_failed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/fine_tuning_job_succeeded_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/live_call_incoming_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/realtime_call_incoming_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/response_cancelled_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/response_completed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/response_failed_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/response_incomplete_webhook_event.rbs +4 -4
- data/sig/openai/models/webhooks/safety_alert_created_webhook_event.rbs +52 -0
- data/sig/openai/models/webhooks/safety_org_alert_created_webhook_event.rbs +52 -0
- data/sig/openai/models/webhooks/unwrap_webhook_event.rbs +2 -0
- data/sig/openai/models/webhooks/webhook_unwrap_params.rbs +2 -3
- data/sig/openai/models.rbs +2 -0
- data/sig/openai/request_options.rbs +7 -7
- data/sig/openai/resources/admin/organization/projects/service_accounts/api_keys.rbs +1 -0
- data/sig/openai/resources/audio/speech.rbs +1 -1
- data/sig/openai/resources/containers/files/content.rbs +1 -1
- data/sig/openai/resources/files.rbs +1 -1
- data/sig/openai/resources/responses.rbs +51 -2
- data/sig/openai/resources/safety/alerts.rbs +14 -0
- data/sig/openai/resources/safety.rbs +9 -0
- data/sig/openai/resources/skills/content.rbs +1 -1
- data/sig/openai/resources/skills/versions/content.rbs +1 -1
- data/sig/openai/resources/videos.rbs +1 -1
- data/sig/openai/resources/webhooks.rbs +3 -1
- data/sig/openai/response_carrier.rbs +13 -0
- data/sig/openai/streaming.rbs +10 -0
- metadata +127 -1
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# OpenAI Ruby SDK Security Model
|
|
2
|
+
|
|
3
|
+
This is the canonical detailed threat model for this repository. `SECURITY.md`
|
|
4
|
+
remains the authority for disclosure and reportability; this document is the
|
|
5
|
+
authority for architecture, trust boundaries, security invariants, attack
|
|
6
|
+
surface, and severity calibration. Codex Security scans must load this file
|
|
7
|
+
from the scanned revision instead of relying on a duplicated cloud-configured
|
|
8
|
+
model.
|
|
9
|
+
|
|
10
|
+
## 1. Overview
|
|
11
|
+
|
|
12
|
+
The OpenAI Ruby gem is a caller-embedded Ruby 3.3+ library, not a hosted
|
|
13
|
+
service. It converts caller-supplied configuration, parameters, files, and
|
|
14
|
+
credentials into authenticated REST, SSE, and optional Realtime WebSocket
|
|
15
|
+
requests, then parses remote responses into typed Ruby values
|
|
16
|
+
([README.md](../../README.md#L1-L3),
|
|
17
|
+
[README.md](../../README.md#L38-L59)).
|
|
18
|
+
|
|
19
|
+
| Component | Role | Evidence |
|
|
20
|
+
| --- | --- | --- |
|
|
21
|
+
| `OpenAI::Client` and generated resources | Public REST entry points, credentials, retries, request options | `lib/openai/client.rb:5-41`, `lib/openai/client.rb:129-170` |
|
|
22
|
+
| Base transport, HTTP client, and multipart encoder | URL construction, redirects, retries, default Net::HTTP TLS/pooling, multipart headers/files, serialization, response decoding | `lib/openai/internal/transport/base_client.rb:13-27`, `lib/openai/net_http_client.rb:55-71`, `lib/openai/net_http_client.rb:139-205`, `lib/openai/net_http_client.rb:241-345`, `lib/openai/file_part.rb:33-43`, `lib/openai/file_part.rb:110-119`, `lib/openai/internal/util.rb:533-565`, `lib/openai/http_client.rb:138-237` |
|
|
23
|
+
| Streaming and Realtime helpers | Construct authenticated WebSocket handshakes, enforce transport policy, and parse SSE/WebSocket JSON into typed events | `lib/openai/internal/stream.rb:19-60`, `lib/openai/helpers/realtime/client_extension.rb:167-280`, `lib/openai/helpers/realtime/transports/async_websocket.rb:185-308`, `lib/openai/helpers/realtime/connection.rb:47-100` |
|
|
24
|
+
| Webhook helper | Verify timestamp and HMAC before parsing webhook events | `lib/openai/resources/webhooks.rb:15-119` |
|
|
25
|
+
| Providers and workload identity | Azure, Bedrock, built-in subject-token acquisition, exchange, and X.509 credential paths | `lib/openai/providers/azure.rb:40-58`, `lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb:9-67`, `lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb:9-92`, `lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb:9-37`, `lib/openai/auth/workload_identity_auth.rb:280-330` |
|
|
26
|
+
| CI and release workflows | Run repository code, upload CodeQL results, publish trusted Castiron results, live checks/examples, and releases | `.github/workflows/ci.yml:18-32`, `.github/workflows/codeql.yml:3-53`, `.github/workflows/castiron-custom-code-comment.yml:4-38`, `.github/workflows/examples-e2e.yml:1-43`, `.github/workflows/create-releases.yml:14-79` |
|
|
27
|
+
|
|
28
|
+
```mermaid
|
|
29
|
+
flowchart LR
|
|
30
|
+
Caller[Embedding application] --> SDK[OpenAI Ruby SDK]
|
|
31
|
+
SDK --> API[Configured API or provider origin]
|
|
32
|
+
API --> Parser[JSON / SSE / WebSocket parsers]
|
|
33
|
+
Parser --> Caller
|
|
34
|
+
Webhook[Webhook sender] --> Verify[HMAC + timestamp verifier]
|
|
35
|
+
Verify --> Caller
|
|
36
|
+
PR[Candidate checkout] --> CI[Ordinary read-only CI]
|
|
37
|
+
PR --> CodeQL[CodeQL analysis]
|
|
38
|
+
CodeQL --> SecurityEvents[Code-scanning results]
|
|
39
|
+
PR --> Castiron[Candidate Castiron workflow]
|
|
40
|
+
Castiron --> Trusted[Main-sourced workflow_run publisher]
|
|
41
|
+
Trusted --> GitHub[Statuses and PR comments]
|
|
42
|
+
Main[Main revision] --> Live[Live / release workflows]
|
|
43
|
+
Live --> Secrets[Referenced credentials and publishing authority]
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
| Deployment or workflow | Resource or capability | Configuration and precedence | Safe effective value or location | Readers, writers, or recipients | Enforcing control | Evidence or unknowns |
|
|
47
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
48
|
+
| Default SDK | API/admin bearer credential and default Net::HTTP connection | Explicit option, then environment fallback; explicit/data-residency base URL, then `OPENAI_BASE_URL`, then default | Bearer credential to configured origin; default `https://api.openai.com/v1`; pooled connection keyed by origin | Configured API origin | Configured-origin request construction; cross-origin redirects strip credentials and reject bodies; HTTPS downgrade rejected; default Net::HTTP selects TLS from the URL, loads default trust roots, pools by origin, requires configurators to leave new connections unstarted, requires validators to leave previously unstarted connections unstarted, and checks `use_ssl?` against the URL scheme | `lib/openai/client.rb:634-645`, `lib/openai/client.rb:669-693`, `lib/openai/helpers/data_residency.rb:16-33`, `lib/openai/internal/transport/base_client.rb:418-452`, `lib/openai/internal/transport/base_client.rb:153-215`, `lib/openai/net_http_client.rb:55-71`, `lib/openai/net_http_client.rb:139-205`, `lib/openai/net_http_client.rb:241-345` |
|
|
49
|
+
| Webhook handler | Webhook secret | Explicit argument, then client option, then `OPENAI_WEBHOOK_SECRET` | In-process HMAC key | Local verifier only | Required headers, freshness window, HMAC, timing-safe comparison before `unwrap` parses JSON | `lib/openai/resources/webhooks.rb:15-119` |
|
|
50
|
+
| Workload identity | Built-in GCP/Azure/Kubernetes subject token and exchanged access token | GCP provider uses fixed metadata host/path plus configurable audience/timeout; Azure managed identity uses fixed IMDS endpoint plus configurable resource, identity selectors, API version, and timeout; both metadata fetches inherit Net::HTTP environment-proxy routing; Kubernetes provider uses configured/default token path; exchange uses identity/service-account IDs and default issuer URL | GCP GET to `http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/default/identity`; Azure GET to `http://169.254.169.254/metadata/identity/oauth2/token`; Kubernetes token read from configured/default path; subject token sent to `https://auth.openai.com/oauth/token`; returned token cached in memory | Local GCP/Azure metadata service, caller-owned environment proxy, or token-file path; issuer; configured API origin | Fixed GCP host/path and `Metadata-Flavor` header; fixed Azure IMDS endpoint and `Metadata` header; configured open/read timeouts; Azure JSON parsing and `access_token` extraction; Kubernetes file read/error mapping; token-type mapping, exchange timeout/deadline handling, coordinated refresh; fixed metadata URLs do not bypass caller-owned proxy configuration | `lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb:9-67`, `lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb:9-92`, `lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb:9-37`, `lib/openai/auth/workload_identity_auth.rb:13-15`, `lib/openai/auth/workload_identity_auth.rb:280-330` |
|
|
51
|
+
| X.509 workload identity | Attested mTLS transport and detached exchanged bearer token | Client uses the identity-configured transport when present, otherwise a caller-supplied attested `http_client` for a detached identity, and selects `X509TokenExchange` before token acquisition | Exchange POST to `https://mtls.auth.openai.com/oauth/token`; API requests use the selected transport's attested global/US/EU mTLS API origin | OpenAI mTLS issuer and matching attested API origin | Exact issuer endpoint and attested API-origin/header checks, TLS peer/hostname verification, proxy policy, no redirects | `lib/openai/client.rb:616-644`, `lib/openai/client.rb:739-756`, `test/openai/auth/x509_client_test.rb:16-34`, `lib/openai/auth/x509_transport.rb:5-10`, `lib/openai/auth/x509_transport.rb:14-26`, `lib/openai/auth/x509_transport.rb:174-237`, `lib/openai/auth/x509_transport.rb:243-315` |
|
|
52
|
+
| Azure provider | API key or Entra bearer token | Explicit endpoint/credential, then Azure environment fallback | Credential attached only to normalized Azure origin | Configured Azure endpoint | Origin validation before credential attachment; conflicting auth rejected | `lib/openai/providers/azure.rb:47-58`, `lib/openai/providers/azure.rb:141-147` |
|
|
53
|
+
| Bedrock provider | Bearer token or SigV4 authority | Explicit mode, environment, then AWS credential chain | Credential/signature to configured Bedrock origin | Configured Bedrock endpoint | Origin and endpoint/region validation; SigV4 disables redirects | `lib/openai/providers/bedrock.rb:105-168`, `lib/openai/providers/bedrock.rb:398-427` |
|
|
54
|
+
| Realtime WebSocket transport | API/workload bearer credential, WebSocket destination, TLS/proxy policy, and trace confidentiality | Client handshake builder applies bearer auth and optional workload-token refresh; caller may select `websocket_base_url` only within provider restrictions | Authenticated `ws://` or `wss://` handshake to configured Realtime origin; proxy credentials stay on CONNECT | Configured Realtime endpoint and optional proxy | Base URL validation, provider/X.509 restrictions, proxy-authorization stripping, WSS peer/hostname verification, trace redaction | `lib/openai/helpers/realtime/client_extension.rb:167-280`, `lib/openai/helpers/realtime/transports/async_websocket.rb:185-224`, `lib/openai/helpers/realtime/transports/async_websocket.rb:294-378` |
|
|
55
|
+
| Multipart uploads | Caller file contents, effective filename, content type, and multipart header parameters | Caller supplies `Pathname`, `IO`, or `FilePart`; optional filename/content type | File bytes to configured API origin; effective filename reduced to basename; header parameters escaped | Configured API origin | Media-type validation; `FilePart` basename reduction; encoder basename reduction for raw paths; quote/backslash escaping and CR/LF removal for multipart header parameters | `lib/openai/file_part.rb:33-43`, `lib/openai/file_part.rb:110-119`, `lib/openai/internal/util.rb:533-565` |
|
|
56
|
+
| Diagnostic logging | Request/response diagnostics | Explicit log level, then `OPENAI_LOG`; supplied logger or stderr | Sanitized metadata and structural body summaries | Caller logger or stderr | Credential/query redaction; multipart, streaming, binary, and large JSON bodies omitted | `lib/openai/internal/logging.rb:10-26`, `lib/openai/internal/logging.rb:299-343` |
|
|
57
|
+
| Dependency acquisition and installation | Gem source, locked revision, transitive gem, native extension, and install/build-script execution | Contributor/CI `Gemfile` selects `syntax_tree-rbs` from GitHub branch `main` and `Gemfile.lock` pins revision `247832988a850b8df050cf207f652872fda49973`; Bedrock CI selects `aws-sdk-core` through `gemfiles/bedrock.gemfile` and its lock; docs lockfiles and gemspec dependencies select other installed code | Locked RubyGems and Git sources plus package metadata from the reviewed revision | CI runners and consumer Bundler/RubyGems installations | Human/source review of dependency and lockfile changes; CI verifies the reviewed checkout but does not make an unreviewed dependency trustworthy | `AGENTS.md:39-42`, `Gemfile:3-15`, `Gemfile.lock:1-20`, `gemfiles/bedrock.gemfile:1-5`, `gemfiles/bedrock.gemfile.lock:1-58`, `.github/workflows/ci-checks.yml:124-144`, `openai.gemspec:18-48`, `docs/Gemfile:1-8`, `docs/Gemfile.lock:1-21` |
|
|
58
|
+
| Ordinary PR CI | Candidate checkout execution | Checked-out PR revision runs lint, typecheck, build, and tests | Candidate code executes with repository-code authority | Ephemeral CI runner | `permissions: {}`, `contents: read`, `persist-credentials: false` | `.github/workflows/ci.yml:18-32`, `.github/workflows/ci-checks.yml:100-120` |
|
|
59
|
+
| CodeQL PR analysis | Candidate checkout and code-scanning result upload | Pull requests, main pushes, and merge-group checks run action and Ruby analysis | Candidate source produces SARIF under runner temp; `security-events: write` uploads code-scanning results | GitHub code scanning | Top-level `permissions: {}`; job grants only `actions: read`, `contents: read`, and `security-events: write`; pinned checkout/CodeQL actions; `persist-credentials: false`; checked SARIF must exist and contain no findings | `.github/workflows/codeql.yml:3-28`, `.github/workflows/codeql.yml:37-53`, `.github/workflows/codeql.yml:55-96` |
|
|
60
|
+
| Trusted Castiron workflow-run publisher | Commit-status and PR-comment writes | Candidate-associated `workflow_run` metadata -> main-sourced reporter recomputes from current Git objects for statuses and successful report comments; fallback failure comments use event/path, current-head, and monotonic-replacement checks | `statuses: write` and `pull-requests: write` only in publisher jobs | GitHub commit statuses and PR comments | Status path: no candidate artifact, run identity validation, exact head/base checks; successful comment path: trusted report artifact; fallback failure-comment path: main-sourced code, event/path filtering, current-head matching, monotonic replacement | `.github/workflows/castiron-custom-code-comment.yml:4-38`, `.github/workflows/castiron-custom-code-comment.yml:40-98`, `.github/workflows/castiron-custom-code-comment.yml:116-171`, `.github/workflows/castiron-custom-code-comment.yml:174-237` |
|
|
61
|
+
| Live/release workflows | API keys, X.509 material, GitHub App private key, generated GitHub App token, RubyGems OIDC | Main-only conditions plus named environments; release job passes `OPENAI_SDKS_APP_PRIVATE_KEY` to pinned token action, then passes generated token to Release Please | Referenced long-lived private key as action input; generated short-lived release token; publishing OIDC | Main revision, token action, OpenAI API, GitHub, RubyGems | Repository/ref conditions, separate named environments, least privilege, pinned actions, generated token handoff, OIDC only for publishing | `.github/workflows/live-smoke.yml:17-92`, `.github/workflows/create-releases.yml:17-79` |
|
|
62
|
+
| Examples E2E workflow | Live-example API credential and uploaded reports | Manual dispatch; main/repository condition; named `ci` environment; `OPENAI_API_KEY` secret reference | Credential only in the live-example step; allowlisted `report.json` and `summary.md` under runner temp | OpenAI API and GitHub artifact readers | `permissions: {}`, `contents: read`, checkout without persisted credentials, main/repository condition, allowlisted reports, 14-day retention, focused confidentiality/isolation tests | `.github/workflows/examples-e2e.yml:1-43`, `test/scripts/examples_e2e_test.rb:202-234`, `test/scripts/examples_e2e_test.rb:306-327` |
|
|
63
|
+
|
|
64
|
+
## 2. Threat Model, Trust Boundaries, and Assumptions
|
|
65
|
+
|
|
66
|
+
Protected assets include caller API/admin/provider credentials, workload subject
|
|
67
|
+
tokens and exchanged access tokens, webhook secrets, X.509 private-key
|
|
68
|
+
material, uploaded file contents, request destinations and headers, parsed
|
|
69
|
+
response integrity, diagnostic confidentiality, GitHub App private-key
|
|
70
|
+
material, and release/publishing integrity.
|
|
71
|
+
|
|
72
|
+
Important boundaries:
|
|
73
|
+
|
|
74
|
+
- Caller-controlled parameters, headers, files, base URLs, callbacks, loggers,
|
|
75
|
+
and custom transports cross into SDK request construction. These remain
|
|
76
|
+
caller authority inside the embedding process; the SDK is not a sandbox
|
|
77
|
+
(`lib/openai/http_client.rb:138-142`,
|
|
78
|
+
`lib/openai/internal/transport/base_client.rb:293-339`).
|
|
79
|
+
- Configured origin to redirect destination is a network boundary. Credential
|
|
80
|
+
headers must not reach a different origin, request bodies must not cross
|
|
81
|
+
origins, and HTTPS must not downgrade to HTTP
|
|
82
|
+
(`lib/openai/internal/transport/base_client.rb:153-215`).
|
|
83
|
+
- The default Net::HTTP implementation is the ordinary REST TLS and connection-
|
|
84
|
+
reuse boundary. It derives TLS from the requested scheme, installs default
|
|
85
|
+
trust roots, keys pools by origin, requires configurators to leave new
|
|
86
|
+
connections unstarted, requires validators to leave previously unstarted
|
|
87
|
+
connections unstarted, and checks `use_ssl?` against the URL scheme each time
|
|
88
|
+
(`lib/openai/net_http_client.rb:55-71`,
|
|
89
|
+
`lib/openai/net_http_client.rb:139-205`,
|
|
90
|
+
`lib/openai/net_http_client.rb:241-345`).
|
|
91
|
+
- API, SSE, and WebSocket bytes cross parser/type-conversion boundaries. They
|
|
92
|
+
are parsed as data, not evaluated as code
|
|
93
|
+
(`lib/openai/internal/stream.rb:21-60`,
|
|
94
|
+
`lib/openai/helpers/realtime/connection.rb:61-84`).
|
|
95
|
+
- Raw webhook payloads and headers cross an authenticity boundary. `unwrap`
|
|
96
|
+
verifies freshness and HMAC before parsing or coercion
|
|
97
|
+
(`lib/openai/resources/webhooks.rb:15-23`,
|
|
98
|
+
`lib/openai/resources/webhooks.rb:75-119`).
|
|
99
|
+
- Built-in subject-token sources, the generic token issuer, and Azure/Bedrock
|
|
100
|
+
endpoints are credential-brokering boundaries. GCP acquisition uses the fixed
|
|
101
|
+
plaintext metadata host/path and metadata header with configurable audience
|
|
102
|
+
and timeout; Azure managed-identity acquisition uses the fixed plaintext IMDS
|
|
103
|
+
endpoint and metadata header with configurable resource, identity selectors,
|
|
104
|
+
API version, and timeout, then parses the returned JSON token. Both metadata
|
|
105
|
+
fetches inherit Net::HTTP environment-proxy routing, so a caller-owned proxy
|
|
106
|
+
can mediate the plaintext request/response and fixed URLs alone do not prove
|
|
107
|
+
direct source binding. Kubernetes acquisition reads its configured/default
|
|
108
|
+
token path and maps file failures. Credentials must remain bound to their
|
|
109
|
+
intended source, proxy, issuer, and destination
|
|
110
|
+
(`lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb:9-67`,
|
|
111
|
+
`lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb:9-92`,
|
|
112
|
+
`lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb:9-37`,
|
|
113
|
+
`lib/openai/auth/workload_identity_auth.rb:280-330`,
|
|
114
|
+
`lib/openai/providers/azure.rb:141-147`,
|
|
115
|
+
`lib/openai/providers/bedrock.rb:398-427`).
|
|
116
|
+
- X.509 workload identity is a separate credential boundary: the exchange uses
|
|
117
|
+
the fixed mTLS issuer while API requests use the selected transport's attested
|
|
118
|
+
matching mTLS origin. The certificate identity and exchanged bearer token
|
|
119
|
+
remain detached; controls enforce the exact issuer endpoint and approved API
|
|
120
|
+
origin/header/TLS/proxy/no-redirect policy
|
|
121
|
+
(`lib/openai/client.rb:616-644`,
|
|
122
|
+
`lib/openai/client.rb:739-756`,
|
|
123
|
+
`test/openai/auth/x509_client_test.rb:16-34`,
|
|
124
|
+
`lib/openai/auth/x509_transport.rb:5-10`,
|
|
125
|
+
`lib/openai/auth/x509_transport.rb:174-315`).
|
|
126
|
+
- Authenticated Realtime handshakes are a transport boundary distinct from
|
|
127
|
+
event parsing. Bearer credentials, caller-selected WebSocket destinations,
|
|
128
|
+
TLS, proxy credentials, and traces must remain bound to their intended
|
|
129
|
+
origin and diagnostic audience. Bearer credentials, including ephemeral
|
|
130
|
+
client secrets passed to client apps, authenticate the handshake before any
|
|
131
|
+
typed event is sent; post-handshake transcription `session.update` events
|
|
132
|
+
carry configuration rather than a client secret. The legacy generated
|
|
133
|
+
`TranscriptionSessionUpdatedEvent` model requires a `client_secret` even
|
|
134
|
+
though its own documentation says WebSocket updates omit it, but that model
|
|
135
|
+
is not in the helper's active server-event union: the parser treats its
|
|
136
|
+
`transcription_session.updated` discriminator as unknown, while current
|
|
137
|
+
transcription updates use `session.updated`
|
|
138
|
+
(`lib/openai/helpers/websocket/client_request.rb:89-113`,
|
|
139
|
+
`lib/openai/helpers/realtime/connection_resources.rb:25-31`,
|
|
140
|
+
`lib/openai/resources/realtime/client_secrets.rb:10-45`,
|
|
141
|
+
`lib/openai/models/realtime/transcription_session_updated_event.rb:13-49`,
|
|
142
|
+
`lib/openai/models/realtime/realtime_server_event.rb:192-199`,
|
|
143
|
+
`lib/openai/helpers/realtime/connection.rb:32-49`,
|
|
144
|
+
`lib/openai/helpers/realtime/transports/async_websocket.rb:185-224`,
|
|
145
|
+
`lib/openai/helpers/realtime/transports/async_websocket.rb:294-378`).
|
|
146
|
+
- Multipart upload serialization is a file-path and header-integrity boundary.
|
|
147
|
+
`FilePart` validates media types and reduces explicit or inferred filenames to
|
|
148
|
+
basenames; the encoder again basenames raw paths and escapes quote, backslash,
|
|
149
|
+
CR, and LF header-parameter characters before bytes reach the API origin
|
|
150
|
+
(`lib/openai/file_part.rb:33-43`,
|
|
151
|
+
`lib/openai/file_part.rb:110-119`,
|
|
152
|
+
`lib/openai/internal/util.rb:533-565`).
|
|
153
|
+
- Runtime/API data crossing into logs, exceptions, retained metadata objects, or
|
|
154
|
+
CI artifacts is a sensitive sink boundary. Logging redacts or omits sensitive
|
|
155
|
+
bodies; derived HTTP status messages are bounded and sanitized when no
|
|
156
|
+
top-level scalar or explicit message is supplied; top-level scalar and
|
|
157
|
+
explicit SSE error messages remain remote data; Realtime connection errors
|
|
158
|
+
redact call IDs from URLs; response metadata omits retained bodies from
|
|
159
|
+
inspection and serialization
|
|
160
|
+
(`lib/openai/internal/logging.rb:299-343`,
|
|
161
|
+
`lib/openai/errors.rb:259-409`,
|
|
162
|
+
`lib/openai/internal/stream.rb:35-40`,
|
|
163
|
+
`lib/openai/helpers/realtime/errors.rb:26-70`,
|
|
164
|
+
`lib/openai/http_client.rb:46-79`,
|
|
165
|
+
`CONTRIBUTING.md:42-50`).
|
|
166
|
+
- Candidate PR code reaching sensitive live/release credentials or repository
|
|
167
|
+
write/publishing authority is a genuine boundary
|
|
168
|
+
(`.github/workflows/live-smoke.yml:17-92`,
|
|
169
|
+
`.github/workflows/examples-e2e.yml:1-43`,
|
|
170
|
+
`.github/workflows/create-releases.yml:17-79`).
|
|
171
|
+
- The release GitHub App private key is distinct from the generated app token.
|
|
172
|
+
The main/repository-gated release job passes the referenced private key only
|
|
173
|
+
to a pinned token action, which mints the narrower token passed to Release
|
|
174
|
+
Please; disclosure of the private key can outlive one generated token
|
|
175
|
+
(`.github/workflows/create-releases.yml:17-46`).
|
|
176
|
+
- Candidate source and generated SARIF crossing into CodeQL result upload are a
|
|
177
|
+
separate PR-adjacent write boundary. The workflow scopes the token to
|
|
178
|
+
`security-events: write` plus read-only metadata/content, uses pinned actions
|
|
179
|
+
without persisted checkout credentials, and validates that SARIF exists and
|
|
180
|
+
has no findings before the job succeeds
|
|
181
|
+
(`.github/workflows/codeql.yml:3-28`,
|
|
182
|
+
`.github/workflows/codeql.yml:37-53`,
|
|
183
|
+
`.github/workflows/codeql.yml:55-96`).
|
|
184
|
+
- The manually dispatched Examples E2E job is a separate live-data boundary:
|
|
185
|
+
its main/repository-gated job references `OPENAI_API_KEY`, runs examples, and
|
|
186
|
+
always uploads only two allowlisted reports. Tests enforce report
|
|
187
|
+
confidentiality and workflow isolation
|
|
188
|
+
(`.github/workflows/examples-e2e.yml:1-43`,
|
|
189
|
+
`test/scripts/examples_e2e_test.rb:202-234`,
|
|
190
|
+
`test/scripts/examples_e2e_test.rb:306-327`).
|
|
191
|
+
- Candidate-associated `workflow_run` metadata and Git objects crossing into
|
|
192
|
+
the trusted Castiron publisher are a genuine write-capable boundary. The
|
|
193
|
+
status path must preserve run-identity and exact-head/base checks; successful
|
|
194
|
+
report comments must remain bound to the trusted report artifact. The
|
|
195
|
+
fallback failure-comment path has narrower main-sourced event/path,
|
|
196
|
+
current-head, and monotonic-replacement checks that scans must assess
|
|
197
|
+
independently
|
|
198
|
+
(`.github/workflows/castiron-custom-code-comment.yml:34-98`,
|
|
199
|
+
`.github/workflows/castiron-custom-code-comment.yml:116-171`,
|
|
200
|
+
`.github/workflows/castiron-custom-code-comment.yml:174-237`).
|
|
201
|
+
- Dependency declarations and locks cross a supply-chain boundary when Bundler
|
|
202
|
+
or RubyGems fetches and executes selected package code in CI or consumer
|
|
203
|
+
applications. A changed source, Git revision, transitive gem, native
|
|
204
|
+
extension, or install/build script needs explicit dependency review. The root
|
|
205
|
+
contributor/CI bundle currently selects `syntax_tree-rbs` from GitHub branch
|
|
206
|
+
`main` and locks revision `247832988a850b8df050cf207f652872fda49973`; the
|
|
207
|
+
Bedrock CI job separately selects `aws-sdk-core` through
|
|
208
|
+
`gemfiles/bedrock.gemfile` and its lock
|
|
209
|
+
(`AGENTS.md:39-42`, `Gemfile:3-15`, `Gemfile.lock:1-20`,
|
|
210
|
+
`gemfiles/bedrock.gemfile:1-5`, `gemfiles/bedrock.gemfile.lock:1-58`,
|
|
211
|
+
`.github/workflows/ci-checks.yml:124-144`,
|
|
212
|
+
`openai.gemspec:18-48`,
|
|
213
|
+
`docs/Gemfile:1-8`, `docs/Gemfile.lock:1-21`).
|
|
214
|
+
|
|
215
|
+
Checked-in executable source has repository-code authority. Reviewed tracked
|
|
216
|
+
examples, tests, fixtures, Rake tasks, build scripts, generators, and other
|
|
217
|
+
checkout files are intentionally executable by local development and ordinary
|
|
218
|
+
PR CI. A contributor who can modify those tracked files does not gain a new
|
|
219
|
+
privilege merely because CI executes them. Do not report that execution alone
|
|
220
|
+
as a security finding.
|
|
221
|
+
|
|
222
|
+
Dormant developer helpers are not security controls merely because their names
|
|
223
|
+
suggest compatibility or safety verification. At this revision,
|
|
224
|
+
`scripts/detect-breaking-changes` is not invoked by any tracked workflow or
|
|
225
|
+
tracked required job; when a contributor explicitly runs it, it replaces
|
|
226
|
+
selected tests with historical versions and invokes lint rather than runtime
|
|
227
|
+
assertions.
|
|
228
|
+
That can affect contributor confidence or release-quality review, but without a
|
|
229
|
+
privileged workflow invocation or an independent lower-trust path to a sensitive
|
|
230
|
+
sink, it is not a repository security boundary. Reassess this classification if
|
|
231
|
+
the helper becomes a required or privileged workflow control; otherwise treat
|
|
232
|
+
ordinary compatibility regressions as product/release-quality issues unless they
|
|
233
|
+
independently violate a runtime security invariant.
|
|
234
|
+
|
|
235
|
+
That rule does not suppress a real finding when independently mutable
|
|
236
|
+
lower-trust input crosses a parser/evaluator boundary, untrusted runtime/API/
|
|
237
|
+
network data reaches a sensitive sink, candidate code can reach sensitive
|
|
238
|
+
secrets or write/publishing authority, or shipped production code violates a
|
|
239
|
+
security invariant.
|
|
240
|
+
|
|
241
|
+
Assumptions:
|
|
242
|
+
|
|
243
|
+
- The embedding application owns its local filesystem, network, process,
|
|
244
|
+
callback, proxy, and credential authority.
|
|
245
|
+
- Custom transports, token providers, and loggers are caller-owned extension
|
|
246
|
+
points, not less-trusted sandboxed plugins.
|
|
247
|
+
- Azure and Bedrock custom HTTP endpoints are caller-selected; HTTPS outside
|
|
248
|
+
local/private testing is a caller obligation where the provider permits HTTP.
|
|
249
|
+
- External branch protection, environment approval rules, secret configuration,
|
|
250
|
+
and RubyGems trusted-publisher bindings are not proven by repository files.
|
|
251
|
+
- Large JSON bodies and SSE events are supported API contracts; arbitrary fixed
|
|
252
|
+
rejection limits are not an acceptable security fix.
|
|
253
|
+
|
|
254
|
+
## 3. Attack Surface, Mitigations, and Attacker Stories
|
|
255
|
+
|
|
256
|
+
The following are hypotheses and review guidance, not confirmed findings.
|
|
257
|
+
|
|
258
|
+
| Priority | Scenario and capability gain | Prerequisites | Impact | Existing controls | Mitigation | Evidence |
|
|
259
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
260
|
+
| High | Redirect, TLS, or pooled-connection confusion sends credentials or a body to an unintended origin | Remote endpoint controls redirect or caller/provider origin handling is bypassed, or default connection validation/pooling regresses | Credential or payload disclosure | Cross-origin credential stripping, body rejection, HTTPS downgrade rejection, provider origin validation, default trust roots, origin-keyed pools, return-time unstarted postconditions for new connections, scheme-matched `use_ssl?` checks | Preserve origin, redirect, TLS, and pool controls | `lib/openai/internal/transport/base_client.rb:153-215`, `lib/openai/providers/azure.rb:141-147`, `lib/openai/net_http_client.rb:55-71`, `lib/openai/net_http_client.rb:139-205`, `lib/openai/net_http_client.rb:241-345` |
|
|
261
|
+
| High | Candidate PR code reaches live/release credentials or publishing authority | Privileged workflow executes candidate code or exposes secrets/write tokens | Credential theft or release compromise | Main-only conditions, named environments, least-privilege permissions, trusted publisher separation | Keep candidate and live/release workflows isolated | `.github/workflows/live-smoke.yml:17-92`, `.github/workflows/create-releases.yml:17-79` |
|
|
262
|
+
| High | Release GitHub App private key reaches an unintended action, log, or artifact | Main/repository release gate or pinned token-action input boundary regresses | Attacker can mint GitHub App tokens beyond one workflow token lifetime | Main/repository condition, named release environment, empty job permissions, pinned token action, generated token passed separately to Release Please | Keep the private key confined to token minting and preserve generated-token handoff | `.github/workflows/create-releases.yml:17-46` |
|
|
263
|
+
| Medium | Candidate source or generated SARIF influences the write-capable CodeQL upload outside its intended code-scanning result path | PR-adjacent CodeQL action or token scoping regresses | Forged or unintended code-scanning results | Top-level empty permissions; scoped `security-events: write`; read-only content/metadata; pinned actions; no persisted checkout credentials; SARIF existence/shape/finding checks | Preserve least privilege and keep upload input limited to CodeQL output | `.github/workflows/codeql.yml:3-28`, `.github/workflows/codeql.yml:37-53`, `.github/workflows/codeql.yml:55-96` |
|
|
264
|
+
| High | Candidate-associated workflow metadata or Git objects influence the write-capable Castiron publisher without the path-specific trusted validation | Attacker controls a PR head or associated workflow metadata and a status, successful-comment, or fallback-comment check regresses | Forged or stale commit statuses and PR comments | Statuses use main-sourced recomputation plus run/head/base checks; successful comments use a trusted report artifact; fallback comments rely on main-sourced event/path, current-head, and monotonic-replacement checks | Preserve each path's distinct recomputation, freshness, artifact-binding, or fallback-isolation checks before its write | `.github/workflows/castiron-custom-code-comment.yml:34-98`, `.github/workflows/castiron-custom-code-comment.yml:116-171`, `.github/workflows/castiron-custom-code-comment.yml:174-237` |
|
|
265
|
+
| High | A dependency declaration or lockfile selects malicious package code, native extension, or install/build script | Lower-trust change alters a source, Git revision, transitive dependency, or executable package hook that CI or a consumer installs; the contributor/CI bundle currently includes Git-sourced `syntax_tree-rbs` locked at `247832988a850b8df050cf207f652872fda49973`; Bedrock CI separately installs its `aws-sdk-core` bundle | Code execution in CI or consumer applications | Reviewed lockfiles and dependency policy; ordinary and Bedrock CI execute selected dependencies with runner authority | Review direct/transitive dependencies, sources, locked revisions, native extensions, and scripts before acceptance | `AGENTS.md:39-42`, `Gemfile:3-15`, `Gemfile.lock:1-20`, `gemfiles/bedrock.gemfile:1-5`, `gemfiles/bedrock.gemfile.lock:1-58`, `.github/workflows/ci-checks.yml:124-144`, `openai.gemspec:18-48`, `docs/Gemfile:1-8`, `docs/Gemfile.lock:1-21` |
|
|
266
|
+
| High | Built-in subject-token acquisition or exchange sends a token to an unintended source, proxy, issuer, or origin | Lower-trust configuration, caller-owned environment proxy, local token path, metadata response, or endpoint handling is bypassed | Credential disclosure or forged authentication | Fixed GCP metadata host/path/header with configurable audience/timeout; fixed Azure IMDS endpoint/header with configurable resource/selectors/API version/timeout and JSON token extraction; inherited Net::HTTP environment-proxy routing remains caller-owned; configured/default Kubernetes path with mapped failures; fixed/default issuer paths, origin checks, X.509 destination restrictions | Preserve strict source, proxy, destination, timeout, redirect, and response-parsing handling | `lib/openai/auth/subject_token_providers/gcp_id_token_provider.rb:9-67`, `lib/openai/auth/subject_token_providers/azure_managed_identity_token_provider.rb:9-92`, `lib/openai/auth/subject_token_providers/k8s_service_account_token_provider.rb:9-37`, `lib/openai/auth/workload_identity_auth.rb:303-330`, `lib/openai/providers/bedrock.rb:398-427` |
|
|
267
|
+
| High | Realtime bearer credentials, proxy credentials, or trace data reach an unintended destination or audience | Lower-trust destination, proxy, TLS, or tracing behavior bypasses handshake controls | Credential disclosure or authenticated connection to the wrong peer | Base-URL/provider restrictions, proxy-header stripping, WSS verification, proxy handling, trace redaction | Preserve destination/TLS/proxy/redaction controls independently from event parsing | `lib/openai/helpers/realtime/client_extension.rb:167-280`, `lib/openai/helpers/realtime/transports/async_websocket.rb:185-224`, `lib/openai/helpers/realtime/transports/async_websocket.rb:294-378` |
|
|
268
|
+
| Medium | Malformed or adversarial API/SSE/WebSocket data causes sensitive leakage, type confusion, or availability failure | Victim consumes untrusted remote data | Data exposure, incorrect application behavior, or DoS | JSON parsing, typed coercion, protocol errors, safe unknown events | Keep parsers data-only, incremental where applicable, and redact errors/logs | `lib/openai/internal/stream.rb:21-60`, `lib/openai/helpers/realtime/connection.rb:61-84` |
|
|
269
|
+
| Medium | Multipart filename, content type, or field name reaches headers without normalization | Caller-supplied path or header parameter crosses multipart serialization | Absolute local path disclosure or multipart header injection | Media-type validation, basename reduction for `FilePart` and raw path/IO values, quote/backslash escaping, CR/LF removal | Preserve basename and header-parameter controls before upload | `lib/openai/file_part.rb:33-43`, `lib/openai/file_part.rb:110-119`, `lib/openai/internal/util.rb:533-565` |
|
|
270
|
+
| Medium | Forged webhook, or replay of a captured valid webhook, becomes an accepted typed event | For forgery, attacker lacks the webhook secret; for replay, attacker can resend a valid signed payload within the tolerance window | Application accepts an unauthentic or repeated event | Required headers, HMAC, and timing-safe comparison reject forgery; timestamp validation bounds replay age but does not deduplicate `webhook-id` | Verify before parsing; callers that need replay prevention must deduplicate `webhook-id` | `lib/openai/resources/webhooks.rb:15-119` |
|
|
271
|
+
| Medium | Sensitive runtime or live-example data leaks through diagnostics, exceptions, retained metadata, or artifacts | Untrusted data reaches logger/error/object serialization or a live-example report | Credential, prompt, response, file, header, or call-identifier disclosure | Redacted headers/queries; unsafe body categories omitted; derived HTTP errors are bounded/sanitized when no top-level scalar or explicit message is supplied; top-level scalar and explicit SSE messages remain remote data; Realtime URL call-ID redaction; retained bodies omitted from inspect/YAML/Marshal; Examples E2E reports are allowlisted and tested for sensitive output | Preserve redaction, bounded derived errors, metadata serialization controls, and allowlisted artifacts; treat preserved remote messages as remote data | `lib/openai/internal/logging.rb:299-343`, `lib/openai/errors.rb:259-409`, `lib/openai/internal/stream.rb:35-40`, `lib/openai/helpers/realtime/errors.rb:26-70`, `lib/openai/http_client.rb:46-79`, `.github/workflows/examples-e2e.yml:29-43`, `test/scripts/examples_e2e_test.rb:202-234`, `test/scripts/examples_e2e_test.rb:306-327`, `CONTRIBUTING.md:42-50` |
|
|
272
|
+
| Not a finding by itself | Contributor changes a tracked test/example/fixture/build script and ordinary CI runs it | Contributor already controls candidate checkout code | No new authority | Read-only ordinary CI without referenced secrets or write authority | Require a separate privilege or boundary violation before reporting | `.github/workflows/ci.yml:18-32`, `.github/workflows/ci-checks.yml:100-120` |
|
|
273
|
+
|
|
274
|
+
## 4. Severity Calibration
|
|
275
|
+
|
|
276
|
+
- Critical: unauthorized release/publishing compromise, protected credential
|
|
277
|
+
theft with broad impact, or a cross-account/tenant boundary failure.
|
|
278
|
+
- High: realistic credential disclosure, authenticated request redirection,
|
|
279
|
+
protected CI/release boundary bypass, or forged authentication with meaningful
|
|
280
|
+
account impact.
|
|
281
|
+
- Medium: production-reachable parser, webhook, retry, logging, or availability
|
|
282
|
+
failures with bounded impact or meaningful prerequisites.
|
|
283
|
+
- Low: narrowly reachable confidentiality/integrity defects with limited impact
|
|
284
|
+
and strong mitigating prerequisites.
|
|
285
|
+
- Out of scope without additional authority: ordinary execution of
|
|
286
|
+
contributor-controlled tracked checkout code, caller-chosen dangerous
|
|
287
|
+
configuration, caller-owned callbacks/custom transports, purely local
|
|
288
|
+
self-effects, and hypothetical stories without a realistic lower-trust route
|
|
289
|
+
to a sensitive operation.
|
|
290
|
+
|
|
291
|
+
Severity depends on the attacker's initial authority, the new capability gained,
|
|
292
|
+
reachability, deployment prerequisites, and effective controls. Missing evidence
|
|
293
|
+
is an explicit uncertainty, not proof that a control succeeds or fails.
|
|
@@ -355,7 +355,7 @@ module OpenAI
|
|
|
355
355
|
OpenAI::Errors::OAuthError.new(
|
|
356
356
|
status: response.code.to_i,
|
|
357
357
|
body: body,
|
|
358
|
-
headers: response.
|
|
358
|
+
headers: response.each_header.to_h
|
|
359
359
|
)
|
|
360
360
|
)
|
|
361
361
|
in Net::HTTPSuccess
|
|
@@ -368,7 +368,7 @@ module OpenAI
|
|
|
368
368
|
OpenAI::Errors::APIError.new(
|
|
369
369
|
url: @token_exchange_url,
|
|
370
370
|
status: response.code.to_i,
|
|
371
|
-
headers: response.
|
|
371
|
+
headers: response.each_header.to_h,
|
|
372
372
|
body: body,
|
|
373
373
|
message: "Token exchange failed with status #{response.code}"
|
|
374
374
|
)
|
|
@@ -74,7 +74,13 @@ module OpenAI
|
|
|
74
74
|
|
|
75
75
|
raise_error(response, body)
|
|
76
76
|
rescue OpenAI::Errors::APIConnectionError => error
|
|
77
|
-
raise
|
|
77
|
+
raise(
|
|
78
|
+
error.class.new(
|
|
79
|
+
url: URI(TOKEN_URL),
|
|
80
|
+
request_may_have_been_sent: error.request_may_have_been_sent?
|
|
81
|
+
),
|
|
82
|
+
cause: nil
|
|
83
|
+
)
|
|
78
84
|
end
|
|
79
85
|
|
|
80
86
|
private def remaining_timeout(deadline)
|
|
@@ -116,21 +116,39 @@ module OpenAI
|
|
|
116
116
|
native_response
|
|
117
117
|
|
|
118
118
|
rescue OpenAI::Errors::APIConnectionError => error
|
|
119
|
-
raise
|
|
119
|
+
raise(
|
|
120
|
+
error.class.new(
|
|
121
|
+
url: sanitized_url(url),
|
|
122
|
+
request_may_have_been_sent: error.request_may_have_been_sent?
|
|
123
|
+
),
|
|
124
|
+
cause: nil
|
|
125
|
+
)
|
|
120
126
|
end
|
|
121
127
|
|
|
122
128
|
stream = Enumerator.new do |chunks|
|
|
123
129
|
response.body.each { |chunk| chunks << chunk }
|
|
124
130
|
|
|
125
131
|
rescue OpenAI::Errors::APIConnectionError => error
|
|
126
|
-
raise
|
|
132
|
+
raise(
|
|
133
|
+
error.class.new(
|
|
134
|
+
url: sanitized_url(url),
|
|
135
|
+
request_may_have_been_sent: error.request_may_have_been_sent?
|
|
136
|
+
),
|
|
137
|
+
cause: nil
|
|
138
|
+
)
|
|
127
139
|
end
|
|
128
140
|
|
|
129
141
|
body = OpenAI::Internal::Util.fused_enum(stream) do
|
|
130
142
|
OpenAI::Internal::Util.close_fused!(response.body)
|
|
131
143
|
|
|
132
144
|
rescue OpenAI::Errors::APIConnectionError => error
|
|
133
|
-
raise
|
|
145
|
+
raise(
|
|
146
|
+
error.class.new(
|
|
147
|
+
url: sanitized_url(url),
|
|
148
|
+
request_may_have_been_sent: error.request_may_have_been_sent?
|
|
149
|
+
),
|
|
150
|
+
cause: nil
|
|
151
|
+
)
|
|
134
152
|
end
|
|
135
153
|
|
|
136
154
|
OpenAI::HTTPClient::Response.new(status: response.status, headers: response.headers, body: body)
|
data/lib/openai/client.rb
CHANGED
|
@@ -86,6 +86,9 @@ module OpenAI
|
|
|
86
86
|
# @return [OpenAI::Resources::VectorStores]
|
|
87
87
|
attr_reader :vector_stores
|
|
88
88
|
|
|
89
|
+
# @return [OpenAI::Resources::Safety]
|
|
90
|
+
attr_reader :safety
|
|
91
|
+
|
|
89
92
|
# @return [OpenAI::Resources::Webhooks]
|
|
90
93
|
attr_reader :webhooks
|
|
91
94
|
|
|
@@ -396,14 +399,16 @@ module OpenAI
|
|
|
396
399
|
rescue OpenAI::Errors::APIError => error
|
|
397
400
|
status = error.status
|
|
398
401
|
connection_failure = error.is_a?(OpenAI::Errors::APIConnectionError)
|
|
399
|
-
|
|
402
|
+
retryable_connection_failure = connection_failure &&
|
|
403
|
+
false.equal?(error.request_may_have_been_sent?)
|
|
404
|
+
retryable_status = retryable_connection_failure ||
|
|
400
405
|
[408, 409, 429].include?(status) ||
|
|
401
406
|
(status.is_a?(Integer) && (500..599).cover?(status))
|
|
402
407
|
consumed_retries = attempts + previous_issuer_retries + retry_count
|
|
403
408
|
unless x509_transport?(@requester) &&
|
|
404
409
|
retryable_status &&
|
|
405
410
|
consumed_retries < request.fetch(:x509_request_context).fetch(:auth_max_retries) &&
|
|
406
|
-
(
|
|
411
|
+
(retryable_connection_failure || self.class.should_retry?(status, headers: error.headers || {}))
|
|
407
412
|
raise
|
|
408
413
|
end
|
|
409
414
|
|
|
@@ -806,6 +811,7 @@ module OpenAI
|
|
|
806
811
|
@fine_tuning = OpenAI::Resources::FineTuning.new(client: self)
|
|
807
812
|
@graders = OpenAI::Resources::Graders.new(client: self)
|
|
808
813
|
@vector_stores = OpenAI::Resources::VectorStores.new(client: self)
|
|
814
|
+
@safety = OpenAI::Resources::Safety.new(client: self)
|
|
809
815
|
@webhooks = OpenAI::Resources::Webhooks.new(client: self)
|
|
810
816
|
@beta = OpenAI::Resources::Beta.new(client: self)
|
|
811
817
|
@batches = OpenAI::Resources::Batches.new(client: self)
|
data/lib/openai/errors.rb
CHANGED
|
@@ -141,6 +141,15 @@ module OpenAI
|
|
|
141
141
|
#
|
|
142
142
|
# @return [nil]
|
|
143
143
|
|
|
144
|
+
# Whether request bytes might have reached the peer before the transport
|
|
145
|
+
# failed. HTTP clients should only set this to `false` when they can
|
|
146
|
+
# prove that no request bytes were sent.
|
|
147
|
+
#
|
|
148
|
+
# @api private
|
|
149
|
+
#
|
|
150
|
+
# @return [Boolean]
|
|
151
|
+
def request_may_have_been_sent? = @request_may_have_been_sent
|
|
152
|
+
|
|
144
153
|
# @api private
|
|
145
154
|
#
|
|
146
155
|
# @param url [URI::Generic]
|
|
@@ -150,6 +159,7 @@ module OpenAI
|
|
|
150
159
|
# @param request [nil]
|
|
151
160
|
# @param response [nil]
|
|
152
161
|
# @param message [String, nil]
|
|
162
|
+
# @param request_may_have_been_sent [Boolean]
|
|
153
163
|
def initialize(
|
|
154
164
|
url:,
|
|
155
165
|
status: nil,
|
|
@@ -157,9 +167,11 @@ module OpenAI
|
|
|
157
167
|
body: nil,
|
|
158
168
|
request: nil,
|
|
159
169
|
response: nil,
|
|
160
|
-
message: "Connection error."
|
|
170
|
+
message: "Connection error.",
|
|
171
|
+
request_may_have_been_sent: true
|
|
161
172
|
)
|
|
162
|
-
|
|
173
|
+
@request_may_have_been_sent = request_may_have_been_sent
|
|
174
|
+
super(url:, status:, headers:, body:, request:, response:, message:)
|
|
163
175
|
end
|
|
164
176
|
end
|
|
165
177
|
|
|
@@ -173,6 +185,7 @@ module OpenAI
|
|
|
173
185
|
# @param request [nil]
|
|
174
186
|
# @param response [nil]
|
|
175
187
|
# @param message [String, nil]
|
|
188
|
+
# @param request_may_have_been_sent [Boolean]
|
|
176
189
|
def initialize(
|
|
177
190
|
url:,
|
|
178
191
|
status: nil,
|
|
@@ -180,7 +193,8 @@ module OpenAI
|
|
|
180
193
|
body: nil,
|
|
181
194
|
request: nil,
|
|
182
195
|
response: nil,
|
|
183
|
-
message: "Request timed out."
|
|
196
|
+
message: "Request timed out.",
|
|
197
|
+
request_may_have_been_sent: true
|
|
184
198
|
)
|
|
185
199
|
super
|
|
186
200
|
end
|
|
@@ -264,9 +278,9 @@ module OpenAI
|
|
|
264
278
|
safe_status_message(url: url, status: status, body: body)
|
|
265
279
|
end
|
|
266
280
|
|
|
267
|
-
@code = OpenAI::Internal::Type::Converter.coerce(String,
|
|
268
|
-
@param = OpenAI::Internal::Type::Converter.coerce(String,
|
|
269
|
-
@type = OpenAI::Internal::Type::Converter.coerce(String,
|
|
281
|
+
@code = OpenAI::Internal::Type::Converter.coerce(String, error_metadata(body, :code))
|
|
282
|
+
@param = OpenAI::Internal::Type::Converter.coerce(String, error_metadata(body, :param))
|
|
283
|
+
@type = OpenAI::Internal::Type::Converter.coerce(String, error_metadata(body, :type))
|
|
270
284
|
super(
|
|
271
285
|
url: url,
|
|
272
286
|
status: status,
|
|
@@ -278,6 +292,10 @@ module OpenAI
|
|
|
278
292
|
)
|
|
279
293
|
end
|
|
280
294
|
|
|
295
|
+
private def error_metadata(body, key)
|
|
296
|
+
OpenAI::Internal::Util.dig(body, key) { OpenAI::Internal::Util.dig(body, [:error, key]) }
|
|
297
|
+
end
|
|
298
|
+
|
|
281
299
|
private def safe_status_message(url:, status:, body:)
|
|
282
300
|
sensitive_description = %r{
|
|
283
301
|
https?:// |
|
|
@@ -536,10 +554,11 @@ module OpenAI
|
|
|
536
554
|
attr_reader :error_code
|
|
537
555
|
|
|
538
556
|
def initialize(status:, body:, headers:)
|
|
539
|
-
|
|
557
|
+
error = OpenAI::Internal::Util.dig(body, :error)
|
|
558
|
+
@error_code = OpenAI::Internal::Type::Converter.coerce(OpenAI::Models::OAuthErrorCode, error)
|
|
540
559
|
|
|
541
|
-
message = if
|
|
542
|
-
|
|
560
|
+
message = if (error_description = OpenAI::Internal::Util.dig(body, :error_description))
|
|
561
|
+
error_description
|
|
543
562
|
elsif @error_code
|
|
544
563
|
@error_code
|
|
545
564
|
else
|
data/lib/openai/file_part.rb
CHANGED
|
@@ -30,6 +30,14 @@ module OpenAI
|
|
|
30
30
|
}nx
|
|
31
31
|
private_constant :MEDIA_TYPE
|
|
32
32
|
|
|
33
|
+
# Directory separators recognized on any host, so an upload name is stripped
|
|
34
|
+
# the same way everywhere.
|
|
35
|
+
#
|
|
36
|
+
# @api private
|
|
37
|
+
# @type [Regexp]
|
|
38
|
+
SEPARATORS = %r{[/\\]}
|
|
39
|
+
private_constant :SEPARATORS
|
|
40
|
+
|
|
33
41
|
# Validate an effective media type before it is written to multipart headers.
|
|
34
42
|
#
|
|
35
43
|
# @api private
|
|
@@ -85,7 +93,7 @@ module OpenAI
|
|
|
85
93
|
in Pathname
|
|
86
94
|
content.read(binmode: true)
|
|
87
95
|
in StringIO
|
|
88
|
-
content.string
|
|
96
|
+
content.string.byteslice(content.pos..) || ""
|
|
89
97
|
in IO
|
|
90
98
|
content.read
|
|
91
99
|
in String
|
|
@@ -112,7 +120,7 @@ module OpenAI
|
|
|
112
120
|
@content_type = content_type
|
|
113
121
|
@filename = case [filename, (@content = content)]
|
|
114
122
|
in [String | Pathname, _]
|
|
115
|
-
|
|
123
|
+
strip_directories(filename)
|
|
116
124
|
in [nil, Pathname]
|
|
117
125
|
content.basename.to_path
|
|
118
126
|
in [nil, IO]
|
|
@@ -121,5 +129,30 @@ module OpenAI
|
|
|
121
129
|
filename
|
|
122
130
|
end
|
|
123
131
|
end
|
|
132
|
+
|
|
133
|
+
# Strip directory components from a caller-supplied upload name.
|
|
134
|
+
#
|
|
135
|
+
# `::File.basename` applies the host platform's path rules, so on Windows it
|
|
136
|
+
# also truncates at a drive separator: the remote name `"report: final.md"`
|
|
137
|
+
# becomes `"report"`. This name is sent to the API rather than resolved
|
|
138
|
+
# locally, so drop separators directly and keep every other character, no
|
|
139
|
+
# matter which platform the SDK runs on.
|
|
140
|
+
#
|
|
141
|
+
# @api private
|
|
142
|
+
#
|
|
143
|
+
# @param filename [Pathname, String]
|
|
144
|
+
#
|
|
145
|
+
# @return [String]
|
|
146
|
+
private def strip_directories(filename)
|
|
147
|
+
name = filename.to_s
|
|
148
|
+
binary_name = name.b
|
|
149
|
+
raise ArgumentError, "path name contains null byte" if binary_name.include?("\0")
|
|
150
|
+
|
|
151
|
+
searchable_name = name.scrub { |bytes| "?" * bytes.bytesize }
|
|
152
|
+
basename = searchable_name.split(SEPARATORS).last
|
|
153
|
+
return name.byteslice(0, name.empty? ? 0 : 1) if basename.nil?
|
|
154
|
+
|
|
155
|
+
name.byteslice(searchable_name.byterindex(basename), basename.bytesize)
|
|
156
|
+
end
|
|
124
157
|
end
|
|
125
158
|
end
|