fix: retry HTTP 408 timeouts 🤖🤖🤖 - #413
Conversation
Signed-off-by: Ricky <rlissi@nvidia.com> AI-agent: 🤖🤖🤖
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: NVIDIA-NeMo/labs-OO-Agents/.coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (4)
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe default retryable status-code set now includes HTTP 408. Tests cover classification and async and sync retries, including backoff delays and exhausted retry attempts. ChangesHTTP 408 retries
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to Timeouts reported as HTTP 408 now retry under the default policy, using the existing backoff and retry limits. No merge-blocking risk was found. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
What does this PR do?
LiteLLM timeouts stop after the first attempt, even though Nooa's default client is configured to retry timeouts. LiteLLM reports these errors as status
408, which the default retry policy currently skips.Add
408to the existing default retry set. The current retry loop, backoff, and retry budget handle it. Callers that explicitly exclude408still get no retry.Related issues
This surfaced through Trace Analyst's
CompletionClient.acall()path. It is separate from the application-owned admission-control work in #349; no concurrency policy changes are included.Checklist
0.15.20.Validation
Before the fix, 11 timeout regressions fail. After the fix, the default
CompletionClientrecovers from an injected LiteLLM timeout followed by a successful response. Tests also cover synchronous/asynchronous recovery, backoff, exhaustion, explicit exclusions, permanent 4xx errors, and cancellation.The existing budget remains three retries after the first attempt. A persistent 600-second timeout can therefore take about 40 minutes plus backoff. This fixes skipped retries, not the cause of the endpoint delay.
Test scope and commands
Tested against
b814ca1db9e7377f9aa3a3471b9396da2f4ff3dausing Python 3.13 and LiteLLM1.98.0, the version from the failing client environment. Provider calls were mocked. Five live-provider cases were excluded. The full repository suite remains for CI.Summary by CodeRabbit