Skip to content

The agent that grows with you

test: assert skipped candidates do not compound cooldown

Teknium0746484b1424
diff --git a/tests/run_agent/test_provider_fallback.py b/tests/run_agent/test_provider_fallback.py
index cd1c8828508..be32455931b 100644
--- a/tests/run_agent/test_provider_fallback.py
+++ b/tests/run_agent/test_provider_fallback.py
@@ -173,9 +173,10 @@ class TestFallbackChainAdvancement:
(None, None), # broken provider
(_mock_client(), "gpt-4o"), # fallback succeeds
]
- assert agent._try_activate_fallback() is True
+ assert agent._try_activate_fallback(FailoverReason.rate_limit) is True
assert agent.model == "gpt-4o"
assert agent._fallback_index == 2
+ assert agent._rate_limit_backoff_count == 1
def test_skips_provider_that_raises_to_next(self):
"""If resolve_provider_client raises, skip to next in chain."""