From 56241e937a875abeab1b2a55476bb1377e72f045 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Mon, 11 Aug 2025 18:19:47 -0700 Subject: [PATCH] fix(handle_error.py): don't return backend exception to user - can contain prompt leakage Fixes https://github.com/BerriAI/litellm/issues/13329 --- litellm/router_utils/handle_error.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/router_utils/handle_error.py b/litellm/router_utils/handle_error.py index ba12e1cbed..c61a97a9b7 100644 --- a/litellm/router_utils/handle_error.py +++ b/litellm/router_utils/handle_error.py @@ -82,9 +82,14 @@ async def async_raise_no_deployment_exception( litellm_router_instance=litellm_router_instance, parent_otel_span=parent_otel_span, ) + verbose_router_logger.info( + f"No deployment found for model: {model}, cooldown_list with debug info: {_cooldown_list}" + ) + + cooldown_list_ids = [cooldown_model[0] for cooldown_model in _cooldown_list] return RouterRateLimitError( model=model, cooldown_time=_cooldown_time, enable_pre_call_checks=litellm_router_instance.enable_pre_call_checks, - cooldown_list=_cooldown_list, + cooldown_list=cooldown_list_ids, )