Skip to content

The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]

Fix test_aaamodel_prices_and_context_window_json_is_valid

Sameer Kankute2f8d36be1b30
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index 3ae45882780..14a003c2aad 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -13,12 +13,12 @@ sys.path.insert(
import litellm
from litellm.proxy.utils import is_valid_api_key
from litellm.types.utils import (
+ CallTypes,
Delta,
LlmProviders,
ModelResponseStream,
StreamingChoices,
)
-from litellm.types.utils import CallTypes
from litellm.utils import (
ProviderConfigManager,
TextCompletionStreamWrapper,
@@ -606,10 +606,14 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"input_cost_per_token_above_200k_tokens": {"type": "number"},
"cache_read_input_token_cost_flex": {"type": "number"},
"cache_read_input_token_cost_priority": {"type": "number"},
+ "cache_read_input_token_cost_above_200k_tokens_priority": {"type": "number"},
"input_cost_per_token_flex": {"type": "number"},
"input_cost_per_token_priority": {"type": "number"},
+ "input_cost_per_token_above_200k_tokens_priority": {"type": "number"},
+ "input_cost_per_audio_token_priority": {"type": "number"},
"output_cost_per_token_flex": {"type": "number"},
"output_cost_per_token_priority": {"type": "number"},
+ "output_cost_per_token_above_200k_tokens_priority": {"type": "number"},
"input_cost_per_pixel": {"type": "number"},
"input_cost_per_query": {"type": "number"},
"input_cost_per_request": {"type": "number"},
@@ -644,6 +648,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"max_video_length": {"type": "number"},
"max_videos_per_prompt": {"type": "number"},
"metadata": {"type": "object"},
+ "provider_specific_entry": {"type": "object"},
"mode": {
"type": "string",
"enum": [
@@ -802,7 +807,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
},
}
- prod_json = "./model_prices_and_context_window.json"
+ prod_json = "litellm/model_prices_and_context_window.json"
# prod_json = "../../model_prices_and_context_window.json"
with open(prod_json, "r") as model_prices_file:
actual_json = json.load(model_prices_file)
@@ -2337,7 +2342,7 @@ def test_register_model_with_scientific_notation():
Test that the register_model function can handle scientific notation in the model name.
"""
import uuid
-
+
# 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]}"
@@ -2981,8 +2986,8 @@ class TestProxyLoggingBudgetAlerts:
via metadata.soft_budget_alerting_emails to work even when global alerting is disabled.
"""
from litellm.caching.caching import DualCache
- from litellm.proxy.utils import ProxyLogging
from litellm.proxy._types import CallInfo, Litellm_EntityType
+ from litellm.proxy.utils import ProxyLogging
proxy_logging = ProxyLogging(user_api_key_cache=DualCache())
proxy_logging.alerting = None # Global alerting is disabled
@@ -3018,8 +3023,8 @@ class TestProxyLoggingBudgetAlerts:
and do not send emails when alerting is None.
"""
from litellm.caching.caching import DualCache
- from litellm.proxy.utils import ProxyLogging
from litellm.proxy._types import CallInfo, Litellm_EntityType
+ from litellm.proxy.utils import ProxyLogging
proxy_logging = ProxyLogging(user_api_key_cache=DualCache())
proxy_logging.alerting = None
@@ -3050,8 +3055,8 @@ class TestProxyLoggingBudgetAlerts:
Test that soft_budget alerts with empty alert_emails list still respect alerting=None.
"""
from litellm.caching.caching import DualCache
- from litellm.proxy.utils import ProxyLogging
from litellm.proxy._types import CallInfo, Litellm_EntityType
+ from litellm.proxy.utils import ProxyLogging
proxy_logging = ProxyLogging(user_api_key_cache=DualCache())
proxy_logging.alerting = None