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]

test: satisfy test-quality gate in consolidated registry tests

Devin AIe1ff8b27fad4
diff --git a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py
index 1cecd3e5f7c..137dc1d8f66 100644
--- a/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py
+++ b/tests/test_litellm/litellm_core_utils/llm_cost_calc/test_llm_cost_calc_utils.py
@@ -1065,10 +1065,16 @@ def test_generic_cost_per_token_gpt56_terra_cache_costs_by_tier_and_context(
],
)
def test_generic_cost_per_token_gpt56_cyber(
- model, prompt_tokens, input_rate, cache_write_rate, cache_read_rate, output_rate
+ model,
+ prompt_tokens,
+ input_rate,
+ cache_write_rate,
+ cache_read_rate,
+ output_rate,
+ monkeypatch,
):
- os.environ["LITELLM_LOCAL_MODEL_COST_MAP"] = "True"
- litellm.model_cost = litellm.get_model_cost_map(url="")
+ monkeypatch.setenv("LITELLM_LOCAL_MODEL_COST_MAP", "True")
+ monkeypatch.setattr(litellm, "model_cost", litellm.get_model_cost_map(url=""))
cached_tokens = 50000
cache_write_tokens = 40000
diff --git a/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py b/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py
index adc306971e3..67d6b9e76cf 100644
--- a/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py
+++ b/tests/test_litellm/test_gemini_3_1_flash_lite_image_pricing.py
@@ -12,9 +12,6 @@ values in both the primary price map and the ``litellm/`` backup, and verify
import json
import os
-import sys
-
-sys.path.insert(0, os.path.abspath("../.."))
import litellm
from litellm import completion_cost