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: annotate parametrized traffic-type test inputs

Bisma Nawaz909ab23b8958
diff --git a/tests/test_litellm/llms/gemini/test_cost_calculator.py b/tests/test_litellm/llms/gemini/test_cost_calculator.py
index c44f29ba168..1f7bfa69527 100644
--- a/tests/test_litellm/llms/gemini/test_cost_calculator.py
+++ b/tests/test_litellm/llms/gemini/test_cost_calculator.py
@@ -318,7 +318,9 @@ def test_gemini_image_generation_cost_no_web_search_when_absent():
("SOMETHING_UNKNOWN", None),
],
)
-def test_map_traffic_type_to_service_tier(traffic_type, expected_service_tier):
+def test_map_traffic_type_to_service_tier(
+ traffic_type: str | None, expected_service_tier: str | None
+):
"""
Gemini/Vertex usageMetadata.trafficType maps to the LiteLLM service_tier
that selects flex/priority cost keys. ON_DEMAND_FLEX (Vertex's flex opt-in