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]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix: handle explicit None model_info in LowestLatencyLoggingHandler (#21633)
Darien Kindlund0f2516e9cdff
diff --git a/litellm/router_strategy/lowest_latency.py b/litellm/router_strategy/lowest_latency.pyindex 7492662e3b1..0449a843bd2 100644--- a/litellm/router_strategy/lowest_latency.py+++ b/litellm/router_strategy/lowest_latency.py@@ -52,7 +52,7 @@ class LowestLatencyLoggingHandler(CustomLogger):"model_group", None)- id = kwargs["litellm_params"].get("model_info", {}).get("id", None)+ id = (kwargs["litellm_params"].get("model_info") or {}).get("id", None)if model_group is None or id is None:returnelif isinstance(id, int):@@ -204,7 +204,7 @@ class LowestLatencyLoggingHandler(CustomLogger):"model_group", None)- id = kwargs["litellm_params"].get("model_info", {}).get("id", None)+ id = (kwargs["litellm_params"].get("model_info") or {}).get("id", None)if model_group is None or id is None:returnelif isinstance(id, int):@@ -273,7 +273,7 @@ class LowestLatencyLoggingHandler(CustomLogger):"model_group", None)- id = kwargs["litellm_params"].get("model_info", {}).get("id", None)+ id = (kwargs["litellm_params"].get("model_info") or {}).get("id", None)if model_group is None or id is None:returnelif isinstance(id, int):