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(batches): revert invalid Final on a loop-scoped local

mubashir1osmanid989f172e9d7
diff --git a/litellm/batches/batch_utils.py b/litellm/batches/batch_utils.py
index d0874b5aff5..4e62c4a0130 100644
--- a/litellm/batches/batch_utils.py
+++ b/litellm/batches/batch_utils.py
@@ -170,9 +170,7 @@ def _classify_output_line_stats(
custom_llm_provider=custom_llm_provider,
call_type=CallTypes.aretrieve_batch.value,
)
- reasoning_tokens: Final = (
- usage.completion_tokens_details.reasoning_tokens if usage.completion_tokens_details else None
- )
+ reasoning_tokens = usage.completion_tokens_details.reasoning_tokens if usage.completion_tokens_details else None
yield _BatchOutputLineStats(
cost=line_cost,
prompt_tokens=usage.prompt_tokens,