Update litellm/proxy/batches_endpoints/endpoints.py

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
This commit is contained in:
Cesar Garcia 2026-03-03 10:46:14 -03:00 committed by GitHub
parent 7d664f0c09
commit 096edface5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)