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: resolve type checking errors in vertex_ai and mcp_server_manager
AlexsanderHamir2ef5a41a24b7
diff --git a/litellm/llms/vertex_ai/videos/transformation.py b/litellm/llms/vertex_ai/videos/transformation.pyindex 2b6d43dd708..1f657f63bf1 100644--- a/litellm/llms/vertex_ai/videos/transformation.py+++ b/litellm/llms/vertex_ai/videos/transformation.py@@ -7,7 +7,7 @@ Based on: https://docs.cloud.google.com/vertex-ai/generative-ai/docs/model-referimport base64import time-from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union+from typing import TYPE_CHECKING, Any, Dict, Optional, Tuple, Union, castimport httpxfrom httpx._types import RequestFiles@@ -174,10 +174,11 @@ class VertexAIVideoConfig(BaseVideoConfig, VertexBase):"""# Extract Vertex AI parameters using safe helpers from VertexBase# Use safe_get_* methods that don't mutate litellm_params dict- litellm_params = litellm_params or {}+ # Ensure litellm_params is a dict for type checking+ params_dict: Dict[str, Any] = cast(Dict[str, Any], litellm_params) if litellm_params is not None else {}- vertex_project = VertexBase.safe_get_vertex_ai_project(litellm_params=litellm_params)- vertex_credentials = VertexBase.safe_get_vertex_ai_credentials(litellm_params=litellm_params)+ vertex_project = VertexBase.safe_get_vertex_ai_project(litellm_params=params_dict)+ vertex_credentials = VertexBase.safe_get_vertex_ai_credentials(litellm_params=params_dict)# Get access token from Vertex credentialsaccess_token, project_id = self.get_access_token(diff --git a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.pyindex 54c79fc696c..4a0d25e24f3 100644--- a/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py+++ b/litellm/proxy/_experimental/mcp_server/mcp_server_manager.py@@ -2270,7 +2270,7 @@ class MCPServerManager:server.status = "unhealthy"## try adding server to registry to get errortry:- self.add_update_server(server)+ await self.add_update_server(server)except Exception as e:server.health_check_error = str(e)server.health_check_error = "Server is not in in memory registry yet. This could be a temporary sync issue."