diff --git a/pyproject.toml b/pyproject.toml index 8ba6d1f0c..c0a7078ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,7 +55,7 @@ honcho = ["honcho-ai>=2.0.1,<3"] mcp = ["mcp>=1.2.0,<2"] homeassistant = ["aiohttp>=3.9.0,<4"] sms = ["aiohttp>=3.9.0,<4"] -acp = ["agent-client-protocol>=0.8.1,<1.0"] +acp = ["agent-client-protocol>=0.8.1,<0.9"] dingtalk = ["dingtalk-stream>=0.1.0,<1"] rl = [ "atroposlib @ git+https://github.com/NousResearch/atropos.git", diff --git a/tests/test_anthropic_error_handling.py b/tests/test_anthropic_error_handling.py index d6b8717bf..3d7660aa8 100644 --- a/tests/test_anthropic_error_handling.py +++ b/tests/test_anthropic_error_handling.py @@ -217,10 +217,17 @@ def test_529_overloaded_is_retried_and_recovers(monkeypatch): def test_429_exhausts_all_retries_before_raising(monkeypatch): - """429 must retry max_retries times, not abort on first attempt.""" + """429 must retry max_retries times, then return a failed result. + + The agent no longer re-raises after exhausting retries — it returns a + result dict with the error in final_response. This changed when the + fallback-provider feature was added (the agent tries a fallback before + giving up, and returns a result dict either way). + """ agent_cls = _make_agent_cls(_RateLimitError) # always fails - with pytest.raises(_RateLimitError): - _run_with_agent(monkeypatch, agent_cls) + result = _run_with_agent(monkeypatch, agent_cls) + resp = str(result.get("final_response", "")) + assert "429" in resp or "retries" in resp.lower() def test_400_bad_request_is_non_retryable(monkeypatch):