From ae7b13550ec5223c793174efb217741438b63c29 Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Thu, 23 Oct 2025 09:10:41 -0700 Subject: [PATCH] test_models_by_provider --- tests/litellm_utils_tests/test_utils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/litellm_utils_tests/test_utils.py b/tests/litellm_utils_tests/test_utils.py index 889e3918b39..339d00c412e 100644 --- a/tests/litellm_utils_tests/test_utils.py +++ b/tests/litellm_utils_tests/test_utils.py @@ -1371,6 +1371,9 @@ def test_models_by_provider(): or v["litellm_provider"] == "bedrock_converse" ): continue + elif v.get("mode") == "search": + # Skip search providers as they don't have traditional models + continue else: providers.add(v["litellm_provider"]) @@ -2351,7 +2354,7 @@ def test_get_whitelisted_models(): """ whitelisted_models = [] for model, info in litellm.model_cost.items(): - if info["litellm_provider"] == "bedrock" and info["mode"] == "chat": + if info.get("litellm_provider") == "bedrock" and info.get("mode") == "chat": whitelisted_models.append(model) # Write to a local file