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 mapped tests 1 (#15445)

Sameer Kankute138bdbb6d8b1
diff --git a/tests/test_litellm/test_redis.py b/tests/test_litellm/test_redis.py
index 991126c2fef..3ea1811549a 100644
--- a/tests/test_litellm/test_redis.py
+++ b/tests/test_litellm/test_redis.py
@@ -18,6 +18,10 @@ def test_get_redis_url_from_environment_host_port(monkeypatch):
# Set the environment variables
monkeypatch.setenv("REDIS_HOST", "redis-server")
monkeypatch.setenv("REDIS_PORT", "6379")
+ # Ensure authentication variables are not set
+ monkeypatch.delenv("REDIS_USERNAME", raising=False)
+ monkeypatch.delenv("REDIS_PASSWORD", raising=False)
+ monkeypatch.delenv("REDIS_SSL", raising=False)
# Call the function to get the Redis URL
redis_url = get_redis_url_from_environment()
@@ -31,6 +35,9 @@ def test_get_redis_url_from_environment_with_ssl(monkeypatch):
monkeypatch.setenv("REDIS_HOST", "redis-server")
monkeypatch.setenv("REDIS_PORT", "6379")
monkeypatch.setenv("REDIS_SSL", "true")
+ # Ensure authentication variables are not set
+ monkeypatch.delenv("REDIS_USERNAME", raising=False)
+ monkeypatch.delenv("REDIS_PASSWORD", raising=False)
# Call the function to get the Redis URL
redis_url = get_redis_url_from_environment()
@@ -58,6 +65,9 @@ def test_get_redis_url_from_environment_with_password_only(monkeypatch):
monkeypatch.setenv("REDIS_HOST", "redis-server")
monkeypatch.setenv("REDIS_PORT", "6379")
monkeypatch.setenv("REDIS_PASSWORD", "password")
+ # Ensure username is not set
+ monkeypatch.delenv("REDIS_USERNAME", raising=False)
+ monkeypatch.delenv("REDIS_SSL", raising=False)
# Call the function to get the Redis URL
redis_url = get_redis_url_from_environment()
diff --git a/tests/test_litellm/test_utils.py b/tests/test_litellm/test_utils.py
index 6e20e956068..6903b70ee71 100644
--- a/tests/test_litellm/test_utils.py
+++ b/tests/test_litellm/test_utils.py
@@ -513,6 +513,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"cache_read_input_token_cost": {"type": "number"},
"cache_read_input_token_cost_above_200k_tokens": {"type": "number"},
"cache_read_input_audio_token_cost": {"type": "number"},
+ "cache_read_input_image_token_cost": {"type": "number"},
"deprecation_date": {"type": "string"},
"input_cost_per_audio_per_second": {"type": "number"},
"input_cost_per_audio_per_second_above_128k_tokens": {"type": "number"},
@@ -521,6 +522,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"input_cost_per_character_above_128k_tokens": {"type": "number"},
"input_cost_per_image": {"type": "number"},
"input_cost_per_image_above_128k_tokens": {"type": "number"},
+ "input_cost_per_image_token": {"type": "number"},
"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"},
@@ -577,6 +579,7 @@ def test_aaamodel_prices_and_context_window_json_is_valid():
"output_cost_per_character": {"type": "number"},
"output_cost_per_character_above_128k_tokens": {"type": "number"},
"output_cost_per_image": {"type": "number"},
+ "output_cost_per_image_token": {"type": "number"},
"output_cost_per_pixel": {"type": "number"},
"output_cost_per_second": {"type": "number"},
"output_cost_per_token": {"type": "number"},