Open-source AI penetration testing tool to find and fix your app’s vulnerabilities.
Python agentsai-hackingai-penetration-testingai-pentestingai-securityartificial-intelligencebug-bountycode-qualityctf-toolscybersecuritycybersecurity-toolsethical-hackinghackingllm-securityoffensive-securitypenetration-testingpentesting-toolsred-teamingsecuritysecurity-automation
fix(llm): retry statusless mid-stream provider errors (quota/billing)
Ahmed Allam9aa151c68749
diff --git a/strix/config/models.py b/strix/config/models.pyindex db9fcb7b..931d15b1 100644--- a/strix/config/models.py+++ b/strix/config/models.py@@ -22,17 +22,7 @@ if TYPE_CHECKING:def _retry_statusless_provider_errors(context: RetryPolicyContext) -> bool:- """Retry provider errors that arrive without an HTTP status code.-- Quota, billing, and other provider-side failures frequently surface *inside*- a streamed response as a bare error with no ``status_code`` (the transport- already returned ``200`` before the failure). The built-in ``http_status``- policy skips these because it requires a known code, so they would otherwise- fail on the first attempt. Retrying a statusless error (the runner still- refuses to replay a stream once content has been emitted, and never retries a- user abort) mirrors the pre-SDK engine, which retried any error lacking a- definitive client status code.- """+ """Retry statusless provider errors (e.g. mid-stream quota/billing), but not aborts."""normalized = context.normalizedif normalized.is_abort:return False