Skip to content

fix(executors): pass TimeoutError reason to controller.abort() in 7 niche executors - #8699

Merged
diegosouzapw merged 1 commit into
release/v3.8.49from
fix/niche-executors-abort-timeout
Jul 27, 2026
Merged

diegosouzapw merged 1 commit into
release/v3.8.49from
fix/niche-executors-abort-timeout

Conversation

@diegosouzapw

@diegosouzapw diegosouzapw commented Jul 26, 2026 •

Copy link
Copy Markdown
Collaborator

Bug

Seven niche executors call controller.abort() without a reason on their internal timeouts. Node.js 22 produces DOMException { name: "AbortError", message: "This operation was aborted" }.

isLocalStreamLifecycleError() matches name === "AbortError" then status 499/"Request aborted" instead of 504/"Gateway Timeout".

Downstream impact: combo routing sees 499 then stops immediately, no fallback, no cooldown, no breaker. The TimeoutError path in chatCore.ts (lines 3231-3248) is never reached.

NOT affected: base.ts already passes name: "TimeoutError" as abort reason (lines 786-791) -- correctly classified as 504.

Fix

Pass a TimeoutError-shaped reason to controller.abort(err) in all 7 executors (9 call sites):

Executor Sites
[provider removed at its operator's request].ts line 190
firecrawl-fetch.ts line 103
felo-web.ts lines 207, 246
tavily-fetch.ts line 43
duckduckgo-web.ts lines 404, 521
mimocode.ts line 173
tinyfish-fetch.ts line 65

Pattern applied (from base.ts):

const err = new Error("executor-name timeout after Nms");
err.name = "TimeoutError";
controller.abort(err);

Test

New regression test: tests/unit/isLocalStreamLifecycleError-abort-shape.test.ts (6 cases).

Side-finding from #8197 investigation

@diegosouzapw

Copy link
Copy Markdown
Collaborator Author

Bom trabalho — adicionar reason ao TimeoutError em 7 executors de nicho fecha uma assimetria de observabilidade que vinha nos atrapalhando. Pequeno check: confirmar que a string reason é idêntica nos 7 sites (sem typos). Já MERGED: #8565 (Kiro) usa o mesmo padrão.

Approving as merge-ready (★3). /merge-prs will pick it up.

@diegosouzapw
diegosouzapw merged commit f2d7e9a into release/v3.8.49 Jul 27, 2026
9 of 10 checks passed
@diegosouzapw
diegosouzapw deleted the fix/niche-executors-abort-timeout branch July 27, 2026 20:24
@allanvb allanvb mentioned this pull request Jul 27, 2026
3 of 4 tasks
HouMinXi pushed a commit to HouMinXi/OmniRoute that referenced this pull request Aug 2, 2026
…iche executors (cheaper-inference#8699)

Co-authored-by: ikelvingo <im.kelvinwong@gmail.com>
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…iche executors (cheaper-inference#8699)

Co-authored-by: ikelvingo <im.kelvinwong@gmail.com>
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.

2 participants