From 66ce1eea97e32da969f5268dc4d0b75fc7929d6c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Mon, 14 Sep 2026 16:54:38 +0000 Subject: [PATCH] test(proxy): cover non-string access log paths Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- tests/test_litellm/test_logging.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/test_litellm/test_logging.py b/tests/test_litellm/test_logging.py index 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(