Deploying using v0 - increase function timeouts?

I am using v0 to create a full-stack app. Some back-end routes are likely to take over 30 seconds to response since they are calling LLMs.

When deploying via v0 each route is deployed to a function with a default timeout of 15 seconds.

I have tried to extend the timeout using a vercel.json file like in the docs but I am getting errors during the deployment.

I have tried many iterations of vercel.json file. But here is an example:

{
  "functions": {
    "api/**/*.ts": {
      "maxDuration": 30
    }
  }
}

And I get the error during deployment:

Error: The pattern “api/**/*.ts” defined in functions doesn’t match any Serverless Functions.

Project code: 5cFjNYbpD3m

Hey @tristan-holibobtech! The exact config needed will vary depending on your project. But there’s a page in the docs with examples showing how to set max duration for Next.js, Svelte, Remix, Astro, and other frameworks.

Please try the recommended config for your project’s framework, and let me know how it goes!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.