From 9f4934e2a506aeee2ab08e89183b3fc53b533186 Mon Sep 17 00:00:00 2001 From: vanika02 Date: Sat, 15 Aug 2026 04:48:38 +0000 Subject: [PATCH] style(responses): explain type validation suppressions --- litellm/responses/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/responses/main.py b/litellm/responses/main.py index 891f845dacd..b201f139fea 100644 --- a/litellm/responses/main.py +++ b/litellm/responses/main.py @@ -465,7 +465,7 @@ async def aresponses( ) and litellm_logging_obj.should_run_prompt_management_hooks(prompt_id=prompt_id, non_default_params=kwargs): if isinstance(input, str): client_input: list[AllMessageValues] = [{"role": "user", "content": input}] - elif not isinstance(input, list): # pyright: ignore[reportUnnecessaryIsInstance] + elif not isinstance(input, list): # pyright: ignore[reportUnnecessaryIsInstance] # runtime input can come from untrusted client payload raise litellm.BadRequestError( message=f"'input' must be a string or list of input items, got {type(input).__name__}", model=model, @@ -585,7 +585,7 @@ def _apply_prompt_management_to_responses_call( if isinstance(input, str): client_input: list[AllMessageValues] = [{"role": "user", "content": input}] - elif not isinstance(input, list): # pyright: ignore[reportUnnecessaryIsInstance] + elif not isinstance(input, list): # pyright: ignore[reportUnnecessaryIsInstance] # runtime input can come from untrusted client payload raise litellm.BadRequestError( message=f"'input' must be a string or list of input items, got {type(input).__name__}", model=model,