From d72c535f58e213c36c930f2ec4acd71dc4085eba Mon Sep 17 00:00:00 2001 From: Ishaan Jaffer Date: Tue, 6 Jan 2026 16:17:05 +0530 Subject: [PATCH] fix mypy linting --- .../management_endpoints/mcp_management_endpoints.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/litellm/proxy/management_endpoints/mcp_management_endpoints.py b/litellm/proxy/management_endpoints/mcp_management_endpoints.py index d4d3359ff91..822ddfa748b 100644 --- a/litellm/proxy/management_endpoints/mcp_management_endpoints.py +++ b/litellm/proxy/management_endpoints/mcp_management_endpoints.py @@ -32,8 +32,8 @@ from fastapi import ( from fastapi.responses import JSONResponse import litellm -from litellm._uuid import uuid from litellm._logging import verbose_logger, verbose_proxy_logger +from litellm._uuid import uuid from litellm.constants import LITELLM_PROXY_ADMIN_NAME from litellm.proxy._experimental.mcp_server.utils import ( validate_and_normalize_mcp_server_payload, @@ -67,7 +67,6 @@ if MCP_AVAILABLE: from litellm.proxy._experimental.mcp_server.ui_session_utils import ( build_effective_auth_contexts, ) - from litellm.proxy.common_utils.http_parsing_utils import _read_request_body from litellm.proxy._types import ( LiteLLM_MCPServerTable, LitellmUserRoles, @@ -79,6 +78,7 @@ if MCP_AVAILABLE: UserMCPManagementMode, ) from litellm.proxy.auth.user_api_key_auth import user_api_key_auth + from litellm.proxy.common_utils.http_parsing_utils import _read_request_body from litellm.proxy.management_endpoints.common_utils import _user_has_admin_view from litellm.proxy.management_helpers.utils import management_endpoint_wrapper from litellm.types.mcp import MCPCredentials @@ -309,9 +309,9 @@ if MCP_AVAILABLE: general_settings as proxy_general_settings, ) except Exception: - proxy_general_settings = None + proxy_general_settings = {} - mode = (proxy_general_settings or {}).get("user_mcp_management_mode") + mode = proxy_general_settings.get("user_mcp_management_mode") if mode == "view_all": return "view_all" return "restricted"