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(cost): drop unnecessary cast in batch rate lookup

kerrya5f00b9189fa
diff --git a/litellm/cost_calculator.py b/litellm/cost_calculator.py
index dce6b7299a2..39af725a231 100644
--- a/litellm/cost_calculator.py
+++ b/litellm/cost_calculator.py
@@ -2288,7 +2288,7 @@ def _batch_rate(
fallback: float,
) -> float:
rate: Final = model_info.get(key)
- return fallback if rate is None else cast(float, rate)
+ return fallback if rate is None else rate
def batch_cost_calculator(