Netlify Vite Plugin now supports AI Gateway locally

December 1, 2025

You can now use AI Gateway in local development with just npm run dev when using the Netlify Vite Plugin. Previously, AI Gateway’s auto-configured environment variables only worked when running netlify dev, which added friction for developers using Vite-powered frameworks like Astro.

With this update, AI Gateway environment variables are automatically populated when running your Vite development server directly. This means you can run standard framework commands without extra steps:

# Works with any Vite-based framework
npm run dev

This is part of our ongoing effort to streamline the developer experience for Vite frameworks. Modern frameworks like Astro let you specify Netlify as your deployment target and handle everything automatically—now AI Gateway works the same way.

This change also improves compatibility with AI coding agents and other automated workflows that expect standard development commands to work without additional configuration.

Learn more about the Netlify Vite Plugin and AI Gateway in the documentation.