From dbcc67a6037a2d47f13eb781e9bcc523cd1b2a92 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Wed, 20 May 2026 10:11:26 +0000 Subject: [PATCH] test(ci): mark Railway-dependent router/overhead tests as flaky Two more CircleCI tests intermittently fail with the Railway-hosted fake openai endpoint (https://exampleopenaiendpoint-production.up.railway.app) returning 404 'Application not found' on cold-start: - tests/local_testing/test_router.py::test_router_text_completion_client (litellm_router_testing job) - tests/litellm_utils_tests/test_litellm_overhead.py::test_litellm_overhead_non_streaming[openai/self_hosted] - tests/litellm_utils_tests/test_litellm_overhead.py::test_litellm_overhead_stream[openai/self_hosted] (litellm_utils_testing job) Same upstream-flake root cause as PR #28315; mirror that fix by adding @pytest.mark.flaky(reruns=2, reruns_delay=5) so transient endpoint unavailability doesn't fail the build. Co-authored-by: Krrish Dholakia --- tests/litellm_utils_tests/test_litellm_overhead.py | 2 ++ tests/local_testing/test_router.py | 1 + 2 files changed, 3 insertions(+) diff --git a/tests/litellm_utils_tests/test_litellm_overhead.py b/tests/litellm_utils_tests/test_litellm_overhead.py index 3a428e9d588..70bdcb1e95a 100644 --- a/tests/litellm_utils_tests/test_litellm_overhead.py +++ b/tests/litellm_utils_tests/test_litellm_overhead.py @@ -75,6 +75,7 @@ async def _vertex_ai_mocks(): yield +@pytest.mark.flaky(reruns=2, reruns_delay=5) @pytest.mark.asyncio @pytest.mark.parametrize( "model", @@ -141,6 +142,7 @@ async def test_litellm_overhead_non_streaming(model): pass +@pytest.mark.flaky(reruns=2, reruns_delay=5) @pytest.mark.asyncio @pytest.mark.parametrize( "model", diff --git a/tests/local_testing/test_router.py b/tests/local_testing/test_router.py index 6d04e6ecaa5..b01ebe7e308 100644 --- a/tests/local_testing/test_router.py +++ b/tests/local_testing/test_router.py @@ -1628,6 +1628,7 @@ def test_router_add_deployment(): assert new_model_id_list[1] != new_model_id_list[0] +@pytest.mark.flaky(reruns=2, reruns_delay=5) @pytest.mark.asyncio async def test_router_text_completion_client(): # This tests if we re-use the Async OpenAI client