---
title: "Netlify Vite Plugin now supports AI Gateway locally"
description: "Use AI Gateway with zero configuration in local development using native Vite commands. No need for netlify dev."
source: "https://www.netlify.com/changelog/2025-12-01-vite-plugin-ai-gateway-support/"
last_updated: "2026-07-15T17:43:16.000Z"
---
You can now use [AI Gateway](https://docs.netlify.com/build/ai-gateway/overview/) in local development with just `npm run dev` when using the [Netlify Vite Plugin](https://docs.netlify.com/frameworks/vite/#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 frameworknpm 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](https://docs.netlify.com/frameworks/vite/#netlify-vite-plugin) and [AI Gateway](https://docs.netlify.com/build/ai-gateway/overview/) in the documentation.