[错误] LLM 重试循环重试不可重试的错误,并推迟回退到最后一次尝试
作者: VVoruganti创建于 2026年9月9日更新于 2026年9月22日
标签bugllm providermaintainer-approved
- Add a
retry=predicate to the tenacity decorator: retry on 429, 5xx, and timeout/connection errors; fail fast on everything else. This needs a small provider-agnostic classifier, since each backend SDK raises its own types —src/LLM/executor.pyalready has_outcome_from_erroras a precedent for that kind of helper, though it only distinguishes success/error/cancelled and isn't reusable as-is. 2. Switch to the fallback on the first retryable failure rather than atattempt == retry_attempts. Both changes are confined tosrc/LLM/api.pyandsrc/LLM/runtime.py.
内容来源: plastic-labs/honcho