From ce1b7c900d83abc1cbaa6fc033a7517b192504b1 Mon Sep 17 00:00:00 2001 From: Anya Ishmukh Date: Wed, 15 Jul 2026 21:29:54 +1000 Subject: [PATCH 1/3] missing model parameter in proxy create_batch call MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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 --- litellm/proxy/batches_endpoints/endpoints.py | 1 + 1 file changed, 1 insertion(+) diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index fffa0bf86d2..36172187340 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -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 ) From 1f2f24e0180161b14c0f7baca970d6da06903db1 Mon Sep 17 00:00:00 2001 From: Anya Ishmukh Date: Wed, 15 Jul 2026 23:55:42 +1000 Subject: [PATCH 2/3] Update endpoints.py resolved_model gets the real model ID from the router config via prepare_data_with_credentials --- litellm/proxy/batches_endpoints/endpoints.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index 36172187340..41852d062cc 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -172,8 +172,9 @@ async def create_batch( ) # Create batch using model credentials + resolved_model = _create_batch_data.pop("model", None) or model_from_file_id response = await litellm.acreate_batch( - model=model_from_file_id, + model=resolved_model, custom_llm_provider=credentials["custom_llm_provider"], **_create_batch_data, # type: ignore ) From d4344fb85e85aa1bb45c75a2c2177994d5edd471 Mon Sep 17 00:00:00 2001 From: Anya Ishmukh Date: Thu, 16 Jul 2026 10:35:57 +1000 Subject: [PATCH 3/3] Update endpoints.py --- litellm/proxy/batches_endpoints/endpoints.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index 41852d062cc..847def0a7f0 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -172,9 +172,9 @@ async def create_batch( ) # Create batch using model credentials - resolved_model = _create_batch_data.pop("model", None) or model_from_file_id + _create_batch_data.pop("model", None) # avoid duplicate kwarg if data has model response = await litellm.acreate_batch( - model=resolved_model, + model=model_from_file_id, custom_llm_provider=credentials["custom_llm_provider"], **_create_batch_data, # type: ignore )