From 14fff73967167c7297ee4c61dd4bb70eadb76ba7 Mon Sep 17 00:00:00 2001 From: mateo-berri <277851410+mateo-berri@users.noreply.github.com> Date: Thu, 3 Sep 2026 01:00:36 -0700 Subject: [PATCH] test(local_testing): point test_router_timeout and test_timeout at the unroutable api_base --- tests/local_testing/test_router.py | 3 ++- tests/local_testing/test_timeout.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/local_testing/test_router.py b/tests/local_testing/test_router.py index c714bb4f9a7..3f6d53acc89 100644 --- a/tests/local_testing/test_router.py +++ b/tests/local_testing/test_router.py @@ -1541,7 +1541,7 @@ def test_router_anthropic_key_dynamic(): os.environ["ANTHROPIC_API_KEY"] = anthropic_api_key -def test_router_timeout(): +def test_router_timeout(unroutable_api_base): litellm.set_verbose = True import logging @@ -1554,6 +1554,7 @@ def test_router_timeout(): "litellm_params": { "model": "gpt-3.5-turbo", "api_key": "os.environ/OPENAI_API_KEY", + "api_base": unroutable_api_base, }, } ] diff --git a/tests/local_testing/test_timeout.py b/tests/local_testing/test_timeout.py index 217a71dec16..13cdc9ad0f8 100644 --- a/tests/local_testing/test_timeout.py +++ b/tests/local_testing/test_timeout.py @@ -43,12 +43,13 @@ async def test_httpx_timeout(model, provider, sync_mode): print(f"response: {response}") -def test_timeout(): +def test_timeout(unroutable_api_base): # this Will Raise a timeout litellm.set_verbose = False try: response = litellm.completion( model="gpt-3.5-turbo", + api_base=unroutable_api_base, timeout=0.01, messages=[{"role": "user", "content": "hello, write a 20 pg essay"}], )