-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix(executor): add exponential backoff retry for transient LLM provid… #3773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
5f887e9
70ce97f
0b7a84f
5c8c135
d6e45a2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Scope retries to LLM blocks only (agent, evaluator, router) to avoid duplicate side effects on non-idempotent blocks like HTTP, email, webhook - Treat statusless errors as non-retryable by default — only retry known network errors (ECONNRESET, ETIMEDOUT, etc.) not JS runtime errors - Respect Retry-After header for 503 responses in addition to 429 (RFC 7231) - Add afterEach vi.useRealTimers() to prevent timer leak between tests
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,6 +6,10 @@ describe('withRetry', () => { | |
| vi.useFakeTimers() | ||
| }) | ||
|
|
||
| afterEach(() => { | ||
| vi.useRealTimers() | ||
| }) | ||
|
|
||
| it('returns result immediately on success', async () => { | ||
|
Comment on lines
+6
to
+13
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
afterEach(() => {
vi.useRealTimers()
})
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed in 70ce97f — addressed all review feedback: scoped retries to LLM blocks only, added isNetworkError() for statusless errors, added Retry-After support for 503, and added afterEach vi.useRealTimers() to tests. |
||
| const fn = vi.fn().mockResolvedValue('ok') | ||
| const result = await withRetry(fn) | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.