From aebde2a31f87cb38522624a39f31055fc00f9d5e Mon Sep 17 00:00:00 2001 From: yucheng Date: Thu, 1 Oct 2026 18:18:19 +0000 Subject: [PATCH] style: wrap batch hidden-params cast for ruff format Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/litellm_core_utils/litellm_logging.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index f2694c6c298..59a0cf83bb5 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -6437,7 +6437,9 @@ def _extract_response_obj_and_hidden_params( if original_exception is not None and hidden_params is None: exception_hidden_params: Final = getattr(original_exception, "_hidden_params", None) if isinstance(exception_hidden_params, dict) and exception_hidden_params: - hidden_params = dict(cast("dict[str, object]", exception_hidden_params)) # cast-ok: isinstance(dict) leaves the value type unparameterized; mutable-ok: hidden_params downstream expects a plain dict + # cast-ok: isinstance(dict) leaves the value type unparameterized + # mutable-ok: hidden_params downstream expects a plain dict + hidden_params = dict(cast("dict[str, object]", exception_hidden_params)) elif (response_headers := _get_response_headers(original_exception)) is not None: hidden_params = dict( StandardLoggingHiddenParams(