mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-27 11:43:54 +00:00
test(test_router_caching.py): remove unstable test
test would fail due to timing issues
This commit is contained in:
parent
14f9a6f679
commit
dff9f37e24
1 changed files with 0 additions and 29 deletions
|
@ -264,32 +264,3 @@ async def test_acompletion_caching_on_router_caching_groups():
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
pytest.fail(f"Error occurred: {e}")
|
pytest.fail(f"Error occurred: {e}")
|
||||||
|
|
||||||
def test_rpm_limiting():
|
|
||||||
try:
|
|
||||||
litellm.set_verbose = True
|
|
||||||
model_list = [
|
|
||||||
{
|
|
||||||
"model_name": "gpt-3.5-turbo",
|
|
||||||
"litellm_params": {
|
|
||||||
"model": "gpt-3.5-turbo",
|
|
||||||
"api_key": os.getenv("OPENAI_API_KEY"),
|
|
||||||
},
|
|
||||||
"tpm": 10000,
|
|
||||||
"rpm": 3,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
|
|
||||||
router = Router(
|
|
||||||
model_list = model_list,
|
|
||||||
routing_strategy = "usage-based-routing",
|
|
||||||
)
|
|
||||||
failedCount = 0
|
|
||||||
for i in range(10):
|
|
||||||
try:
|
|
||||||
response = router.completion(model="gpt-3.5-turbo", messages=[{"role": "user", "content": ""}])
|
|
||||||
except ValueError as e:
|
|
||||||
failedCount += 1
|
|
||||||
assert failedCount == 7
|
|
||||||
except Exception as e:
|
|
||||||
pytest.fail(f"An exception occurred - {str(e)}")
|
|
Loading…
Add table
Add a link
Reference in a new issue