diff --git a/bin/provider-health-monitor.py b/bin/provider-health-monitor.py index 373ea62d..588dc105 100644 --- a/bin/provider-health-monitor.py +++ b/bin/provider-health-monitor.py @@ -283,10 +283,10 @@ def check_profiles(health_map): if current_provider in health_map and health_map[current_provider]["healthy"]: continue # Provider is healthy, no action needed - # Find best fallback + # Find best fallback — must be healthy best_fallback = None for provider in fallback_providers: - if provider != current_provider: + if provider != current_provider and health_map.get(provider, {}).get("healthy", False): best_fallback = provider break