Skip to content

fix(llm): retry transient HTTP 408 and 409 responses - #48680

Open
hamza-paracha wants to merge 1 commit into
anomalyco:devfrom
hamza-paracha:retry-client-status
Open

fix(llm): retry transient HTTP 408 and 409 responses#48680
hamza-paracha wants to merge 1 commit into
anomalyco:devfrom
hamza-paracha:retry-client-status

Conversation

@hamza-paracha

@hamza-paracha hamza-paracha commented Sep 12, 2026

Copy link
Copy Markdown

Issue for this PR

Fixes #47525

This PR covers the V2 runtime. The legacy runtime is covered separately by #47524.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Restore HTTP 408 and 409 as retryable provider failures in the LLM request executor, preserving the behavior introduced in #39391. They now use the existing retry budget, backoff, and Retry-After handling instead of failing immediately.

How did you verify your code works?

The new recovery tests and expanded error-classification test failed before the fix. All 17 executor tests now pass, including retry exhaustion, backoff, and non-retryable errors. Package bun typecheck, Prettier, and git diff --check pass.

Screenshots / recordings

Not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Copilot AI lite review requested due to automatic review settings September 12, 2026 17:51
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Changes are fully reviewed with comprehensive test coverage and no unresolved issues.

Pull request overview

Restores retry handling for transient HTTP 408 and 409 responses in the LLM request executor.

Changes:

  • Classifies HTTP 408/409 as retryable provider failures.
  • Adds retry, exhaustion, and error-classification tests.
File summaries
File Description
packages/llm/test/executor.test.ts Tests retry and exhaustion behavior.
packages/llm/src/route/executor.ts Adds 408/409 retry classification.
Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP 408 is not retried on either path; 409 regressed since #39391

2 participants