diff --git a/litellm/tests/test_lowest_latency_routing.py b/litellm/tests/test_lowest_latency_routing.py index d83cdef9a..5d33bb0ed 100644 --- a/litellm/tests/test_lowest_latency_routing.py +++ b/litellm/tests/test_lowest_latency_routing.py @@ -1,22 +1,29 @@ #### What this tests #### # This tests the router's ability to pick deployment with lowest latency -import sys, os, asyncio, time, random -from datetime import datetime, timedelta +import asyncio +import os +import random +import sys +import time import traceback +from datetime import datetime, timedelta + from dotenv import load_dotenv load_dotenv() -import os, copy +import copy +import os sys.path.insert( 0, os.path.abspath("../..") ) # Adds the parent directory to the system path import pytest -from litellm import Router -from litellm.router_strategy.lowest_latency import LowestLatencyLoggingHandler -from litellm.caching import DualCache + import litellm +from litellm import Router +from litellm.caching import DualCache +from litellm.router_strategy.lowest_latency import LowestLatencyLoggingHandler ### UNIT TESTS FOR LATENCY ROUTING ### @@ -522,6 +529,7 @@ async def test_router_completion_streaming(): "api_key": "os.environ/AZURE_FRANCE_API_KEY", "api_base": "https://openai-france-1234.openai.azure.com", "rpm": 1440, + "mock_response": "Hello world", }, "model_info": {"id": 1}, }, @@ -532,6 +540,7 @@ async def test_router_completion_streaming(): "api_key": "os.environ/AZURE_EUROPE_API_KEY", "api_base": "https://my-endpoint-europe-berri-992.openai.azure.com", "rpm": 6, + "mock_response": "Hello world", }, "model_info": {"id": 2}, },