diff --git a/.gitignore b/.gitignore index 294ff13a4..1109521c6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /tmp/ .rspec_status* .test_queue_stats +.idea # Used by dotenv library to load environment variables. .env diff --git a/docs/_core_features/moderation.md b/docs/_core_features/moderation.md index 5de01d020..e735b2841 100644 --- a/docs/_core_features/moderation.md +++ b/docs/_core_features/moderation.md @@ -118,6 +118,11 @@ result = RubyLLM.moderate( provider: "openai", assume_model_exists: true ) + +# Using an image +result = RubyLLM.moderate( + image: "https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png" +) ``` ## Choosing Models diff --git a/lib/ruby_llm/moderation.rb b/lib/ruby_llm/moderation.rb index 5c7a87098..f236a6ee9 100644 --- a/lib/ruby_llm/moderation.rb +++ b/lib/ruby_llm/moderation.rb @@ -12,18 +12,22 @@ def initialize(id:, model:, results:) @results = results end - def self.moderate(input, + def self.moderate(input = nil, model: nil, + image: nil, provider: nil, assume_model_exists: false, context: nil) + raise ArgumentError, 'must provide input text, image, or both' if input.nil? && image.nil? + config = context&.config || RubyLLM.config model ||= config.default_moderation_model || 'omni-moderation-latest' model, provider_instance = Models.resolve(model, provider: provider, assume_exists: assume_model_exists, config: config) model_id = model.id + image = Attachment.new(image) if image - provider_instance.moderate(input, model: model_id) + provider_instance.moderate(input, model: model_id, image: image) end # Convenience method to get content from moderation result diff --git a/lib/ruby_llm/provider.rb b/lib/ruby_llm/provider.rb index a434ac114..88818601e 100644 --- a/lib/ruby_llm/provider.rb +++ b/lib/ruby_llm/provider.rb @@ -75,8 +75,8 @@ def embed(text, model:, dimensions:) parse_embedding_response(response, model:, text:) end - def moderate(input, model:) - payload = render_moderation_payload(input, model:) + def moderate(input, model:, image: nil) + payload = render_moderation_payload(input, model:, image:) response = @connection.post moderation_url, payload parse_moderation_response(response, model:) end diff --git a/lib/ruby_llm/providers/openai/moderation.rb b/lib/ruby_llm/providers/openai/moderation.rb index 631c35cc3..011f21f7c 100644 --- a/lib/ruby_llm/providers/openai/moderation.rb +++ b/lib/ruby_llm/providers/openai/moderation.rb @@ -11,11 +11,17 @@ def moderation_url 'moderations' end - def render_moderation_payload(input, model:) - { - model: model, - input: input - } + def render_moderation_payload(input, model:, image: nil) + mod_input = if image + parts = [] + parts << { type: 'text', text: input } if input + parts << Media.format_image(image) + parts + else + input + end + + { model: model, input: mod_input } end def parse_moderation_response(response, model:) diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_attachments_in_ask_method.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_attachments_in_ask_method.yml index b465581dc..074579586 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_attachments_in_ask_method.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_attachments_in_ask_method.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '384' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_multiple_attachments.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_multiple_attachments.yml index e5c9e9db0..103b576d6 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_multiple_attachments.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_attachment_handling_handles_multiple_attachments.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '2886' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_persists_chat_history.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_persists_chat_history.yml index ad32ce49e..c2c3dad22 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_persists_chat_history.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_persists_chat_history.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '860' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_tracks_token_usage.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_tracks_token_usage.yml index bca18c020..60e04dfe2 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_tracks_token_usage.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_basic_chat_functionality_tracks_token_usage.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '195' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_allows_model_switching.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_allows_model_switching.yml index eb30f344f..884d85898 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_allows_model_switching.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_allows_model_switching.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '175' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_persists_tool_calls_with_custom_classes.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_persists_tool_calls_with_custom_classes.yml index f8f49c5f3..15cf21c5c 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_persists_tool_calls_with_custom_classes.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_persists_tool_calls_with_custom_classes.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '330' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -174,7 +174,7 @@ http_interactions: Openai-Processing-Ms: - '214' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_works_with_namespaced_classes_and_custom_associations.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_works_with_namespaced_classes_and_custom_associations.yml index d0fb42365..be0151771 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_works_with_namespaced_classes_and_custom_associations.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_custom_configurations_namespaced_chat_models_works_with_namespaced_classes_and_custom_associations.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '173' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_default_model_uses_config_default_when_no_model_specified.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_default_model_uses_config_default_when_no_model_specified.yml index be0de348b..6332ddd97 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_default_model_uses_config_default_when_no_model_specified.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_default_model_uses_config_default_when_no_model_specified.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '595' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_calls_on_tool_call_and_on_tool_result_callbacks.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_calls_on_tool_call_and_on_tool_result_callbacks.yml index 5e36b0f66..4651b5b9e 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_calls_on_tool_call_and_on_tool_result_callbacks.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_calls_on_tool_call_and_on_tool_result_callbacks.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '237' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -173,7 +173,7 @@ http_interactions: Openai-Processing-Ms: - '344' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_preserves_user_callbacks_when_using_rails_integration.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_preserves_user_callbacks_when_using_rails_integration.yml index 0a85da8a6..a75772c12 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_preserves_user_callbacks_when_using_rails_integration.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_event_callbacks_preserves_user_callbacks_when_using_rails_integration.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '241' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_extended_thinking_persistence_openai_gpt-5_4_persists_thinking_data_and_replays_it_across_turns.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_extended_thinking_persistence_openai_gpt-5_4_persists_thinking_data_and_replays_it_across_turns.yml index 4bbd55c5c..917327033 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_extended_thinking_persistence_openai_gpt-5_4_persists_thinking_data_and_replays_it_across_turns.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_extended_thinking_persistence_openai_gpt-5_4_persists_thinking_data_and_replays_it_across_turns.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '8389' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -138,7 +138,7 @@ http_interactions: Openai-Processing-Ms: - '16632' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_model_associations_when_model_registry_is_configured_associates_messages_with_model.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_model_associations_when_model_registry_is_configured_associates_messages_with_model.yml index a06c5f679..f873a9a46 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_model_associations_when_model_registry_is_configured_associates_messages_with_model.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_model_associations_when_model_registry_is_configured_associates_messages_with_model.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '199' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_model_switching_allows_changing_models_mid-conversation.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_model_switching_allows_changing_models_mid-conversation.yml index 29abd798f..ecf987eca 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_model_switching_allows_changing_models_mid-conversation.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_model_switching_allows_changing_models_mid-conversation.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '207' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_multi-turn_conversations_with_structured_responses.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_multi-turn_conversations_with_structured_responses.yml index 2552f9fb8..1c9564713 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_multi-turn_conversations_with_structured_responses.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_multi-turn_conversations_with_structured_responses.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '314' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -160,7 +160,7 @@ http_interactions: Openai-Processing-Ms: - '227' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_with_schema_for_structured_responses.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_with_schema_for_structured_responses.yml index 41a2871f4..8b3663730 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_with_schema_for_structured_responses.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_structured_output_supports_with_schema_for_structured_responses.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '264' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_functionality_handles_halt_mechanism_in_tools.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_functionality_handles_halt_mechanism_in_tools.yml index 952bd5e43..2ed3365fd 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_functionality_handles_halt_mechanism_in_tools.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_functionality_handles_halt_mechanism_in_tools.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '248' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_usage_persists_tool_calls.yml b/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_usage_persists_tool_calls.yml index ffa4ecae7..fd8b5b8a8 100644 --- a/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_usage_persists_tool_calls.yml +++ b/spec/fixtures/vcr_cassettes/activerecord_actsas_tool_usage_persists_tool_calls.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '311' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -173,7 +173,7 @@ http_interactions: Openai-Processing-Ms: - '294' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_assume_model_exists_works_with_models_not_in_registry_but_available_in_api.yml b/spec/fixtures/vcr_cassettes/chat_assume_model_exists_works_with_models_not_in_registry_but_available_in_api.yml index 8b465a319..9ae4591a4 100644 --- a/spec/fixtures/vcr_cassettes/chat_assume_model_exists_works_with_models_not_in_registry_but_available_in_api.yml +++ b/spec/fixtures/vcr_cassettes/chat_assume_model_exists_works_with_models_not_in_registry_but_available_in_api.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '276' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_audio.yml b/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_audio.yml index d1d6efa2e..9952b7ea3 100644 --- a/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_audio.yml +++ b/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_audio.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '517' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_mp3_audio.yml b/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_mp3_audio.yml index 23b1f7ee1..855b98618 100644 --- a/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_mp3_audio.yml +++ b/spec/fixtures/vcr_cassettes/chat_audio_models_openai_gpt-4o-mini-audio-preview_can_understand_mp3_audio.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '561' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_handle_multi-turn_conversations.yml b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_handle_multi-turn_conversations.yml index a293eaf2f..83e5823ab 100644 --- a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_handle_multi-turn_conversations.yml +++ b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_handle_multi-turn_conversations.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '1961' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -160,7 +160,7 @@ http_interactions: Openai-Processing-Ms: - '2656' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_have_a_basic_conversation.yml b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_have_a_basic_conversation.yml index 32064c2e0..81fbd5d45 100644 --- a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_have_a_basic_conversation.yml +++ b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_can_have_a_basic_conversation.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '3140' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_replaces_previous_system_messages_when_replace_true.yml b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_replaces_previous_system_messages_when_replace_true.yml index 65e99ffef..0f31027e5 100644 --- a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_replaces_previous_system_messages_when_replace_true.yml +++ b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_replaces_previous_system_messages_when_replace_true.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '8562' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -138,7 +138,7 @@ http_interactions: Openai-Processing-Ms: - '14479' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_returns_raw_responses.yml b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_returns_raw_responses.yml index d0ce664ec..9498ee3f7 100644 --- a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_returns_raw_responses.yml +++ b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_returns_raw_responses.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '1245' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_successfully_uses_the_system_prompt.yml b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_successfully_uses_the_system_prompt.yml index 559764f71..623cbaee8 100644 --- a/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_successfully_uses_the_system_prompt.yml +++ b/spec/fixtures/vcr_cassettes/chat_basic_chat_functionality_openai_gpt-5-nano_successfully_uses_the_system_prompt.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '9777' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_content_object_support_openai_gpt-5-nano_preserves_content_objects_returned_from_tools.yml b/spec/fixtures/vcr_cassettes/chat_content_object_support_openai_gpt-5-nano_preserves_content_objects_returned_from_tools.yml index def14bf6c..0440abe22 100644 --- a/spec/fixtures/vcr_cassettes/chat_content_object_support_openai_gpt-5-nano_preserves_content_objects_returned_from_tools.yml +++ b/spec/fixtures/vcr_cassettes/chat_content_object_support_openai_gpt-5-nano_preserves_content_objects_returned_from_tools.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '3229' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -174,7 +174,7 @@ http_interactions: Openai-Processing-Ms: - '448' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_error_handling_raises_an_error_when_tool_execution_fails.yml b/spec/fixtures/vcr_cassettes/chat_error_handling_raises_an_error_when_tool_execution_fails.yml index b965d901c..ec20eb38f 100644 --- a/spec/fixtures/vcr_cassettes/chat_error_handling_raises_an_error_when_tool_execution_fails.yml +++ b/spec/fixtures/vcr_cassettes/chat_error_handling_raises_an_error_when_tool_execution_fails.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '726' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_handle_multiple_tool_calls_in_a_single_response.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_handle_multiple_tool_calls_in_a_single_response.yml index b5da9ddd7..ffbcf1122 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_handle_multiple_tool_calls_in_a_single_response.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_handle_multiple_tool_calls_in_a_single_response.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '9419' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -191,7 +191,7 @@ http_interactions: Openai-Processing-Ms: - '3786' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_parallel_tool_calls.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_parallel_tool_calls.yml index 2b2e6e502..7c3f4b931 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_parallel_tool_calls.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_parallel_tool_calls.yml @@ -53,7 +53,7 @@ http_interactions: Openai-Processing-Ms: - '2629' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -187,7 +187,7 @@ http_interactions: Openai-Processing-Ms: - '2607' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools.yml index 52c7949ed..e0449a8b9 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '1503' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '2431' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_in_multi-turn_conversations.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_in_multi-turn_conversations.yml index 0b6e2959c..3bfd01267 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_in_multi-turn_conversations.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_in_multi-turn_conversations.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '1782' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '3033' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -258,7 +258,7 @@ http_interactions: Openai-Processing-Ms: - '1719' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -386,7 +386,7 @@ http_interactions: Openai-Processing-Ms: - '3982' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_with_multi-turn_streaming_conversations.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_with_multi-turn_streaming_conversations.yml index 53338383d..abba6f58d 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_with_multi-turn_streaming_conversations.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_with_multi-turn_streaming_conversations.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '3013' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -168,7 +168,7 @@ http_interactions: Openai-Processing-Ms: - '2739' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -251,7 +251,7 @@ http_interactions: Openai-Processing-Ms: - '2354' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -372,7 +372,7 @@ http_interactions: Openai-Processing-Ms: - '2387' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters.yml index d11a745e6..8ebcafe6b 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '1754' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -170,7 +170,7 @@ http_interactions: Openai-Processing-Ms: - '5138' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters_in_multi-turn_streaming_conversations.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters_in_multi-turn_streaming_conversations.yml index d03307997..91fc5b218 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters_in_multi-turn_streaming_conversations.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_can_use_tools_without_parameters_in_multi-turn_streaming_conversations.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '1289' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -137,7 +137,7 @@ http_interactions: Openai-Processing-Ms: - '4464' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -508,7 +508,7 @@ http_interactions: Openai-Processing-Ms: - '5656' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_anyof_params.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_anyof_params.yml index 2e12b2289..0ca6a27fe 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_anyof_params.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_anyof_params.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '1894' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_array_params.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_array_params.yml index 6c838a96d..661c15f93 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_array_params.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_array_params.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '2196' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_object_params.yml b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_object_params.yml index 104c8e191..428d328c7 100644 --- a/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_object_params.yml +++ b/spec/fixtures/vcr_cassettes/chat_function_calling_openai_gpt-5-nano_handles_object_params.yml @@ -52,7 +52,7 @@ http_interactions: Openai-Processing-Ms: - '2351' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_halt_functionality_adds_halt_content_to_conversation_history.yml b/spec/fixtures/vcr_cassettes/chat_halt_functionality_adds_halt_content_to_conversation_history.yml index a0f3e7285..b1764fc43 100644 --- a/spec/fixtures/vcr_cassettes/chat_halt_functionality_adds_halt_content_to_conversation_history.yml +++ b/spec/fixtures/vcr_cassettes/chat_halt_functionality_adds_halt_content_to_conversation_history.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '875' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_halt_functionality_does_not_continue_conversation_after_halt.yml b/spec/fixtures/vcr_cassettes/chat_halt_functionality_does_not_continue_conversation_after_halt.yml index d4ae25348..02b3c0c3b 100644 --- a/spec/fixtures/vcr_cassettes/chat_halt_functionality_does_not_continue_conversation_after_halt.yml +++ b/spec/fixtures/vcr_cassettes/chat_halt_functionality_does_not_continue_conversation_after_halt.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '554' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_halt_functionality_returns_halt_object_when_tool_halts.yml b/spec/fixtures/vcr_cassettes/chat_halt_functionality_returns_halt_object_when_tool_halts.yml index 249150a89..97b3fb324 100644 --- a/spec/fixtures/vcr_cassettes/chat_halt_functionality_returns_halt_object_when_tool_halts.yml +++ b/spec/fixtures/vcr_cassettes/chat_halt_functionality_returns_halt_object_when_tool_halts.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '1267' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_can_handle_array_of_mixed_files_with_auto-detection.yml b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_can_handle_array_of_mixed_files_with_auto-detection.yml index fe62a619b..477a3972e 100644 --- a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_can_handle_array_of_mixed_files_with_auto-detection.yml +++ b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_can_handle_array_of_mixed_files_with_auto-detection.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '21302' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_handles_multiple_pdfs.yml b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_handles_multiple_pdfs.yml index ce67913ca..b052bd55d 100644 --- a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_handles_multiple_pdfs.yml +++ b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_handles_multiple_pdfs.yml @@ -113,7 +113,7 @@ http_interactions: Openai-Processing-Ms: - '11786' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -206,7 +206,7 @@ http_interactions: Openai-Processing-Ms: - '26924' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_understands_pdfs.yml b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_understands_pdfs.yml index d892f0147..f7076335b 100644 --- a/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_understands_pdfs.yml +++ b/spec/fixtures/vcr_cassettes/chat_pdf_models_openai_gpt-5-nano_understands_pdfs.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '7986' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -132,7 +132,7 @@ http_interactions: Openai-Processing-Ms: - '11938' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_reports_consistent_token_counts_compared_to_non-streaming.yml b/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_reports_consistent_token_counts_compared_to_non-streaming.yml index 68d222e75..7558d81ae 100644 --- a/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_reports_consistent_token_counts_compared_to_non-streaming.yml +++ b/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_reports_consistent_token_counts_compared_to_non-streaming.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '102' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -145,7 +145,7 @@ http_interactions: Openai-Processing-Ms: - '172' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_supports_streaming_responses.yml b/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_supports_streaming_responses.yml index b6d706b70..212dc600c 100644 --- a/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_supports_streaming_responses.yml +++ b/spec/fixtures/vcr_cassettes/chat_streaming_responses_openai_gpt-5-nano_supports_streaming_responses.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '1574' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_remote_text.yml b/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_remote_text.yml index 5c1f48eae..a8e45960a 100644 --- a/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_remote_text.yml +++ b/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_remote_text.yml @@ -177,7 +177,7 @@ http_interactions: Openai-Processing-Ms: - '13510' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_text.yml b/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_text.yml index e58a25799..62506bde0 100644 --- a/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_text.yml +++ b/spec/fixtures/vcr_cassettes/chat_text_models_openai_gpt-5-nano_can_understand_text.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '2976' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -163,7 +163,7 @@ http_interactions: Openai-Processing-Ms: - '3919' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_both_on_tool_call_and_on_tool_result_callbacks_in_order.yml b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_both_on_tool_call_and_on_tool_result_callbacks_in_order.yml index 3986c9e67..95804675b 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_both_on_tool_call_and_on_tool_result_callbacks_in_order.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_both_on_tool_call_and_on_tool_result_callbacks_in_order.yml @@ -49,7 +49,7 @@ http_interactions: Openai-Processing-Ms: - '630' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -171,7 +171,7 @@ http_interactions: Openai-Processing-Ms: - '576' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_call_callback_when_tools_are_used.yml b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_call_callback_when_tools_are_used.yml index 54d80b196..694ff8cfe 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_call_callback_when_tools_are_used.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_call_callback_when_tools_are_used.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '813' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '678' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_result_callback_when_tools_return_results.yml b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_result_callback_when_tools_return_results.yml index f22b8d05b..e23c10fde 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_result_callback_when_tools_return_results.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_call_callbacks_calls_on_tool_result_callback_when_tools_return_results.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '546' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '565' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_calls_one_for_sequential_execution.yml b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_calls_one_for_sequential_execution.yml index 8b71e0342..696982613 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_calls_one_for_sequential_execution.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_calls_one_for_sequential_execution.yml @@ -54,7 +54,7 @@ http_interactions: Openai-Processing-Ms: - '1585' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -181,7 +181,7 @@ http_interactions: Openai-Processing-Ms: - '290' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -308,7 +308,7 @@ http_interactions: Openai-Processing-Ms: - '632' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_none.yml b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_none.yml index eb568e0a5..e2ba2043d 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_none.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_none.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '9762' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_required_for_unrelated_queries.yml b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_required_for_unrelated_queries.yml index 31b2e5137..0da206fcb 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_required_for_unrelated_queries.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_choice_required_for_unrelated_queries.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '4411' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '5997' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_specific_tool_choice.yml b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_specific_tool_choice.yml index 5a2e839c7..db11b9853 100644 --- a/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_specific_tool_choice.yml +++ b/spec/fixtures/vcr_cassettes/chat_tool_choice_and_calls_control_openai_gpt-5-nano_respects_specific_tool_choice.yml @@ -51,7 +51,7 @@ http_interactions: Openai-Processing-Ms: - '6476' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -175,7 +175,7 @@ http_interactions: Openai-Processing-Ms: - '14032' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_local_images.yml b/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_local_images.yml index 11ad6f85e..242129f00 100644 --- a/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_local_images.yml +++ b/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_local_images.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '7428' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_remote_images_without_extension.yml b/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_remote_images_without_extension.yml index 57c7c77d0..6e141525a 100644 --- a/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_remote_images_without_extension.yml +++ b/spec/fixtures/vcr_cassettes/chat_vision_models_openai_gpt-5-nano_can_understand_remote_images_without_extension.yml @@ -85,7 +85,7 @@ http_interactions: Openai-Processing-Ms: - '7521' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_preserves_thinking_signatures_between_turns_when_provided.yml b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_preserves_thinking_signatures_between_turns_when_provided.yml index 29230c7b3..fc4761e26 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_preserves_thinking_signatures_between_turns_when_provided.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_preserves_thinking_signatures_between_turns_when_provided.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '574' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -159,7 +159,7 @@ http_interactions: Openai-Processing-Ms: - '596' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_returns_thinking_when_available.yml b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_returns_thinking_when_available.yml index 0054321db..adcce4366 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_returns_thinking_when_available.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_returns_thinking_when_available.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '24492' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_streams_thinking_content_when_available.yml b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_streams_thinking_content_when_available.yml index 015d8db9d..b8d744b5f 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_streams_thinking_content_when_available.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_extended_thinking_openai_gpt-5_4_streams_thinking_content_when_available.yml @@ -50,7 +50,7 @@ http_interactions: Openai-Processing-Ms: - '9918' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_params_openai_gpt-5-nano_supports_response_format_param.yml b/spec/fixtures/vcr_cassettes/chat_with_params_openai_gpt-5-nano_supports_response_format_param.yml index 94188aac3..54510b9ef 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_params_openai_gpt-5-nano_supports_response_format_param.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_params_openai_gpt-5-nano_supports_response_format_param.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '1275' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_a_json_schema_and_returns_structured_output.yml b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_a_json_schema_and_returns_structured_output.yml index 6c6a565d1..cc42089fa 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_a_json_schema_and_returns_structured_output.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_a_json_schema_and_returns_structured_output.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '3875' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_rubyllm_schema_class_instances_and_returns_structured_output.yml b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_rubyllm_schema_class_instances_and_returns_structured_output.yml index 8b482a9b4..430a5f1be 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_rubyllm_schema_class_instances_and_returns_structured_output.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_accepts_rubyllm_schema_class_instances_and_returns_structured_output.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '1898' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_allows_removing_schema_with_nil_mid-conversation.yml b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_allows_removing_schema_with_nil_mid-conversation.yml index 9260134d0..21465b637 100644 --- a/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_allows_removing_schema_with_nil_mid-conversation.yml +++ b/spec/fixtures/vcr_cassettes/chat_with_schema_with_openai_gpt-5-nano_allows_removing_schema_with_nil_mid-conversation.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '5049' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -159,7 +159,7 @@ http_interactions: Openai-Processing-Ms: - '13460' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/context_context_embed_operations_allows_specifying_a_model_at_embed_time.yml b/spec/fixtures/vcr_cassettes/context_context_embed_operations_allows_specifying_a_model_at_embed_time.yml index d3a1cd9d4..6274c24a9 100644 --- a/spec/fixtures/vcr_cassettes/context_context_embed_operations_allows_specifying_a_model_at_embed_time.yml +++ b/spec/fixtures/vcr_cassettes/context_context_embed_operations_allows_specifying_a_model_at_embed_time.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '60' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/context_context_embed_operations_respects_context-specific_embedding_model.yml b/spec/fixtures/vcr_cassettes/context_context_embed_operations_respects_context-specific_embedding_model.yml index 79fb034a6..79f98ce77 100644 --- a/spec/fixtures/vcr_cassettes/context_context_embed_operations_respects_context-specific_embedding_model.yml +++ b/spec/fixtures/vcr_cassettes/context_context_embed_operations_respects_context-specific_embedding_model.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '92' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: @@ -121,7 +121,7 @@ http_interactions: Openai-Processing-Ms: - '75' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text.yml b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text.yml index 6bc4e8abb..36ff1c1d7 100644 --- a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text.yml +++ b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '40' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text_with_custom_dimensions.yml b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text_with_custom_dimensions.yml index 5b10fb91a..919db4574 100644 --- a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text_with_custom_dimensions.yml +++ b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_a_single_text_with_custom_dimensions.yml @@ -48,7 +48,7 @@ http_interactions: Openai-Processing-Ms: - '68' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts.yml b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts.yml index 5b17ff198..ccaf3aeaf 100644 --- a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts.yml +++ b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '75' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts_with_custom_dimensions.yml b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts_with_custom_dimensions.yml index fff6fa466..3a3a0dc88 100644 --- a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts_with_custom_dimensions.yml +++ b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_can_handle_multiple_texts_with_custom_dimensions.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '50' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_handles_single-string_arrays_consistently.yml b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_handles_single-string_arrays_consistently.yml index d1355e2cc..616e652be 100644 --- a/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_handles_single-string_arrays_consistently.yml +++ b/spec/fixtures/vcr_cassettes/embedding_basic_functionality_openai_text-embedding-3-small_handles_single-string_arrays_consistently.yml @@ -47,7 +47,7 @@ http_interactions: Openai-Processing-Ms: - '77' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' X-Openai-Proxy-Wasm: diff --git a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_can_paint_images.yml b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_can_paint_images.yml index e51c12c73..a899341a7 100644 --- a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_can_paint_images.yml +++ b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_can_paint_images.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_supports_custom_sizes.yml b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_supports_custom_sizes.yml index 56ac1447c..2a09270e4 100644 --- a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_supports_custom_sizes.yml +++ b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_dall-e-3_supports_custom_sizes.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_gpt-image-1_can_paint_images.yml b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_gpt-image-1_can_paint_images.yml index 1576cf666..da1fd055d 100644 --- a/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_gpt-image-1_can_paint_images.yml +++ b/spec/fixtures/vcr_cassettes/image_basic_functionality_openai_gpt-image-1_can_paint_images.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_can_be_called_directly_on_the_moderation_class.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_can_be_called_directly_on_the_moderation_class.yml index 2c3705427..9eb0e283c 100644 --- a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_can_be_called_directly_on_the_moderation_class.yml +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_can_be_called_directly_on_the_moderation_class.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_an_image_without_text.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_an_image_without_text.yml new file mode 100644 index 000000000..1f67a85b8 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_an_image_without_text.yml @@ -0,0 +1,129 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.openai.com/v1/moderations + body: + encoding: UTF-8 + string: '{"model":"omni-moderation-latest","input":[{"type":"image_url","image_url":{"url":"https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png"}}]}' + headers: + User-Agent: + - Faraday v2.14.1 + Authorization: + - Bearer + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 06 Apr 2026 20:12:07 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Server: + - cloudflare + Openai-Version: + - '2020-10-01' + Openai-Organization: + - "" + Openai-Project: + - "" + X-Request-Id: + - "" + Openai-Processing-Ms: + - '542' + X-Openai-Proxy-Wasm: + - v0.1 + Cf-Cache-Status: + - DYNAMIC + Set-Cookie: + - "" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + X-Content-Type-Options: + - nosniff + Cf-Ray: + - "" + Alt-Svc: + - h3=":443"; ma=86400 + body: + encoding: ASCII-8BIT + string: |- + { + "id": "modr-5064", + "model": "omni-moderation-latest", + "results": [ + { + "flagged": false, + "categories": { + "harassment": false, + "harassment/threatening": false, + "sexual": false, + "hate": false, + "hate/threatening": false, + "illicit": false, + "illicit/violent": false, + "self-harm/intent": false, + "self-harm/instructions": false, + "self-harm": false, + "sexual/minors": false, + "violence": false, + "violence/graphic": false + }, + "category_scores": { + "harassment": 0.0, + "harassment/threatening": 0.0, + "sexual": 0.00009253848866495987, + "hate": 0.0, + "hate/threatening": 0.0, + "illicit": 0.0, + "illicit/violent": 0.0, + "self-harm/intent": 4.400118457925303e-6, + "self-harm/instructions": 1.9525885208642222e-6, + "self-harm": 0.0004682423007537106, + "sexual/minors": 0.0, + "violence": 0.0005479579113182372, + "violence/graphic": 0.00001488384825728813 + }, + "category_applied_input_types": { + "harassment": [], + "harassment/threatening": [], + "sexual": [ + "image" + ], + "hate": [], + "hate/threatening": [], + "illicit": [], + "illicit/violent": [], + "self-harm/intent": [ + "image" + ], + "self-harm/instructions": [ + "image" + ], + "self-harm": [ + "image" + ], + "sexual/minors": [], + "violence": [ + "image" + ], + "violence/graphic": [ + "image" + ] + } + } + ] + } + recorded_at: Mon, 06 Apr 2026 20:12:07 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_content_and_returns_a_moderation_instance.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_content_and_returns_a_moderation_instance.yml index ff6a1cc59..2524c654a 100644 --- a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_content_and_returns_a_moderation_instance.yml +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_content_and_returns_a_moderation_instance.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_text_with_an_image.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_text_with_an_image.yml new file mode 100644 index 000000000..08a40bab9 --- /dev/null +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_moderates_text_with_an_image.yml @@ -0,0 +1,150 @@ +--- +http_interactions: +- request: + method: post + uri: https://api.openai.com/v1/moderations + body: + encoding: UTF-8 + string: '{"model":"omni-moderation-latest","input":[{"type":"text","text":"describe + this image"},{"type":"image_url","image_url":{"url":"https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png"}}]}' + headers: + User-Agent: + - Faraday v2.14.1 + Authorization: + - Bearer + Content-Type: + - application/json + Accept-Encoding: + - gzip;q=1.0,deflate;q=0.6,identity;q=0.3 + Accept: + - "*/*" + response: + status: + code: 200 + message: OK + headers: + Date: + - Mon, 06 Apr 2026 20:12:06 GMT + Content-Type: + - application/json + Transfer-Encoding: + - chunked + Connection: + - keep-alive + Server: + - cloudflare + Openai-Version: + - '2020-10-01' + Openai-Organization: + - "" + Openai-Project: + - "" + X-Request-Id: + - "" + Openai-Processing-Ms: + - '1232' + X-Openai-Proxy-Wasm: + - v0.1 + Cf-Cache-Status: + - DYNAMIC + Set-Cookie: + - "" + Strict-Transport-Security: + - max-age=31536000; includeSubDomains; preload + X-Content-Type-Options: + - nosniff + Cf-Ray: + - "" + Alt-Svc: + - h3=":443"; ma=86400 + body: + encoding: ASCII-8BIT + string: |- + { + "id": "modr-1430", + "model": "omni-moderation-latest", + "results": [ + { + "flagged": false, + "categories": { + "harassment": false, + "harassment/threatening": false, + "sexual": false, + "hate": false, + "hate/threatening": false, + "illicit": false, + "illicit/violent": false, + "self-harm/intent": false, + "self-harm/instructions": false, + "self-harm": false, + "sexual/minors": false, + "violence": false, + "violence/graphic": false + }, + "category_scores": { + "harassment": 0.0000295957113513077, + "harassment/threatening": 2.2827997192887966e-6, + "sexual": 0.00008969393236719384, + "hate": 0.000010071400221737608, + "hate/threatening": 4.860448402299843e-7, + "illicit": 7.484622751061123e-6, + "illicit/violent": 2.355261854303796e-6, + "self-harm/intent": 4.264746818557914e-6, + "self-harm/instructions": 1.4285517650093407e-6, + "self-harm": 0.0004624317865236275, + "sexual/minors": 2.0785170435063726e-6, + "violence": 0.0005224900751216392, + "violence/graphic": 0.000017400543552708932 + }, + "category_applied_input_types": { + "harassment": [ + "text" + ], + "harassment/threatening": [ + "text" + ], + "sexual": [ + "text", + "image" + ], + "hate": [ + "text" + ], + "hate/threatening": [ + "text" + ], + "illicit": [ + "text" + ], + "illicit/violent": [ + "text" + ], + "self-harm/intent": [ + "text", + "image" + ], + "self-harm/instructions": [ + "text", + "image" + ], + "self-harm": [ + "text", + "image" + ], + "sexual/minors": [ + "text" + ], + "violence": [ + "text", + "image" + ], + "violence/graphic": [ + "text", + "image" + ] + } + } + ] + } + recorded_at: Mon, 06 Apr 2026 20:12:06 GMT +recorded_with: VCR 6.4.0 diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_provides_convenience_methods_for_checking_results.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_provides_convenience_methods_for_checking_results.yml index 03e444238..1920e8085 100644 --- a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_provides_convenience_methods_for_checking_results.yml +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_provides_convenience_methods_for_checking_results.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_supports_explicit_model_specification.yml b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_supports_explicit_model_specification.yml index 099c1f460..17342ac95 100644 --- a/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_supports_explicit_model_specification.yml +++ b/spec/fixtures/vcr_cassettes/moderation_moderate_with_openai_provider_supports_explicit_model_specification.yml @@ -37,7 +37,7 @@ http_interactions: Openai-Organization: - "" Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" X-Request-Id: - "" Openai-Processing-Ms: diff --git a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_audio.yml b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_audio.yml index 08373338e..512c395b4 100644 --- a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_audio.yml +++ b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_audio.yml @@ -40,7 +40,7 @@ http_interactions: Openai-Processing-Ms: - '1166' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' Server: diff --git a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_with_language_hint.yml b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_with_language_hint.yml index 156929df2..dab9f4048 100644 --- a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_with_language_hint.yml +++ b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_gpt-4o-transcribe-diarize_can_transcribe_with_language_hint.yml @@ -40,7 +40,7 @@ http_interactions: Openai-Processing-Ms: - '1006' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' Server: diff --git a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_audio.yml b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_audio.yml index ad71b3850..279adeaef 100644 --- a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_audio.yml +++ b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_audio.yml @@ -40,7 +40,7 @@ http_interactions: Openai-Processing-Ms: - '465' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' Server: diff --git a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_with_language_hint.yml b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_with_language_hint.yml index 5c4c5fd64..c02bd4e6d 100644 --- a/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_with_language_hint.yml +++ b/spec/fixtures/vcr_cassettes/transcription_basic_functionality_openai_whisper-1_can_transcribe_with_language_hint.yml @@ -40,7 +40,7 @@ http_interactions: Openai-Processing-Ms: - '471' Openai-Project: - - proj_61L3Oqt640dKU0CASS2iOj8Q + - "" Openai-Version: - '2020-10-01' Server: diff --git a/spec/ruby_llm/moderation_spec.rb b/spec/ruby_llm/moderation_spec.rb index bb9980fd4..cddce9a04 100644 --- a/spec/ruby_llm/moderation_spec.rb +++ b/spec/ruby_llm/moderation_spec.rb @@ -41,6 +41,28 @@ expect(result).to be_a(described_class) expect(result.model).to be_present end + + it 'moderates text with an image' do + result = RubyLLM.moderate('describe this image', + image: 'https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png') + + expect(result).to be_a(described_class) + expect(result.results).to be_an(Array) + expect(result.flagged?).to be_in([true, false]) + end + + it 'moderates an image without text' do + result = RubyLLM.moderate(image: 'https://upload.wikimedia.org/wikipedia/en/7/7d/Lenna_%28test_image%29.png') + + expect(result).to be_a(described_class) + expect(result.results).to be_an(Array) + end + end + end + + describe 'argument validation' do + it 'raises ArgumentError when neither text nor image is provided' do + expect { RubyLLM.moderate }.to raise_error(ArgumentError, 'must provide input text, image, or both') end end end diff --git a/spec/support/vcr_configuration.rb b/spec/support/vcr_configuration.rb index 52772be4f..8516a75e7 100644 --- a/spec/support/vcr_configuration.rb +++ b/spec/support/vcr_configuration.rb @@ -80,6 +80,9 @@ config.filter_sensitive_data('') do |interaction| interaction.response.headers['Openai-Organization']&.first end + config.filter_sensitive_data('') do |interaction| + interaction.response.headers['Openai-Project']&.first + end config.filter_sensitive_data('') do |interaction| interaction.response.headers['Anthropic-Organization-Id']&.first end