The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
test(videos): lock AzureVideoConfig inherited file-less multipart behavior
mateo-berri51ab4c74867d
diff --git a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.pyindex b78829e2e11..a93b14d45f3 100644--- a/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py+++ b/tests/test_litellm/llms/custom_httpx/test_llm_http_handler.py@@ -26,6 +26,7 @@ from litellm.llms.custom_httpx.llm_http_handler import (_has_pre_call_deployment_hook,_rust_responses_websocket_enabled,)+from litellm.llms.azure.videos.transformation import AzureVideoConfigfrom litellm.llms.openai.videos.transformation import OpenAIVideoConfigfrom litellm.types.llms.openai import ResponsesAPIResponsefrom litellm.types.router import GenericLiteLLMParams@@ -2604,6 +2605,27 @@ async def test_async_video_generation_without_file_sends_multipart_form_data():assert result.status == "queued"+def test_azure_video_generation_without_file_sends_multipart_form_data():+ """AzureVideoConfig subclasses OpenAIVideoConfig, so it inherits the+ file-less multipart behavior. Azure's /openai/v1/videos surface is+ OpenAI-SDK-compatible (the SDK sends multipart there too), so this is+ intentional; lock it so the inherited flip can't silently regress to JSON."""+ assert AzureVideoConfig().use_multipart_form_data() is True++ captured = {}+ client = HTTPHandler(client=httpx.Client(transport=httpx.MockTransport(_capture_video_create_request(captured))))++ result = BaseLLMHTTPHandler().video_generation_handler(client=client, **_video_create_call_kwargs(AzureVideoConfig()))++ assert captured["content_type"].startswith("multipart/form-data")+ assert _multipart_text_fields(captured["content_type"], captured["body"]) == {+ "model": "sora-2",+ "prompt": "a cat surfing",+ "seconds": "4",+ }+ assert result.status == "queued"++def test_video_generation_json_provider_keeps_json_body():captured = {}client = HTTPHandler(client=httpx.Client(transport=httpx.MockTransport(_capture_video_create_request(captured))))