Merge branch 'litellm_october_alexsander_stanging' of https://github.com/BerriAI/litellm into litellm_october_alexsander_stanging

This commit is contained in:
AlexsanderHamir 2025-10-16 14:43:30 -07:00
commit bdca4db941

View file

@ -2,6 +2,7 @@ import sys
import os
import pytest
import ast
import ast
sys.path.insert(
0, os.path.abspath("../..")
@ -179,14 +180,6 @@ class TestRouterIndexManagement:
assert "claude-3" in router.model_name_to_deployment_indices
assert router.model_name_to_deployment_indices["claude-3"] == [0]
def test_model_names_is_set(self):
"""Verify that model_names uses a set for O(1) lookups, not a list (O(n))"""
router = Router(model_list=[])
assert isinstance(router.model_names, set), (
f"model_names should be a set for O(1) lookups, but got {type(router.model_names)}"
)
def test_no_linear_scans_in_router(self):
"""
Static analysis test to ensure Router doesn't use O(n) linear scans.
@ -273,3 +266,10 @@ class TestRouterIndexManagement:
f"ALLOWED_METHODS in this test method.\n"
f"{'='*70}\n"
)
def test_model_names_is_set(self):
"""Verify that model_names uses a set for O(1) lookups, not a list (O(n))"""
router = Router(model_list=[])
assert isinstance(router.model_names, set), (
f"model_names should be a set for O(1) lookups, but got {type(router.model_names)}"
)