[Bugfix] Return 400 instead of 500 when multimodal data is sent to a text-only model (#48473)

Signed-off-by: Hoang Nguyen Tien <hoang.nguyentien.2601@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hoang Nguyen
2026-07-14 08:15:43 +00:00
committed by GitHub
co-authored by Claude Opus 4.8
parent 894ebb27f5
commit 038ec293b1
2 changed files with 32 additions and 2 deletions
+2 -2
View File
@@ -735,13 +735,13 @@ class BaseRenderer(ABC, Generic[_T]):
*,
skip_mm_cache: bool = False,
) -> "MultiModalInput":
mm_req_id = f"renderer{self.api_process_rank}-mm-{self._mm_req_counter.inc(1)}"
if skip_mm_cache and self._readonly_mm_processor is not None:
mm_processor = self._readonly_mm_processor
else:
mm_processor = self.get_mm_processor()
mm_req_id = f"renderer{self.api_process_rank}-mm-{self._mm_req_counter.inc(1)}"
mm_data_items = mm_processor.info.parse_mm_data(mm_data)
mm_uuid_items = parse_mm_uuids(mm_uuids)