feat(ai): add guarded Claude fallback route

This commit is contained in:
ogt
2026-07-15 15:57:24 +08:00
parent f57845ba5e
commit 5c5eb48091
56 changed files with 4942 additions and 760 deletions

View File

@@ -16,6 +16,7 @@ from src.services.ai_router import AIProviderEnum, AIRouter, reset_ai_router
EXPECTED_FALLBACK = [
AIProviderEnum.OLLAMA_GCP_B,
AIProviderEnum.OLLAMA_LOCAL,
AIProviderEnum.CLAUDE,
AIProviderEnum.GEMINI,
]
@@ -48,7 +49,7 @@ def _router_with_observed_fallback(provider_name: str) -> tuple[AIRouter, MagicM
@pytest.mark.asyncio
@pytest.mark.parametrize(
"observed_primary",
["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "gemini"],
["ollama_gcp_a", "ollama_gcp_b", "ollama_local", "claude", "gemini"],
)
async def test_health_observation_never_reorders_execution_contract(
observed_primary: str,