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(mypy): sync route_type Literals, fix BFL params and signatures
Cursor Agenta0f1c8a18aa9
diff --git a/litellm/llms/black_forest_labs/image_edit/transformation.py b/litellm/llms/black_forest_labs/image_edit/transformation.pyindex d12a0808d49..63413787c0d 100644--- a/litellm/llms/black_forest_labs/image_edit/transformation.py+++ b/litellm/llms/black_forest_labs/image_edit/transformation.py@@ -230,8 +230,8 @@ class BlackForestLabsImageEditConfig(BaseImageEditConfig):def transform_image_edit_request(self,model: str,- prompt: str,- image: FileTypes,+ prompt: Optional[str],+ image: Optional[FileTypes],image_edit_optional_request_params: Dict,litellm_params: GenericLiteLLMParams,headers: dict,diff --git a/litellm/llms/black_forest_labs/image_generation/transformation.py b/litellm/llms/black_forest_labs/image_generation/transformation.pyindex a6ed77f5359..18c7c173300 100644--- a/litellm/llms/black_forest_labs/image_generation/transformation.py+++ b/litellm/llms/black_forest_labs/image_generation/transformation.py@@ -259,7 +259,12 @@ class BlackForestLabsImageGenerationConfig(BaseImageGenerationConfig):raw_response: httpx.Response,model_response: ImageResponse,logging_obj: LiteLLMLoggingObj,- **kwargs,+ request_data: dict,+ optional_params: dict,+ litellm_params: dict,+ encoding: Any,+ api_key: Optional[str] = None,+ json_mode: Optional[bool] = None,) -> ImageResponse:"""Transform Black Forest Labs response to OpenAI-compatible ImageResponse.diff --git a/litellm/proxy/common_request_processing.py b/litellm/proxy/common_request_processing.pyindex 7b9e0a43731..41fa4379629 100644--- a/litellm/proxy/common_request_processing.py+++ b/litellm/proxy/common_request_processing.py@@ -530,6 +530,8 @@ class ProxyBaseLLMRequestProcessing:"aresponses","_arealtime","_aresponses_websocket",+ "acreate_realtime_client_secret",+ "arealtime_calls","aget_responses","adelete_responses","acancel_responses",@@ -553,6 +555,10 @@ class ProxyBaseLLMRequestProcessing:"allm_passthrough_route","avector_store_search","avector_store_create",+ "avector_store_retrieve",+ "avector_store_list",+ "avector_store_update",+ "avector_store_delete","avector_store_file_create","avector_store_file_list","avector_store_file_retrieve",@@ -774,20 +780,36 @@ class ProxyBaseLLMRequestProcessing:"aembedding","aresponses","_arealtime",+ "_aresponses_websocket","acreate_realtime_client_secret","arealtime_calls","aget_responses","adelete_responses","acancel_responses","acompact_responses",+ "acreate_batch",+ "aretrieve_batch",+ "alist_batches",+ "acancel_batch",+ "afile_content",+ "afile_retrieve",+ "afile_delete","atext_completion",- "aimage_edit",+ "acreate_fine_tuning_job",+ "acancel_fine_tuning_job",+ "alist_fine_tuning_jobs",+ "aretrieve_fine_tuning_job","alist_input_items",+ "aimage_edit","agenerate_content","agenerate_content_stream","allm_passthrough_route","avector_store_search","avector_store_create",+ "avector_store_retrieve",+ "avector_store_list",+ "avector_store_update",+ "avector_store_delete","avector_store_file_create","avector_store_file_list","avector_store_file_retrieve",@@ -815,8 +837,8 @@ class ProxyBaseLLMRequestProcessing:"aget_interaction","adelete_interaction","acancel_interaction",- "acancel_batch",- "afile_delete",+ "asend_message",+ "call_mcp_tool","acreate_eval","alist_evals","aget_eval",diff --git a/litellm/proxy/vector_store_endpoints/endpoints.py b/litellm/proxy/vector_store_endpoints/endpoints.pyindex 63ce5c104dc..d4594fb2fd0 100644--- a/litellm/proxy/vector_store_endpoints/endpoints.py+++ b/litellm/proxy/vector_store_endpoints/endpoints.py@@ -386,7 +386,7 @@ async def vector_store_list(version,)- data = {}+ data: dict = {}if after is not None:data["after"] = afterif before is not None:diff --git a/litellm/types/llms/openai.py b/litellm/types/llms/openai.pyindex 0ca48611e1f..0184919b543 100644--- a/litellm/types/llms/openai.py+++ b/litellm/types/llms/openai.py@@ -1052,6 +1052,14 @@ OpenAIImageGenerationOptionalParams = Literal["size","style","user",+ "seed",+ "safety_tolerance",+ "prompt_upsampling",+ "raw",+ "num_images",+ "image_url",+ "image_prompt_strength",+ "aspect_ratio",]OpenAIImageEditOptionalParams = Literal[