From 8b249109bbc102f6470c8e8da805cc3a41e85639 Mon Sep 17 00:00:00 2001 From: Ian Date: Wed, 7 Oct 2026 21:15:51 -0400 Subject: [PATCH] fix: don't retry 404 --- strix/core/execution.py | 2 +- tests/test_execution_transient_retry.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/strix/core/execution.py b/strix/core/execution.py index ff60fee9..5997e3db 100644 --- a/strix/core/execution.py +++ b/strix/core/execution.py @@ -184,7 +184,7 @@ def _is_transient_model_error(exc: BaseException) -> bool: return True code = _model_error_status_code(exc) if code is not None: - return code >= 400 and code not in (401, 402, 403) + return code >= 400 and code not in (401, 402, 403, 404) return isinstance(exc, APIError) diff --git a/tests/test_execution_transient_retry.py b/tests/test_execution_transient_retry.py index 6b2fd336..f0276932 100644 --- a/tests/test_execution_transient_retry.py +++ b/tests/test_execution_transient_retry.py @@ -84,8 +84,7 @@ def test_client_errors_are_transient() -> None: "bad", response=httpx.Response(400, request=_request()), body=None ) assert execution._is_transient_model_error(bad_request) is True - assert execution._is_transient_model_error(_status_error(404)) is True - for status in (401, 402, 403): + for status in (401, 402, 403, 404): assert execution._is_transient_model_error(_status_error(status)) is False assert execution._is_transient_model_error(ValueError("nope")) is False