Setting maxDuration config with trpc?

I'm sure folks deployed on vercel saw the email saying the default function time limit was being changed from 60s to 15s (albeit now it can increased up to 300s). The have good docs on how to specify this when using vanilla next but i haven't been able to figure out how to set this for TRPC. Anyone else explored this?
Vercel Documentation
Runtimes
Runtimes transform your source code into Functions, which are served by our Edge Network. Learn about the official runtimes supported by Vercel.
3 Replies
Matvey
Matvey9mo ago
in ./src/pages/api/trpc/[trpc].ts
export const config = {
maxDuration: 5, // number of seconds
};
export const config = {
maxDuration: 5, // number of seconds
};
chemishra
chemishra9mo ago
ah yea i was trying to avoid upgrading to next js 13.5, but just bit the bullet and used the config route. couldn't get the vercel.json route to work alas. thanks for the extra push in that direction @ronanru
chemishra
chemishra9mo ago
update - the first thing i was trying should have worked but didn't due to a bug. should be fixed now. i've already migrated to a more recent version to use Matvey's suggestion though, so i didn't verify this.
No description