Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

fix(handle_error.py): don't return backend exception to user - can contain prompt leakage

Krrish Dholakia56241e937a87
diff --git a/litellm/router_utils/handle_error.py b/litellm/router_utils/handle_error.py
index ba12e1cbede..c61a97a9b7c 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,
)