missing model parameter in proxy create_batch call

[Bug] POST /v1/batches fails for Bedrock — missing model parameter in proxy create_batch call

In litellm/proxy/batches_endpoints/endpoints.py (Scenario 1 — file_id encoded with model), the proxy correctly decodes model_from_file_id from the file_id but never passes it to litellm.acreate_batch:

# v1.89.0 — BUG (line ~178)
response = await litellm.acreate_batch(
    custom_llm_provider=credentials["custom_llm_provider"],  # = "bedrock"
    **_create_batch_data,   # ← model NOT included
)

In litellm/batches/main.py, create_batch has this logic:

    provider_config = ProviderConfigManager.get_provider_batches_config(...)


if model is not None:
    provider_config = ProviderConfigManager.get_provider_batches_config(...)
else:
    provider_config = None   # ← happens because model is None

if provider_config is not None:
    return base_llm_http_handler.create_batch(...)  # ← Bedrock path, never reached
This commit is contained in:
Anya Ishmukh 2026-07-15 21:29:54 +10:00 • committed by GitHub
parent d6f498ff5c
commit ce1b7c900d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -173,6 +173,7 @@ async def create_batch(
# Create batch using model credentials
response = await litellm.acreate_batch(
model=model_from_file_id,
custom_llm_provider=credentials["custom_llm_provider"],
**_create_batch_data, # type: ignore
)