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
fix gemini files
Ishaan Jaffer4bf4e7954ebe
diff --git a/litellm/llms/gemini/files/transformation.py b/litellm/llms/gemini/files/transformation.pyindex deb3eeb2481..861f7bd2f2b 100644--- a/litellm/llms/gemini/files/transformation.py+++ b/litellm/llms/gemini/files/transformation.py@@ -4,7 +4,7 @@ Supports writing files to Google AI Studio Files API.For vertex ai, check out the vertex_ai/files/handler.py file."""import time-from typing import Any, List, Optional+from typing import Any, List, Literal, Optionalimport httpxfrom openai.types.file_deleted import FileDeleted@@ -238,7 +238,7 @@ class GoogleAIStudioFilesHandler(GeminiModelInfo, BaseFilesConfig):# Map Gemini state to OpenAI statusgemini_state = response_json.get("state", "STATE_UNSPECIFIED")- status = "uploaded" # Default+ status: Literal["uploaded", "processed", "error"] = "uploaded" # Defaultif gemini_state == "ACTIVE":status = "processed"elif gemini_state == "FAILED":