test(local_testing): point test_router_timeout and test_timeout at the unroutable api_base

This commit is contained in:
mateo-berri 2026-09-03 01:00:36 -07:00
parent e17fae7ec5
commit 14fff73967
2 changed files with 4 additions and 2 deletions

View file

@ -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,
},
}
]

View file

@ -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"}],
)