From d5f555f10ca078dc95b55c751cec138ae9731436 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 7 Mar 2026 05:14:46 +0000 Subject: [PATCH] fix: set master_key=None in test_create_file_with_deep_nested_litellm_metadata The test was missing the master_key monkeypatch that other tests in the same file set. In CI with parallel execution (-n 4), another test may set master_key to a non-None value, causing auth failures (500) when the test sends 'Bearer test-key'. Co-authored-by: Ishaan Jaff --- .../proxy/openai_files_endpoint/test_files_endpoint.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py index 83f7bb520af..bfbc4888295 100644 --- a/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py +++ b/tests/test_litellm/proxy/openai_files_endpoint/test_files_endpoint.py @@ -1138,6 +1138,8 @@ def test_create_file_with_deep_nested_litellm_metadata( monkeypatch.setattr( "litellm.proxy.proxy_server.proxy_logging_obj", proxy_logging_obj ) + # Disable auth so the test doesn't depend on master_key state from other tests + monkeypatch.setattr("litellm.proxy.proxy_server.master_key", None) test_file_content = b'{"custom_id": "req-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo"}}' test_file = ("nested.jsonl", test_file_content, "application/jsonl")