1
0

Fix router disabled provider check + comprehensive functional tests

Fixes:
- Router now properly skips disabled providers in complete() method
- Fixed avg_latency calculation comment in tests (now correctly documents behavior)

New Test Suites:
- tests/test_functional_router.py: 10 functional tests for router
- tests/test_functional_mcp.py: 15 functional tests for MCP discovery/bootstrap
- tests/test_integration_full.py: 14 end-to-end integration tests

Total: 39 new functional/integration tests

All 144 tests passing (105 router/mcp + 39 functional/integration)
This commit is contained in:
Alexander Payne
2026-02-25 20:22:51 -05:00
parent 56437751d3
commit 8d85f95ee5
5 changed files with 717 additions and 0 deletions

View File

@@ -250,6 +250,11 @@ class CascadeRouter:
errors = []
for provider in self.providers:
# Skip disabled providers
if not provider.enabled:
logger.debug("Skipping %s (disabled)", provider.name)
continue
# Skip unhealthy providers (circuit breaker)
if provider.status == ProviderStatus.UNHEALTHY:
# Check if circuit breaker can close