From 9fb6f38034142df54ffc9dfb079b16c1717dfb3d Mon Sep 17 00:00:00 2001 From: zouxiaoyue Date: Mon, 10 Aug 2026 09:48:53 +0800 Subject: [PATCH] fix(proxy): handle unresolved streaming routes --- litellm/proxy/utils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/utils.py b/litellm/proxy/utils.py index 03a2518e7d3..1c680f095d1 100644 --- a/litellm/proxy/utils.py +++ b/litellm/proxy/utils.py @@ -1775,7 +1775,12 @@ class ProxyLogging: get_call_types_for_route, ) - call_types: Final = get_call_types_for_route(user_api_key_dict.request_route) + route: Final = user_api_key_dict.request_route + if not route: + return False + call_types: Final = get_call_types_for_route(route) + if not call_types: + return False return any(guardrail.supports_streaming_call_type(call_type) for call_type in call_types) @staticmethod