From e757801b65405147ea9548e0c8e405a8343280c3 Mon Sep 17 00:00:00 2001 From: Jasim Kareem Date: Tue, 15 Sep 2026 07:42:54 +0000 Subject: [PATCH 1/2] fix(vllm): pass response_format through omni video EngineInputs _engine_inputs_from_video dropped req.response_format, so b64_json requests fell back to a pod-local file URL. Image and audio builders already forward the delivery format; T2V and I2V share this path. Signed-off-by: Jasim Kareem Co-authored-by: Jasim Kareem --- .../src/dynamo/vllm/omni/omni_handler.py | 1 + .../vllm/tests/omni/test_omni_handler.py | 32 +++++++++++++++++++ 2 files changed, 33 insertions(+) diff --git a/components/src/dynamo/vllm/omni/omni_handler.py b/components/src/dynamo/vllm/omni/omni_handler.py index e7dbee1b1bc8..a55266950a63 100644 --- a/components/src/dynamo/vllm/omni/omni_handler.py +++ b/components/src/dynamo/vllm/omni/omni_handler.py @@ -810,5 +810,6 @@ def _engine_inputs_from_video( sampling_params_list=sampling_params_list, request_type=RequestType.VIDEO_GENERATION, fps=fps, + response_format=req.response_format, lora_request=lora_request, ) diff --git a/components/src/dynamo/vllm/tests/omni/test_omni_handler.py b/components/src/dynamo/vllm/tests/omni/test_omni_handler.py index f82000e003d2..8e30c36f5db0 100644 --- a/components/src/dynamo/vllm/tests/omni/test_omni_handler.py +++ b/components/src/dynamo/vllm/tests/omni/test_omni_handler.py @@ -203,6 +203,38 @@ async def test_video_generation(self): assert inputs.request_type == RequestType.VIDEO_GENERATION assert inputs.prompt["prompt"] == "a drone" assert inputs.fps > 0 + assert inputs.response_format is None + + @pytest.mark.parametrize("response_format", ["b64_json", "url"]) + @pytest.mark.asyncio + async def test_image_generation_forwards_response_format(self, response_format): + """Image EngineInputs must keep an explicit response_format.""" + handler = _make_handler() + req = NvCreateImageRequest( + prompt="a cat", size="512x512", response_format=response_format + ) + inputs = await handler.build_engine_inputs(req, RequestType.IMAGE_GENERATION) + assert inputs.response_format == response_format + + @pytest.mark.parametrize("response_format", ["b64_json", "url"]) + @pytest.mark.asyncio + async def test_video_and_i2v_forward_response_format(self, response_format): + """T2V and I2V share _engine_inputs_from_video; b64_json must not be dropped.""" + handler = _make_handler() + req = NvCreateVideoRequest( + prompt="a drone", + model="test-model", + size="832x480", + response_format=response_format, + ) + t2v = await handler.build_engine_inputs(req, RequestType.VIDEO_GENERATION) + assert t2v.response_format == response_format + + img = Image.new("RGB", (64, 64), color="red") + i2v = await handler.build_engine_inputs( + req, RequestType.VIDEO_GENERATION, image=img + ) + assert i2v.response_format == response_format @pytest.mark.asyncio async def test_audio_generation_delegates_toaudio(self): From 4ffdc68302b635143b6926d5443aeac0a88e39c0 Mon Sep 17 00:00:00 2001 From: Jasim Kareem Date: Thu, 17 Sep 2026 19:34:57 +0000 Subject: [PATCH 2/2] test(vllm): drop image response_format forwarding test Keep video and I2V coverage for b64_json and url. This PR only threads response_format through the video engine path. Signed-off-by: Jasim Kareem Co-authored-by: Jasim Kareem --- .../src/dynamo/vllm/tests/omni/test_omni_handler.py | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/components/src/dynamo/vllm/tests/omni/test_omni_handler.py b/components/src/dynamo/vllm/tests/omni/test_omni_handler.py index 8e30c36f5db0..d6dcf00d41f4 100644 --- a/components/src/dynamo/vllm/tests/omni/test_omni_handler.py +++ b/components/src/dynamo/vllm/tests/omni/test_omni_handler.py @@ -205,17 +205,6 @@ async def test_video_generation(self): assert inputs.fps > 0 assert inputs.response_format is None - @pytest.mark.parametrize("response_format", ["b64_json", "url"]) - @pytest.mark.asyncio - async def test_image_generation_forwards_response_format(self, response_format): - """Image EngineInputs must keep an explicit response_format.""" - handler = _make_handler() - req = NvCreateImageRequest( - prompt="a cat", size="512x512", response_format=response_format - ) - inputs = await handler.build_engine_inputs(req, RequestType.IMAGE_GENERATION) - assert inputs.response_format == response_format - @pytest.mark.parametrize("response_format", ["b64_json", "url"]) @pytest.mark.asyncio async def test_video_and_i2v_forward_response_format(self, response_format):