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
test(proxy): cover non-string access log paths
Devin AI66ce1eea97e3
diff --git a/tests/test_litellm/test_logging.py b/tests/test_litellm/test_logging.pyindex 9972be01f00..7106d25b7c2 100644--- a/tests/test_litellm/test_logging.py+++ b/tests/test_litellm/test_logging.py@@ -1228,6 +1228,20 @@ def test_access_log_path_filter_keeps_a_record_without_positional_args():assert AccessLogPathFilter(frozenset({"/health/liveliness"})).filter(record) is True+def test_access_log_path_filter_keeps_a_record_with_a_non_string_path():+ record = logging.LogRecord(+ name="uvicorn.access",+ level=logging.INFO,+ pathname="",+ lineno=0,+ msg="%s - %s %s",+ args=("127.0.0.1:1", "GET", 42),+ exc_info=None,+ )++ assert AccessLogPathFilter(frozenset({"/health/liveliness"})).filter(record) is True++def test_uvicorn_access_logger_drops_a_listed_path_end_to_end(monkeypatch):monkeypatch.setenv("LITELLM_DISABLE_ACCESS_LOG_PATHS", "/health/liveliness")access_log_filter = AccessLogPathFilter(