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(spend): guard session_id filter against non-str query default
Thibault Serot7801324ab0c0
diff --git a/litellm/proxy/spend_tracking/spend_management_endpoints.py b/litellm/proxy/spend_tracking/spend_management_endpoints.pyindex 0bf35352d5f..bce2e3581b5 100644--- a/litellm/proxy/spend_tracking/spend_management_endpoints.py+++ b/litellm/proxy/spend_tracking/spend_management_endpoints.py@@ -1910,7 +1910,7 @@ async def ui_view_spend_logs(p += 2sql_conditions.append(or_clause)- if session_id is not None:+ if session_id is not None and isinstance(session_id, str):like_escaped_session_id = session_id.replace("\\", "\\\\").replace("%", "\\%").replace("_", "\\_")sql_conditions.append(f"session_id LIKE ${p}")sql_params.append(f"%{like_escaped_session_id}%")