From f8694145ee2ae146ff17e595ba9acf430247c79c Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 8 Oct 2026 22:29:55 +0000 Subject: [PATCH] fix(proxy): avoid duplicate final response bindings Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- litellm/proxy/batches_endpoints/endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/batches_endpoints/endpoints.py b/litellm/proxy/batches_endpoints/endpoints.py index bb606633572..104a6452f79 100644 --- a/litellm/proxy/batches_endpoints/endpoints.py +++ b/litellm/proxy/batches_endpoints/endpoints.py @@ -658,9 +658,9 @@ async def retrieve_batch( # The DB may store raw provider file IDs (before hooks translate them). # Register any missing managed-file rows and return unified IDs. if unified_batch_id: - batch_response: Final = _require_batch_response(response) + terminal_batch_response: Final = _require_batch_response(response) await ensure_batch_response_managed_file_ids( - response=batch_response, + response=terminal_batch_response, managed_files_obj=managed_files_obj, prisma_client=prisma_client, verbose_proxy_logger=verbose_proxy_logger, @@ -806,9 +806,9 @@ async def retrieve_batch( # Fix: bug_feb14_batch_retrieve_returns_raw_input_file_id # Register any missing managed-file rows and return unified IDs. if unified_batch_id: - batch_response: Final = _require_batch_response(response) + retrieved_batch_response: Final = _require_batch_response(response) await ensure_batch_response_managed_file_ids( - response=batch_response, + response=retrieved_batch_response, managed_files_obj=managed_files_obj, prisma_client=prisma_client, verbose_proxy_logger=verbose_proxy_logger,