v0 chat uses production environment variables and fails to create NeonDB branch

Problem

When creating a new chat for an existing project running on Vercel using the NeonDB integration, a new git branch is created as expected, safeguarding main. However, the chat still uses the same production environment variables the app is running with in production.

Current Behavior

  • No new NeonDB branch is created (though it works fine when creating a new branch outside of v0).
  • VERCEL_ENV and NEXT_PUBLIC_VERCEL_ENV are not set to preview or development as expected.
  • This is dangerous because the development environment pushes migrations on start, which could break production.

The release article does mention new Neon branch creations so I assume something is going wrong on our side or Vercel’s: The New v0 Is Ready for Production Apps and Agents - Neon

Question

How can we proceed to debug this issue?