From 5c732ac9af83d1e782f115776fb8f9ac66b9a076 Mon Sep 17 00:00:00 2001 From: Yuneng Jiang Date: Wed, 20 May 2026 11:27:47 -0700 Subject: [PATCH] ci(test): revert URL swap for tests under local_testing/ that hang in non-mock jobs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit local_testing_part1 and local_testing_part2 are green on litellm_internal_staging and red on this branch with a 15-min no-output timeout. They run tests/local_testing/**/test_*.py with -k "not router and not assistants and not langfuse and not caching and not cache" and do NOT have the start_mock_openai_server step (it's only wired into the 8 originally failing jobs). The follow-up commit (ba1452acb5) pointed two tests in this dir at the new mock URL even though their CI jobs don't run the mock: * tests/local_testing/test_lowest_latency_routing.py - multiple real router.acompletion() calls; the streaming variant (..._time_to_first_token) is the most plausible source of the no-output hang * tests/local_testing/test_secret_detect_hook.py - real chat_completion through the proxy router Both are restored to the Railway URL (now back up) — matches staging behavior. The other local_testing files I touched (test_completion.py, test_completion_cost.py, test_lakera_ai_prompt_injection.py) stay as-is: they either catch APIError, use mock_response, or are @pytest.mark.skip-marked. --- tests/local_testing/test_lowest_latency_routing.py | 12 ++++++------ tests/local_testing/test_secret_detect_hook.py | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/local_testing/test_lowest_latency_routing.py b/tests/local_testing/test_lowest_latency_routing.py index 23afb20411a..90913499e55 100644 --- a/tests/local_testing/test_lowest_latency_routing.py +++ b/tests/local_testing/test_lowest_latency_routing.py @@ -591,7 +591,7 @@ async def test_lowest_latency_routing_with_timeouts(): "model_name": "azure-model", "litellm_params": { "model": "openai/slow-endpoint", - "api_base": "http://127.0.0.1:8090/slow/", # If you are Krrish, this is OpenAI Endpoint3 on our Railway endpoint :) + "api_base": "https://exampleopenaiendpoint-production-c715.up.railway.app/", # If you are Krrish, this is OpenAI Endpoint3 on our Railway endpoint :) "api_key": "fake-key", }, "model_info": {"id": "slow-endpoint"}, @@ -600,7 +600,7 @@ async def test_lowest_latency_routing_with_timeouts(): "model_name": "azure-model", "litellm_params": { "model": "openai/fast-endpoint", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "fake-key", }, "model_info": {"id": "fast-endpoint"}, @@ -666,7 +666,7 @@ async def test_lowest_latency_routing_first_pick(): "model_name": "azure-model", "litellm_params": { "model": "openai/fast-endpoint", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "fake-key", }, "model_info": {"id": "fast-endpoint"}, @@ -675,7 +675,7 @@ async def test_lowest_latency_routing_first_pick(): "model_name": "azure-model", "litellm_params": { "model": "openai/fast-endpoint-2", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "fake-key", }, "model_info": {"id": "fast-endpoint-2"}, @@ -684,7 +684,7 @@ async def test_lowest_latency_routing_first_pick(): "model_name": "azure-model", "litellm_params": { "model": "openai/fast-endpoint-2", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "fake-key", }, "model_info": {"id": "fast-endpoint-3"}, @@ -693,7 +693,7 @@ async def test_lowest_latency_routing_first_pick(): "model_name": "azure-model", "litellm_params": { "model": "openai/fast-endpoint-2", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "fake-key", }, "model_info": {"id": "fast-endpoint-4"}, diff --git a/tests/local_testing/test_secret_detect_hook.py b/tests/local_testing/test_secret_detect_hook.py index 1bedaa4252b..8340fb91482 100644 --- a/tests/local_testing/test_secret_detect_hook.py +++ b/tests/local_testing/test_secret_detect_hook.py @@ -246,7 +246,7 @@ router = Router( "model_name": "fake-model", "litellm_params": { "model": "openai/fake", - "api_base": "http://127.0.0.1:8090/", + "api_base": "https://exampleopenaiendpoint-production.up.railway.app/", "api_key": "sk-12345", }, }