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]

Update litellm/proxy/batches_endpoints/endpoints.py

Cesar Garcia096edface5b7
diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py
index 7352e6e2085..58c8e2d4d0c 100644
--- a/litellm/proxy/batches_endpoints/endpoints.py
+++ b/litellm/proxy/batches_endpoints/endpoints.py
@@ -257,11 +257,16 @@ async def create_batch( # noqa: PLR0915
file_id=response.output_file_id, model=model_param
)
- if hasattr(response, "error_file_id") and response.error_file_id:
+ if hasattr(response, "error_file_id") and response.error_file_id:
response.error_file_id = encode_file_id_with_model(
file_id=response.error_file_id, model=model_param
)
+ if hasattr(response, "input_file_id") and response.input_file_id:
+ response.input_file_id = encode_file_id_with_model(
+ file_id=response.input_file_id, model=model_param
+ )
+
verbose_proxy_logger.debug(f"Created batch using model: {model_param}")
else:
# SCENARIO 3: Fallback to custom_llm_provider (uses env variables)