Skip to content

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]

fix: add better error handling for misconfig on health check (#19441)

Harshit Jain76433f9f046c
diff --git a/litellm/proxy/proxy_server.py b/litellm/proxy/proxy_server.py
index 8d306327dec..ff48443efc8 100644
--- a/litellm/proxy/proxy_server.py
+++ b/litellm/proxy/proxy_server.py
@@ -2738,6 +2738,14 @@ class ProxyConfig:
for k, v in router_settings.items():
if k in available_args:
router_params[k] = v
+ elif k == "health_check_interval":
+ raise ValueError(
+ f"'{k}' is NOT a valid router_settings parameter. Please move it to 'general_settings'."
+ )
+ else:
+ verbose_proxy_logger.warning(
+ f"Key '{k}' is not a valid argument for Router.__init__(). Ignoring this key."
+ )
router = litellm.Router(
**router_params,
assistants_config=assistants_config,