fix(ai-gateway): fit generation routes within Vercel timeout - #4923
Conversation
Code Review SummaryStatus: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new commit correctly caps all four transcription route aliases at 800s (their upstream fetch already aborts at 600s, so no regression), but the shared 75s Overview
Issue Details (click to expand)WARNING
Files Reviewed (5 files, incremental vs 4d7367a)
Resolved Since Previous Review
Assumptions
Fix these issues in Kilo Cloud Previous Review Summaries (2 snapshots, latest commit 4d7367a)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 4d7367a)Status: 1 Issue Found | Recommendation: Address before merge Executive SummaryThe new commit fixes the unreachable upstream timeout (600s abort now fits inside the 800s budget), but the shared 75s generation-polling budget still narrows the transcription routes' 5-minute window from #4818, risking under-billed usage rows. Overview
Issue Details (click to expand)WARNING
Resolved Since Previous Review
Files Reviewed (4 files)
Assumptions
Fix these issues in Kilo Cloud Previous review (commit 0bb550d)Status: 2 Issues Found | Recommendation: Address before merge Executive SummaryLowering Overview
Issue Details (click to expand)WARNING
Files Reviewed (4 files)
Reviewed by claude-opus-5 · Input: 32 · Output: 7.2K · Cached: 738.7K Review guidance: REVIEW.md from base branch |
Summary
fetchGenerationwith a 75s backoff budget, which yields roughly one minute of polling with the helper's next-delay reservationSlow-path concerns
maxDurationcovers the full invocation, including request processing andafter()work. The 600s upstream timeout leaves 200s for usage persistence, metrics, generation polling, and other post-response work.fetchGenerationbudget is shared by transcription usage processing as requested; this reduces the five-minute polling window introduced in fix(ai-gateway): extend generation polling timeout #4818 and may miss unusually delayed OpenRouter generation records.Verification
oxfmtgit diff --check