The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
Changed asyncio.create_task() to await for storing batch objects
Sameer Kankutece4bebbedfe5
diff --git a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py b/enterprise/litellm_enterprise/proxy/hooks/managed_files.pyindex 7cbee64b08e..a41b3f3bf6f 100644--- a/enterprise/litellm_enterprise/proxy/hooks/managed_files.py+++ b/enterprise/litellm_enterprise/proxy/hooks/managed_files.py@@ -935,15 +935,13 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):model_mappings={model_id: original_file_id},user_api_key_dict=user_api_key_dict,)- asyncio.create_task(- self.store_unified_object_id(- unified_object_id=response.id,- file_object=response,- litellm_parent_otel_span=user_api_key_dict.parent_otel_span,- model_object_id=original_response_id,- file_purpose="batch",- user_api_key_dict=user_api_key_dict,- )+ await self.store_unified_object_id(+ unified_object_id=response.id,+ file_object=response,+ litellm_parent_otel_span=user_api_key_dict.parent_otel_span,+ model_object_id=original_response_id,+ file_purpose="batch",+ user_api_key_dict=user_api_key_dict,)elif isinstance(response, LiteLLMFineTuningJob):## Check if unified_file_id is in the response@@ -960,15 +958,13 @@ class _PROXY_LiteLLMManagedFiles(CustomLogger, BaseFileEndpoints):response.id = self.get_unified_generic_response_id(model_id=model_id, generic_response_id=response.id)- asyncio.create_task(- self.store_unified_object_id(- unified_object_id=response.id,- file_object=response,- litellm_parent_otel_span=user_api_key_dict.parent_otel_span,- model_object_id=original_response_id,- file_purpose="fine-tune",- user_api_key_dict=user_api_key_dict,- )+ await self.store_unified_object_id(+ unified_object_id=response.id,+ file_object=response,+ litellm_parent_otel_span=user_api_key_dict.parent_otel_span,+ model_object_id=original_response_id,+ file_purpose="fine-tune",+ user_api_key_dict=user_api_key_dict,)elif isinstance(response, AsyncCursorPage):"""