diff --git a/docs/my-website/docs/proxy/config_settings.md b/docs/my-website/docs/proxy/config_settings.md index 91445863f76..20bca925026 100644 --- a/docs/my-website/docs/proxy/config_settings.md +++ b/docs/my-website/docs/proxy/config_settings.md @@ -367,6 +367,9 @@ router_settings: | ignore_invalid_deployments | boolean | If true, ignores invalid deployments. Default for proxy is True - to prevent invalid models from blocking other models from being loaded. | | search_tools | List[SearchToolTypedDict] | List of search tool configurations for Search API integration. Each tool specifies a search_tool_name and litellm_params with search_provider, api_key, api_base, etc. [Further Docs](../search/index.md) | | guardrail_list | List[GuardrailTypedDict] | List of guardrail configurations for guardrail load balancing. Enables load balancing across multiple guardrail deployments with the same guardrail_name. [Further Docs](./guardrails/guardrail_load_balancing.md) | +| enable_health_check_routing | boolean | If true, enables health check-driven deployment filtering to avoid routing requests to unhealthy deployments | +| health_check_staleness_threshold | integer | Maximum age in seconds for cached health check results before marking deployments as stale | +| health_check_ignore_transient_errors | boolean | If true, 429 (rate limit) and 408 (timeout) health check failures are ignored and do not affect routing or cooldown | ### environment variables - Reference diff --git a/litellm/proxy/health_check.py b/litellm/proxy/health_check.py index aeabe492f54..9895eeb66ea 100644 --- a/litellm/proxy/health_check.py +++ b/litellm/proxy/health_check.py @@ -21,6 +21,7 @@ ILLEGAL_DISPLAY_PARAMS = [ "vertex_credentials", "aws_access_key_id", "aws_secret_access_key", + "exception", # internal; not JSON-serializable, never for display ] MINIMAL_DISPLAY_PARAMS = ["model", "mode_error"] diff --git a/tests/test_litellm/router_utils/test_health_check_routing.py b/tests/test_litellm/router_utils/test_health_check_routing.py index f40144b44c9..b87a39ac1de 100644 --- a/tests/test_litellm/router_utils/test_health_check_routing.py +++ b/tests/test_litellm/router_utils/test_health_check_routing.py @@ -50,6 +50,7 @@ class TestFilterHealthCheckUnhealthyDeployments: def __init__(self): self.enable_health_check_routing = enable self.health_state_cache = health_cache + self.allowed_fails_policy = None # Import the actual method and bind it from litellm.router import Router @@ -125,6 +126,7 @@ class TestAsyncFilterHealthCheckUnhealthyDeployments: def __init__(self): self.enable_health_check_routing = enable self.health_state_cache = health_cache + self.allowed_fails_policy = None fake = FakeRouter() fake._async_filter_health_check_unhealthy_deployments = (