From efb5f74173879660d4a79eed66d882da57980946 Mon Sep 17 00:00:00 2001 From: Rithvik Mysore Suresh Date: Fri, 31 Jul 2026 10:39:05 -0400 Subject: [PATCH] fix(batches): overwrite fallback flag in place Avoid a fresh mutable kwargs mapping while still replacing any request-enriched value before router dispatch. --- litellm/proxy/batches_endpoints/endpoints.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index a5a03320f7a..f94518b16b6 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -262,9 +262,8 @@ async def create_batch( detail={"error": "LLM Router not initialized. Ensure models added to proxy."}, ) - response = await llm_router.acreate_batch( - **{**_create_batch_data, "disable_fallbacks": True}, - ) + _create_batch_data.update(disable_fallbacks=True) # pyright: ignore[reportCallIssue] # router flag + response = await llm_router.acreate_batch(**_create_batch_data) response.input_file_id = input_file_id response._hidden_params["unified_file_id"] = unified_file_id else: