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
Add support for delete via only file_id
Sameer Kankutecad15e21cc05
diff --git a/litellm/llms/gemini/files/transformation.py b/litellm/llms/gemini/files/transformation.pyindex 35e1b677b4c..4dc61dc5f48 100644--- a/litellm/llms/gemini/files/transformation.py+++ b/litellm/llms/gemini/files/transformation.py@@ -299,7 +299,9 @@ class GoogleAIStudioFilesHandler(GeminiModelInfo, BaseFilesConfig):# Extract the file path from full URIfile_name = file_id.split("/v1beta/")[-1]else:- file_name = f"files/{file_id}"+ if not file_id.startswith("files/"):+ file_id = f"files/{file_id}"+ file_name = file_id# Construct the delete URLurl = f"{api_base}/v1beta/{file_name}"