diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py index ee23811d5ac..71e043eb22a 100644 --- a/tests/test_litellm/test_utils.py +++ b/tests/test_litellm/test_utils.py @@ -2283,18 +2283,14 @@ def test_register_model_with_scientific_notation(): """ Test that the register_model function can handle scientific notation in the model name. """ - # Use a unique model name to avoid conflicts with other tests - test_model_name = "test-scientific-notation-model-unique-12345" + import uuid - # Clean up any pre-existing entry and clear caches - if test_model_name in litellm.model_cost: - del litellm.model_cost[test_model_name] + # Use a truly unique model name with uuid to avoid conflicts when tests run in parallel + test_model_name = f"test-scientific-notation-model-{uuid.uuid4().hex[:12]}" # Clear LRU caches that might have stale data from litellm.utils import ( - _cached_get_model_info_helper, _invalidate_model_cost_lowercase_map, - get_model_info, ) _invalidate_model_cost_lowercase_map()