← NetlifyCONTENT HISTORY

Update to Netlify

Snapshot Sep 30, 2026 · 23:18 UTC · version 1.0.0

Collection source: not recorded for this historical snapshot. These snapshots do not have a confirmed matching collection source. Differences in file lists alone do not establish changes to the package.

WHAT CHANGED · RULE-BASED ANALYSIS

Supporting file metadata differs

Newly listed paths: LICENSE.txt, agents/openai.yaml. This compares saved file lists, not package contents; a different collection source can change the list.

Observed in package metadata. These changes alone do not establish a new customer-facing feature.

Supporting files

Before

[{"relative_path":"assets/netlify-small.svg","size_in_bytes":1291},{"relative_path":"assets/netlify.png","size_in_bytes":2686}]

After

[{"relative_path":"LICENSE.txt","size_in_bytes":10776},{"relative_path":"agents/openai.yaml","size_in_bytes":336},{"relative_path":"assets/netlify-small.svg","size_in_bytes":1291},{"relative_path":"assets/netlify.png","size_in_bytes":2686}]

Compare saved observations

Download comparison JSON
Full technical diff · 1 changed fields

changed /included_files

BEFORE
[
  {
    "relative_path": "assets/netlify-small.svg",
    "size_in_bytes": 1291
  },
  {
    "relative_path": "assets/netlify.png",
    "size_in_bytes": 2686
  }
]
AFTER
[
  {
    "relative_path": "LICENSE.txt",
    "size_in_bytes": 10776
  },
  {
    "relative_path": "agents/openai.yaml",
    "size_in_bytes": 336
  },
  {
    "relative_path": "assets/netlify-small.svg",
    "size_in_bytes": 1291
  },
  {
    "relative_path": "assets/netlify.png",
    "size_in_bytes": 2686
  }
]
Full snapshot data
{
  "name": "netlify-ai-gateway",
  "description": "Guide for using Netlify AI Gateway to access AI models. Use when adding AI capabilities or selecting/changing AI models. Must be read before choosing a model. Covers supported providers (OpenAI, Anthropic, Google), SDK setup, environment variables, and the list of available models.",
  "included_files": [
    {
      "relative_path": "LICENSE.txt",
      "size_in_bytes": 10776
    },
    {
      "relative_path": "agents/openai.yaml",
      "size_in_bytes": 336
    },
    {
      "relative_path": "assets/netlify-small.svg",
      "size_in_bytes": 1291
    },
    {
      "relative_path": "assets/netlify.png",
      "size_in_bytes": 2686
    }
  ],
  "skill_md_contents": "---\nname: netlify-ai-gateway\ndescription: Guide for using Netlify AI Gateway to access AI models. Use when adding AI capabilities or selecting/changing AI models. Must be read before choosing a model. Covers supported providers (OpenAI, Anthropic, Google), SDK setup, environment variables, and the list of available models.\n---\n\n# Netlify AI Gateway\n\n> **IMPORTANT:** Only use models listed in the \"Available Models\" section below. AI Gateway does not support every model a provider offers. Using an unsupported model will cause runtime errors.\n\nNetlify AI Gateway provides access to AI models from multiple providers without managing API keys directly. It is available on all Netlify sites.\n\n## How It Works\n\nThe AI Gateway acts as a proxy — you use standard provider SDKs (OpenAI, Anthropic, Google) but point them at Netlify's gateway URL instead of the provider's API. Netlify handles authentication, rate limiting, and monitoring.\n\n## Setup\n\n1. Enable AI on your site in the Netlify UI\n2. The environment variable `OPENAI_BASE_URL` is set automatically by Netlify\n3. Install the provider SDK you want to use\n\nNo provider API keys are needed — Netlify's gateway handles authentication.\n\n## Using OpenAI SDK\n\n```bash\nnpm install openai\n```\n\n```typescript\nimport OpenAI from \"openai\";\n\nconst openai = new OpenAI();\n// OPENAI_BASE_URL is auto-configured — no API key or base URL needed\n\nconst completion = await openai.chat.completions.create({\n  model: \"gpt-4o-mini\",\n  messages: [{ role: \"user\", content: \"Hello!\" }],\n});\n```\n\n## Using Anthropic SDK\n\n```bash\nnpm install @anthropic-ai/sdk\n```\n\n```typescript\nimport Anthropic from \"@anthropic-ai/sdk\";\n\nconst client = new Anthropic({\n  baseURL: Netlify.env.get(\"ANTHROPIC_BASE_URL\"),\n});\n\nconst message = await client.messages.create({\n  model: \"claude-sonnet-4-5-20250929\",\n  max_tokens: 1024,\n  messages: [{ role: \"user\", content: \"Hello!\" }],\n});\n```\n\n## Using Google AI SDK\n\n```bash\nnpm install @google/generative-ai\n```\n\n```typescript\nimport { GoogleGenerativeAI } from \"@google/generative-ai\";\n\nconst genAI = new GoogleGenerativeAI(\"placeholder\");\n// Configure base URL via environment variable\n\nconst model = genAI.getGenerativeModel({ model: \"gemini-2.5-flash\" });\nconst result = await model.generateContent(\"Hello!\");\n```\n\n## In a Netlify Function\n\n```typescript\nimport type { Config, Context } from \"@netlify/functions\";\nimport OpenAI from \"openai\";\n\nexport default async (req: Request, context: Context) => {\n  const { prompt } = await req.json();\n  const openai = new OpenAI();\n\n  const completion = await openai.chat.completions.create({\n    model: \"gpt-4o-mini\",\n    messages: [{ role: \"user\", content: prompt }],\n  });\n\n  return Response.json({\n    response: completion.choices[0].message.content,\n  });\n};\n\nexport const config: Config = {\n  path: \"/api/ai\",\n  method: \"POST\",\n};\n```\n\n## Environment Variables\n\n| Variable | Provider | Set by |\n|---|---|---|\n| `OPENAI_BASE_URL` | OpenAI | Netlify (automatic) |\n| `ANTHROPIC_BASE_URL` | Anthropic | Netlify (automatic) |\n\nThese are configured automatically when AI is enabled on the site. No manual setup required.\n\n## Local Development\n\nWith `@netlify/vite-plugin` or `netlify dev`, gateway environment variables are injected automatically. The AI Gateway is accessible during local development after the site has been deployed at least once.\n\n## Available Models\n\nFor the list of supported models, see https://docs.netlify.com/build/ai-gateway/overview/.\n"
}

SHA-256: 7f064a1a60c31b4568aff3bf122ee800764ae5777f7a7b0eef4efd856bceb637