Skip to content

fix: apply the correct max duration to the AI chat route - #479

Merged
ysamcode merged 2 commits into
mainfrom
develop
Jul 28, 2026
Merged

fix: apply the correct max duration to the AI chat route#479
ysamcode merged 2 commits into
mainfrom
develop

Conversation

@ysamcode

Copy link
Copy Markdown
Collaborator

Summary

The AI chat route's 300-second maxDuration in vercel.json was listed after the catch-all app/(builder)/ycode/api/**/*.ts pattern, so the catch-all's 60-second limit won and long AI chat runs were killed after a minute. Reorder the entries so the specific AI chat rule comes first and its 300-second limit actually applies.

Changes

  • Move the AI chat route's maxDuration entry above the catch-all API pattern in vercel.json

Test plan

  • Deploy and run an AI chat session longer than 60 seconds — it should not be cut off
  • Confirm other builder API routes still use the 60-second limit

Made with Cursor

ysamcode and others added 2 commits July 28, 2026 09:49
Vercel resolves vercel.json function patterns first-match-wins in
definition order, so the 60s catch-all listed above the chat route
entry swallowed it — Vercel hard-killed every agent run at 60s and
turns ended silently truncated ("Thought for 1m" with no result).
List the specific route first so its 300s budget actually applies.

Co-authored-by: Cursor <cursoragent@cursor.com>
fix: AI chat killed after 60 seconds on Vercel
@ysamcode ysamcode added the Bug Something isn't working label Jul 28, 2026
@ysamcode ysamcode self-assigned this Jul 28, 2026
@ysamcode
ysamcode merged commit d0fb732 into main Jul 28, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant