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: prevent duplicate MCP reload scheduler registration
Yuta Saito73f66b101c41
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.pyindex 83d4ab5657e..2e99a2f6824 100644--- a/litellm/proxy/proxy_server.py+++ b/litellm/proxy/proxy_server.py@@ -4120,23 +4120,6 @@ class ProxyConfig:return []-async def _reload_mcp_servers_job():- """Background job entrypoint for MCP registry refreshes."""- if proxy_config._should_load_db_object(object_type="mcp") is False:- return-- try:- from litellm.proxy._experimental.mcp_server.mcp_server_manager import (- global_mcp_server_manager,- )-- await global_mcp_server_manager.reload_servers_from_database()- except Exception as e:- verbose_proxy_logger.exception(- "Failed to reload MCP servers from database: %s", str(e)- )--proxy_config = ProxyConfig()@@ -4675,17 +4658,6 @@ class ProxyStartupEvent:)await proxy_config.get_credentials(prisma_client=prisma_client)- from litellm.proxy._experimental.mcp_server.utils import is_mcp_available-- if is_mcp_available():- scheduler.add_job(- _reload_mcp_servers_job,- "interval",- seconds=30,- id="reload_mcp_servers_job",- replace_existing=True,- misfire_grace_time=APSCHEDULER_MISFIRE_GRACE_TIME,- )await cls._initialize_slack_alerting_jobs(scheduler=scheduler,general_settings=general_settings,