[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-neon-neon-ai-gateway":3,"mdc--e9m91q-key":38,"related-repo-neon-neon-ai-gateway":4820,"related-org-neon-neon-ai-gateway":4928},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"neon-ai-gateway","call LLMs via Neon AI Gateway","One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks. Use when a user wants to call an LLM, add AI\u002Fchat\u002Fan agent to their app, route between model providers (OpenAI, Anthropic, Google\u002FGemini, Meta, Alibaba, DeepSeek), or avoid juggling separate provider API keys and accounts — especially when they already use Neon and want AI requests to branch with their project. Works with the OpenAI SDK, Anthropic SDK, google-genai, the Vercel AI SDK, and Mastra by changing only the base URL. Triggers include \"call an LLM\", \"add AI to my app\", \"chat completion\", \"model routing\", \"LLM proxy\u002Fgateway\", \"one API for all models\", \"use Claude\u002FGPT\u002FGemini\", \"AI SDK\", \"Mastra agent\", \"Neon AI Gateway\", and \"log\u002Frate-limit AI calls\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"neon","Neon","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fneon.png","neondatabase",[13,15,18,21,24],{"name":9,"slug":8,"type":14},"tag",{"name":16,"slug":17,"type":14},"LLM","llm",{"name":19,"slug":20,"type":14},"Databricks","databricks",{"name":22,"slug":23,"type":14},"AI Infrastructure","ai-infrastructure",{"name":25,"slug":26,"type":14},"API Development","api-development",81,"https:\u002F\u002Fgithub.com\u002Fneondatabase\u002Fagent-skills","2026-07-27T06:08:00.288175",null,12,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"Agent Skills for Neon Severless Postgres","https:\u002F\u002Fgithub.com\u002Fneondatabase\u002Fagent-skills\u002Ftree\u002FHEAD\u002Fskills\u002Fneon-ai-gateway","---\nname: neon-ai-gateway\ndescription: >-\n  One API and one credential for frontier and open-source LLMs, built into your\n  Neon branch and powered by Databricks. Use when a user wants to call an LLM,\n  add AI\u002Fchat\u002Fan agent to their app, route between model providers (OpenAI,\n  Anthropic, Google\u002FGemini, Meta, Alibaba, DeepSeek), or avoid juggling\n  separate provider API keys and accounts — especially when they already use\n  Neon and want AI requests to branch with their project. Works with the OpenAI\n  SDK, Anthropic SDK, google-genai, the Vercel AI SDK, and Mastra by changing\n  only the base URL. Triggers include \"call an LLM\", \"add AI to my app\",\n  \"chat completion\", \"model routing\", \"LLM proxy\u002Fgateway\", \"one API for all\n  models\", \"use Claude\u002FGPT\u002FGemini\", \"AI SDK\", \"Mastra agent\", \"Neon AI\n  Gateway\", and \"log\u002Frate-limit AI calls\".\nmetadata:\n  parent: neon\n---\n\n**FIRST**: Use the parent `neon` skill for a Neon platform overview, getting started with Neon, Neon development best practices, and more.\n\nIf the `neon` skill is not installed, fetch it from https:\u002F\u002Fneon.com\u002Fdocs\u002Fai\u002Fskills\u002Fneon\u002FSKILL.md or install it with:\n\n```bash\nnpx skills add neondatabase\u002Fagent-skills --skill neon\n```\n\n# Neon AI Gateway\n\nThis is a public beta feature and only available in `us-east-2`.\n\nThe Neon AI Gateway is the LLM inference layer built into your Neon branch: one API and one Neon credential give you access to frontier and open-source models from Anthropic, OpenAI, Google, Meta, Alibaba, DeepSeek, and Databricks — powered by Databricks. Your existing OpenAI\u002FAnthropic\u002FGemini SDK works by changing only the base URL.\n\nUse this skill to help the user send model calls through the gateway, wire it into the AI SDK or Mastra, and switch providers without rewiring code. Deliver a working inference request, a configured agent, or a precise answer from the official Neon docs.\n\n## When to Use\n\nReach for the AI Gateway whenever an app or agent needs to call an LLM and the user would rather not manage model providers themselves:\n\n- **One credential instead of many provider accounts.** A single Neon credential reaches the entire model catalog across seven providers. No separate OpenAI \u002F Anthropic \u002F Google billing, keys, or signups to provision and rotate.\n- **Switch models without rewiring.** The unified endpoint is OpenAI-compatible and works with every model in the catalog — change one `model` field to move between Claude, GPT, and Gemini. Standard SDKs (OpenAI, Anthropic, google-genai) work with just a base-URL change.\n- **AI follows your branches.** Each branch has its own gateway endpoint, scoped with the same lineage as your database. AI requests from a preview\u002Ffeature branch are isolated to that branch — the same isolation your data already gets — which makes preview, CI, and agent environments self-contained.\n- **No extra infrastructure, and it's already next to your data.** The gateway lives inside your Neon project (and is injected into Neon Functions automatically), runs on the same Databricks infrastructure that serves trillions of tokens a month, and supports streaming (SSE) out of the box.\n\nIf the user already has a deep, single-provider integration and no interest in Neon branching or multi-model routing, a direct provider SDK is fine — but the moment they want one credential, model portability, or branch-scoped AI, this is the reason to use it.\n\n## What It Does\n\n- **One API for all models** — Frontier and open-source models behind a single endpoint, addressed by their catalog ID (e.g. `claude-sonnet-4-6`, `gpt-5-mini`, `gemini-2-5-flash`).\n- **Standard SDKs, one URL change** — OpenAI SDK and AI SDK (OpenAI-compatible MLflow\u002FResponses routes), Anthropic SDK (native Messages), google-genai (native Gemini).\n- **Branch-scoped** — Each branch gets its own gateway host; the Neon credential authorizes requests for that branch and its descendants.\n- **Streaming** — Server-sent events work on all endpoints with no extra configuration.\n\n## Availability\n\nCheck these preconditions before setting anything up:\n\nThe AI Gateway is a public beta feature available only on new projects in the `us-east-2` region; it can't be enabled on existing projects. Foundation model access requires a paid Neon plan. Confirm the user's project is a new project in `us-east-2`.\n\n### Enabling the gateway: plan and model-catalog gating\n\nThe AI Gateway is credential-gated rather than a provisioning step, but two plan\u002Fbeta limits gate it — one blocks provisioning, the other only trims the catalog — and the CLI surfaces each:\n\n- **Free plan → provisioning is blocked.** `neon config apply` \u002F `deploy` and `neon checkout` **refuse** to enable the gateway on a Free plan (the gateway can't serve requests there), with a friendly \"upgrade to a paid plan, or remove `preview.aiGateway`\" error. A dry-run `neon config plan` and `neon env pull` don't provision, so they only **warn**. So: to use the gateway the project's account must be on a paid Neon plan.\n- **Paid plan with a reduced model catalog.** On a paid plan the gateway provisions and serves, but during the beta an account can start with a trimmed catalog — some flagship models (e.g. Anthropic Opus, OpenAI Codex \u002F `*-pro`) are missing from `GET \u002Fv1\u002Fmodels`. This is expected; `neon env pull` (and the env pull bundled into `apply` \u002F `deploy` \u002F `checkout`) warns and links the user to their branch's AI Gateway page in the Neon Console (`https:\u002F\u002Fconsole.neon.tech\u002Fapp\u002Fprojects\u002F\u003Cproject-id>\u002Fbranches\u002F\u003Cbranch-id>\u002Fai-gateway`) to request access to more models. Verify what's actually available for the branch by reading `\u002Fv1\u002Fmodels` (see the models section below) rather than assuming the full catalog.\n\nWhen helping a user debug \"the gateway isn't working\" or \"a model is missing\", use `\u002Fv1\u002Fmodels` plus the account's plan to distinguish these two cases — a Free plan blocks provisioning entirely, while a reduced catalog on a paid plan just needs a model-access request.\n\n## Setup\n\nThe gateway is part of `neon.ts` (see the `neon` skill for the branch-first workflow and `neon.ts` basics). Enable it under `preview.aiGateway`:\n\n```typescript\n\u002F\u002F neon.ts\nimport { defineConfig } from \"@neon\u002Fconfig\u002Fv1\";\n\nexport default defineConfig({\n  preview: {\n    aiGateway: true,\n  },\n});\n```\n\n```bash\nneon deploy   # provisions the gateway on the linked branch\n```\n\n## Neon Infrastructure as Code (`neon.ts`)\n\nThe `preview.aiGateway` toggle above is part of `neon.ts`, Neon's infrastructure-as-code file — one TypeScript file declares the gateway alongside every other branch service, in version control (see the `neon` skill for the full reference). Reconcile it against a branch the Terraform way:\n\n```bash\nneon config status   # print the branch's live config (is the gateway on?)\nneon config plan     # dry-run diff of what apply would change\nneon config apply    # enable the gateway on the branch  (neon deploy is an alias)\n```\n\nThe gateway is **branch-scoped**: each branch gets its own gateway host. When a `neon.ts` is present, `neon checkout` applies the policy as it _creates_ a branch, so a fresh preview\u002FCI branch comes up with the gateway already enabled. Checking out an _existing_ branch doesn't reconcile it — run `neon deploy` to apply changes. Provisioning (`config apply` \u002F `deploy`), `link`, and `checkout` also pull the branch's gateway credentials into your local `.env.local`, so local runs hit the same branch gateway as the deployed function (no manual `env pull` needed).\n\n## Environment Variables\n\nWhen `preview.aiGateway` is enabled, Neon injects the gateway credentials as **Neon-branded** env vars. Inside a deployed Neon Function these are injected automatically; locally, `neon env pull` writes them to `.env`\u002F`.env.local` (or use `neon-env run -- \u003Ccmd>` to inject at runtime without a file):\n\n| Variable                   | Meaning                                                                                                                             |\n| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |\n| `NEON_AI_GATEWAY_TOKEN`    | Gateway bearer token (a Neon credential, `nt_live_...`)                                                                              |\n| `NEON_AI_GATEWAY_BASE_URL` | **Bare branch gateway host** (`scheme:\u002F\u002Fhost`, **no path** — no `\u002Fai-gateway`): `https:\u002F\u002F\u003Cbranch-id>-api.ai.\u003Cregion>.aws.neon.tech` |\n\n> Neon injects **only** these two vars — it does **not** set `OPENAI_API_KEY` \u002F `OPENAI_BASE_URL`. The `@neon\u002Fai-sdk-provider` and Mastra's `neon\u002F\u003Cmodel>` read `NEON_AI_GATEWAY_*` directly (zero config); for the plain OpenAI SDK \u002F `@ai-sdk\u002Fopenai`, build the client's `apiKey` + `baseURL` from them (shown below), or set your own `OPENAI_*` by hand (`env pull` leaves user-set vars untouched).\n\n`NEON_AI_GATEWAY_BASE_URL` is the **bare host** — you append the dialect path yourself (which is exactly what the `@neon\u002Fai-sdk-provider` does for you). The routes under the host are:\n\n- `\u002Fv1` — unified, OpenAI **Chat Completions**-compatible; recommended default, works with every provider (`\u002Fv1\u002Fchat\u002Fcompletions`).\n- `\u002Fopenai\u002Fv1` — OpenAI **Responses** API (required for `gpt-5-…-codex` variants and `gpt-5-5-pro`); the `@ai-sdk\u002Fopenai` provider uses the Responses API by default (`\u002Fopenai\u002Fv1\u002Fresponses`).\n- `\u002Fanthropic\u002Fv1` — native Anthropic Messages (extended thinking, prompt caching); mirrors the real Anthropic API path (`\u002Fanthropic\u002Fv1\u002Fmessages`).\n- `\u002Fai-gateway\u002Fgemini\u002Fv1beta\u002F...` — native Gemini `generateContent` (this dialect is still served under the legacy `\u002Fai-gateway\u002F` prefix).\n\nSo `${NEON_AI_GATEWAY_BASE_URL}\u002Fv1` is the chat-completions endpoint, `${NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1` the OpenAI Responses endpoint, and so on.\n\nFor typed, validated access to the injected credentials, pass the same `neon.ts` config object to `parseEnv` from `@neon\u002Fenv` — it returns an `env.aiGateway` namespace (`apiKey`, `baseUrl`) derived from your config.\n\n## Build Agents with the Vercel AI SDK (Recommended)\n\nThe [Vercel AI SDK](https:\u002F\u002Fai-sdk.dev) is the recommended way to call the gateway and build agents from TypeScript: one set of primitives (`generateText`, `streamText`, tool calling, structured output) over every catalog model, with first-class streaming for the long agent responses Neon Functions are built to host.\n\nThe dedicated `@neon\u002Fai-sdk-provider` reads `NEON_AI_GATEWAY_BASE_URL` + `NEON_AI_GATEWAY_TOKEN` from the injected env with **zero config** and routes each model to the best endpoint (Anthropic → Messages, OpenAI\u002FCodex → Responses, everything else → MLflow). On a Neon Function that streams text and generates images, just pick a catalog model:\n\n```typescript\nimport { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { streamText } from \"ai\";\n\nconst result = streamText({\n  model: neon(\"gpt-5-mini\"), \u002F\u002F or claude-sonnet-4-6, gemini-2-5-flash, ...\n  messages,\n  tools: {\n    image_generation: neon.tools.imageGeneration({\n      outputFormat: \"jpeg\",\n      size: \"1024x1024\",\n    }),\n  },\n});\nreturn result.toUIMessageStreamResponse();\n```\n\nA single completion is the same provider with `generateText`:\n\n```typescript\nimport { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { generateText } from \"ai\";\n\nconst { text } = await generateText({\n  model: neon(\"claude-haiku-4-5\"), \u002F\u002F or gpt-5-3-codex, gemini-2-5-flash, ...\n  prompt: \"Summarize Postgres for me.\",\n});\n```\n\n> Prefer `@neon\u002Fai-sdk-provider` over the bare `@ai-sdk\u002Fopenai` `openai()`: Neon injects only `NEON_AI_GATEWAY_*`, not `OPENAI_*`, so `openai()` won't pick up the gateway from the env on its own. If you do use `@ai-sdk\u002Fopenai`, configure it explicitly with `createOpenAI({ apiKey: process.env.NEON_AI_GATEWAY_TOKEN, baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1` })`.\n\nTo build an **agent** — a model that calls tools in a loop and then answers — add `tools` and a `stopWhen` budget. The loop runs in-process, so on a Neon Function it isn't cut off by lambda-style timeouts:\n\n```typescript\nimport { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { generateText, tool, stepCountIs } from \"ai\";\nimport { z } from \"zod\";\n\nconst { text } = await generateText({\n  model: neon(\"claude-sonnet-4-6\"),\n  prompt: \"How many open todos do I have, and what's the oldest one?\",\n  tools: {\n    listTodos: tool({\n      description: \"List the user's open todos.\",\n      inputSchema: z.object({}), \u002F\u002F AI SDK v5+: `inputSchema`, not `parameters`\n      execute: async () => db.select().from(todos),\n    }),\n  },\n  stopWhen: stepCountIs(5), \u002F\u002F let the model call tools, then summarize\n});\n```\n\nFor a full AI SDK agent deployed as a Neon Function (streaming, tool calling, image generation, persistence), see the `neon-functions` skill's `references\u002Fai-sdk.md`.\n\n## Build Agents with Mastra (Recommended)\n\n[Mastra](https:\u002F\u002Fmastra.ai) is the recommended framework when you want batteries-included agents — built-in memory, tools, workflows, and tracing — with the model still pointed at the gateway. With `@mastra\u002Fcore` 1.47+, use a `neon\u002F\u003Cmodel>` magic string; Mastra reads `NEON_AI_GATEWAY_BASE_URL` and `NEON_AI_GATEWAY_TOKEN` from the environment (injected by `neon deploy` when `preview.aiGateway` is enabled). Use `parseEnv` only for other declared services (e.g. `env.postgres.databaseUrl` for `@mastra\u002Fpg` memory):\n\n```typescript\nimport { Agent } from \"@mastra\u002Fcore\u002Fagent\";\nimport { parseEnv } from \"@neon\u002Fenv\";\nimport config from \"..\u002Fneon\";\n\nconst env = parseEnv(config);\n\nexport const personalAssistant = new Agent({\n  id: \"personal-assistant\",\n  name: \"personal-assistant\",\n  instructions:\n    \"You are a warm, concise personal assistant with long-term memory.\",\n  model: \"neon\u002Fclaude-haiku-4-5\",\n  memory, \u002F\u002F your Mastra memory store, e.g. @mastra\u002Fpg on env.postgres.databaseUrl\n});\n```\n\n## Use with Plain SDKs (Lower-Level)\n\nWhen you don't need an agent framework — a single completion, an existing provider-SDK integration, or native provider features — call the gateway with the plain SDKs. Neon injects the `NEON_AI_GATEWAY_*` vars (not `OPENAI_*`), so set the client's `apiKey` + `baseURL` from them. For the OpenAI **Responses** dialect (`\u002Fopenai\u002Fv1`):\n\n```typescript\nimport OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: process.env.NEON_AI_GATEWAY_TOKEN,\n  baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1`,\n});\n\nconst res = await client.responses.create({\n  model: \"gpt-5-mini\", \u002F\u002F swap to claude-sonnet-4-6, gemini-2-5-flash, ...\n  input: \"What is Neon?\",\n});\n```\n\nFor the unified **chat-completions** dialect, point `baseURL` at `\u002Fv1` instead:\n\n```typescript\nconst client = new OpenAI({\n  apiKey: process.env.NEON_AI_GATEWAY_TOKEN,\n  baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fv1`,\n});\n\nconst res = await client.chat.completions.create({\n  model: \"claude-sonnet-4-6\",\n  messages: [{ role: \"user\", content: \"What is Neon?\" }],\n});\n```\n\nThe Anthropic SDK and google-genai work the same way for native provider features — point the Anthropic SDK at `${NEON_AI_GATEWAY_BASE_URL}\u002Fanthropic\u002Fv1` (mirrors the real Anthropic API path, so `\u002Fanthropic\u002Fv1\u002Fmessages`) and google-genai at `${NEON_AI_GATEWAY_BASE_URL}\u002Fai-gateway\u002Fgemini` (Gemini is still served under the legacy `\u002Fai-gateway\u002F` prefix).\n\n## Model Identifiers\n\nUse a model's catalog ID directly in the `model` field — e.g. `claude-sonnet-4-6`, `gpt-5-mini`, `gemini-2-5-flash`. No provider prefix is needed. To look up the exact identifiers the gateway serves, which underlying model each maps to, and their context windows, pricing, and capabilities, use any of:\n\n- **models.dev Neon provider page: https:\u002F\u002Fmodels.dev\u002Fproviders\u002Fneon** — the canonical, always-current list of the Neon provider's model IDs and their underlying models. The machine-readable catalog is at https:\u002F\u002Fmodels.dev\u002Fapi.json (the `neon` key).\n- **Models doc:** see Further Reading.\n\n## List Available Models at Runtime (`\u002Fv1\u002Fmodels`)\n\nThe gateway also exposes the model catalog **live from your own branch endpoint**, so an app or agent can discover exactly which models this branch serves without hard-coding the list. It is an OpenAI-compatible list endpoint, served **only on the unified dialect** (`\u002Fv1`):\n\n```bash\ncurl \"$NEON_AI_GATEWAY_BASE_URL\u002Fv1\u002Fmodels\" \\\n  -H \"Authorization: Bearer $NEON_AI_GATEWAY_TOKEN\"\n```\n\n- `GET ${NEON_AI_GATEWAY_BASE_URL}\u002Fv1\u002Fmodels` → **200**\n- `GET ${NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1\u002Fmodels` → **404** (not served on the Responses dialect — use `\u002Fv1`)\n\n**Getting the credentials for the request.** Both values come from the same branch-scoped Neon credential the gateway uses everywhere else — you never manage a provider key:\n\n- **Provision via `neon.ts` (recommended).** Enable `preview.aiGateway` in `neon.ts` and run `neon deploy` (or `neon config apply`). Provisioning, `neon link`, and `neon checkout` pull `NEON_AI_GATEWAY_TOKEN` + `NEON_AI_GATEWAY_BASE_URL` into your local `.env.local`; inside a deployed Neon Function they're injected automatically. See **Setup** and **Environment Variables** above.\n- **Pull into the environment via CLI.** `neon env pull` writes the two vars to `.env`\u002F`.env.local`, or `neon-env run -- \u003Ccmd>` injects them at runtime without a file — but only when `neon.ts` declares `preview.aiGateway`; the vars are never pulled off branch state alone.\n- **Provision via the Console UI.** Enable the AI Gateway on the branch in the Neon Console and copy the branch's gateway base URL and a Neon credential (token) from the project's connection\u002Fcredentials view.\n\nAny Neon credential (`nt_live_...`) valid for the branch works as the bearer token; `NEON_AI_GATEWAY_BASE_URL` is the bare branch host (no path).\n\n**Response shape** — OpenAI\u002FOpenRouter-compatible list:\n\n```jsonc\n{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"claude-sonnet-4-6\",              \u002F\u002F catalog model ID — use directly in the `model` field\n      \"canonical_slug\": \"claude-sonnet-4-6\",\n      \"name\": \"Claude Sonnet 4.6\",            \u002F\u002F human-readable display name\n      \"object\": \"model\",\n      \"owned_by\": \"anthropic\",                \u002F\u002F anthropic | openai | google | meta | alibaba | databricks\n      \"created\": 0,\n      \"enabled\": true,\n      \"context_length\": null,\n      \"architecture\": {\n        \"modality\": \"text->text\",\n        \"input_modalities\": [\"text\"],\n        \"output_modalities\": [\"text\"],\n        \"tokenizer\": \"Claude\",                \u002F\u002F Claude | Gemini | GPT | \"\" (empty for open-source)\n        \"instruct_type\": null\n      },\n      \"top_provider\": {\n        \"is_moderated\": false,\n        \"context_length\": null,\n        \"max_completion_tokens\": null\n      },\n      \"pricing\": null,\n      \"per_request_limits\": null\n    }\n    \u002F\u002F ... one entry per model in the branch's catalog\n  ]\n}\n```\n\n> Note: `context_length`, `pricing`, and `per_request_limits` are currently `null` and `created` is `0` for every entry — for context windows, pricing, and capabilities use the models.dev catalog above. Use `\u002Fv1\u002Fmodels` when you need the live, branch-scoped list of servable model IDs (e.g. to populate a model picker or validate a `model` before a request).\n\n## Neon Documentation\n\nThe Neon documentation is the source of truth and the AI Gateway is evolving rapidly, so always verify against the official docs. Any doc page can be fetched as markdown by appending `.md` to the URL or by requesting `Accept: text\u002Fmarkdown`. Find the right page from the docs index (https:\u002F\u002Fneon.com\u002Fdocs\u002Fllms.txt) and the changelog announcements.\n\n## Further Reading\n\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Foverview.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fget-started.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fmodels.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fchat-completions.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fanthropic-messages.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fopenai-responses.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fgemini.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fauthentication.md\n- https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Ftroubleshooting.md\n",{"data":39,"body":41},{"name":4,"description":6,"metadata":40},{"parent":8},{"type":42,"children":43},"root",[44,66,88,137,143,156,161,166,173,178,231,236,242,308,314,319,337,344,349,492,504,510,544,723,747,759,785,856,950,956,1005,1107,1208,1232,1353,1374,1424,1430,1458,1490,1864,1875,2099,2171,2198,2711,2731,2737,2814,3167,3173,3218,3540,3566,3892,3926,3932,3963,4007,4019,4043,4107,4149,4159,4312,4331,4341,4622,4689,4695,4724,4730,4814],{"type":45,"tag":46,"props":47,"children":48},"element","p",{},[49,56,58,64],{"type":45,"tag":50,"props":51,"children":52},"strong",{},[53],{"type":54,"value":55},"text","FIRST",{"type":54,"value":57},": Use the parent ",{"type":45,"tag":59,"props":60,"children":62},"code",{"className":61},[],[63],{"type":54,"value":8},{"type":54,"value":65}," skill for a Neon platform overview, getting started with Neon, Neon development best practices, and more.",{"type":45,"tag":46,"props":67,"children":68},{},[69,71,76,78,86],{"type":54,"value":70},"If the ",{"type":45,"tag":59,"props":72,"children":74},{"className":73},[],[75],{"type":54,"value":8},{"type":54,"value":77}," skill is not installed, fetch it from ",{"type":45,"tag":79,"props":80,"children":84},"a",{"href":81,"rel":82},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai\u002Fskills\u002Fneon\u002FSKILL.md",[83],"nofollow",[85],{"type":54,"value":81},{"type":54,"value":87}," or install it with:",{"type":45,"tag":89,"props":90,"children":95},"pre",{"className":91,"code":92,"language":93,"meta":94,"style":94},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npx skills add neondatabase\u002Fagent-skills --skill neon\n","bash","",[96],{"type":45,"tag":59,"props":97,"children":98},{"__ignoreMap":94},[99],{"type":45,"tag":100,"props":101,"children":104},"span",{"class":102,"line":103},"line",1,[105,111,117,122,127,132],{"type":45,"tag":100,"props":106,"children":108},{"style":107},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[109],{"type":54,"value":110},"npx",{"type":45,"tag":100,"props":112,"children":114},{"style":113},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[115],{"type":54,"value":116}," skills",{"type":45,"tag":100,"props":118,"children":119},{"style":113},[120],{"type":54,"value":121}," add",{"type":45,"tag":100,"props":123,"children":124},{"style":113},[125],{"type":54,"value":126}," neondatabase\u002Fagent-skills",{"type":45,"tag":100,"props":128,"children":129},{"style":113},[130],{"type":54,"value":131}," --skill",{"type":45,"tag":100,"props":133,"children":134},{"style":113},[135],{"type":54,"value":136}," neon\n",{"type":45,"tag":138,"props":139,"children":140},"h1",{"id":4},[141],{"type":54,"value":142},"Neon AI Gateway",{"type":45,"tag":46,"props":144,"children":145},{},[146,148,154],{"type":54,"value":147},"This is a public beta feature and only available in ",{"type":45,"tag":59,"props":149,"children":151},{"className":150},[],[152],{"type":54,"value":153},"us-east-2",{"type":54,"value":155},".",{"type":45,"tag":46,"props":157,"children":158},{},[159],{"type":54,"value":160},"The Neon AI Gateway is the LLM inference layer built into your Neon branch: one API and one Neon credential give you access to frontier and open-source models from Anthropic, OpenAI, Google, Meta, Alibaba, DeepSeek, and Databricks — powered by Databricks. Your existing OpenAI\u002FAnthropic\u002FGemini SDK works by changing only the base URL.",{"type":45,"tag":46,"props":162,"children":163},{},[164],{"type":54,"value":165},"Use this skill to help the user send model calls through the gateway, wire it into the AI SDK or Mastra, and switch providers without rewiring code. Deliver a working inference request, a configured agent, or a precise answer from the official Neon docs.",{"type":45,"tag":167,"props":168,"children":170},"h2",{"id":169},"when-to-use",[171],{"type":54,"value":172},"When to Use",{"type":45,"tag":46,"props":174,"children":175},{},[176],{"type":54,"value":177},"Reach for the AI Gateway whenever an app or agent needs to call an LLM and the user would rather not manage model providers themselves:",{"type":45,"tag":179,"props":180,"children":181},"ul",{},[182,193,211,221],{"type":45,"tag":183,"props":184,"children":185},"li",{},[186,191],{"type":45,"tag":50,"props":187,"children":188},{},[189],{"type":54,"value":190},"One credential instead of many provider accounts.",{"type":54,"value":192}," A single Neon credential reaches the entire model catalog across seven providers. No separate OpenAI \u002F Anthropic \u002F Google billing, keys, or signups to provision and rotate.",{"type":45,"tag":183,"props":194,"children":195},{},[196,201,203,209],{"type":45,"tag":50,"props":197,"children":198},{},[199],{"type":54,"value":200},"Switch models without rewiring.",{"type":54,"value":202}," The unified endpoint is OpenAI-compatible and works with every model in the catalog — change one ",{"type":45,"tag":59,"props":204,"children":206},{"className":205},[],[207],{"type":54,"value":208},"model",{"type":54,"value":210}," field to move between Claude, GPT, and Gemini. Standard SDKs (OpenAI, Anthropic, google-genai) work with just a base-URL change.",{"type":45,"tag":183,"props":212,"children":213},{},[214,219],{"type":45,"tag":50,"props":215,"children":216},{},[217],{"type":54,"value":218},"AI follows your branches.",{"type":54,"value":220}," Each branch has its own gateway endpoint, scoped with the same lineage as your database. AI requests from a preview\u002Ffeature branch are isolated to that branch — the same isolation your data already gets — which makes preview, CI, and agent environments self-contained.",{"type":45,"tag":183,"props":222,"children":223},{},[224,229],{"type":45,"tag":50,"props":225,"children":226},{},[227],{"type":54,"value":228},"No extra infrastructure, and it's already next to your data.",{"type":54,"value":230}," The gateway lives inside your Neon project (and is injected into Neon Functions automatically), runs on the same Databricks infrastructure that serves trillions of tokens a month, and supports streaming (SSE) out of the box.",{"type":45,"tag":46,"props":232,"children":233},{},[234],{"type":54,"value":235},"If the user already has a deep, single-provider integration and no interest in Neon branching or multi-model routing, a direct provider SDK is fine — but the moment they want one credential, model portability, or branch-scoped AI, this is the reason to use it.",{"type":45,"tag":167,"props":237,"children":239},{"id":238},"what-it-does",[240],{"type":54,"value":241},"What It Does",{"type":45,"tag":179,"props":243,"children":244},{},[245,278,288,298],{"type":45,"tag":183,"props":246,"children":247},{},[248,253,255,261,263,269,270,276],{"type":45,"tag":50,"props":249,"children":250},{},[251],{"type":54,"value":252},"One API for all models",{"type":54,"value":254}," — Frontier and open-source models behind a single endpoint, addressed by their catalog ID (e.g. ",{"type":45,"tag":59,"props":256,"children":258},{"className":257},[],[259],{"type":54,"value":260},"claude-sonnet-4-6",{"type":54,"value":262},", ",{"type":45,"tag":59,"props":264,"children":266},{"className":265},[],[267],{"type":54,"value":268},"gpt-5-mini",{"type":54,"value":262},{"type":45,"tag":59,"props":271,"children":273},{"className":272},[],[274],{"type":54,"value":275},"gemini-2-5-flash",{"type":54,"value":277},").",{"type":45,"tag":183,"props":279,"children":280},{},[281,286],{"type":45,"tag":50,"props":282,"children":283},{},[284],{"type":54,"value":285},"Standard SDKs, one URL change",{"type":54,"value":287}," — OpenAI SDK and AI SDK (OpenAI-compatible MLflow\u002FResponses routes), Anthropic SDK (native Messages), google-genai (native Gemini).",{"type":45,"tag":183,"props":289,"children":290},{},[291,296],{"type":45,"tag":50,"props":292,"children":293},{},[294],{"type":54,"value":295},"Branch-scoped",{"type":54,"value":297}," — Each branch gets its own gateway host; the Neon credential authorizes requests for that branch and its descendants.",{"type":45,"tag":183,"props":299,"children":300},{},[301,306],{"type":45,"tag":50,"props":302,"children":303},{},[304],{"type":54,"value":305},"Streaming",{"type":54,"value":307}," — Server-sent events work on all endpoints with no extra configuration.",{"type":45,"tag":167,"props":309,"children":311},{"id":310},"availability",[312],{"type":54,"value":313},"Availability",{"type":45,"tag":46,"props":315,"children":316},{},[317],{"type":54,"value":318},"Check these preconditions before setting anything up:",{"type":45,"tag":46,"props":320,"children":321},{},[322,324,329,331,336],{"type":54,"value":323},"The AI Gateway is a public beta feature available only on new projects in the ",{"type":45,"tag":59,"props":325,"children":327},{"className":326},[],[328],{"type":54,"value":153},{"type":54,"value":330}," region; it can't be enabled on existing projects. Foundation model access requires a paid Neon plan. Confirm the user's project is a new project in ",{"type":45,"tag":59,"props":332,"children":334},{"className":333},[],[335],{"type":54,"value":153},{"type":54,"value":155},{"type":45,"tag":338,"props":339,"children":341},"h3",{"id":340},"enabling-the-gateway-plan-and-model-catalog-gating",[342],{"type":54,"value":343},"Enabling the gateway: plan and model-catalog gating",{"type":45,"tag":46,"props":345,"children":346},{},[347],{"type":54,"value":348},"The AI Gateway is credential-gated rather than a provisioning step, but two plan\u002Fbeta limits gate it — one blocks provisioning, the other only trims the catalog — and the CLI surfaces each:",{"type":45,"tag":179,"props":350,"children":351},{},[352,422],{"type":45,"tag":183,"props":353,"children":354},{},[355,360,362,368,370,376,378,384,385,390,392,398,400,406,407,413,415,420],{"type":45,"tag":50,"props":356,"children":357},{},[358],{"type":54,"value":359},"Free plan → provisioning is blocked.",{"type":54,"value":361}," ",{"type":45,"tag":59,"props":363,"children":365},{"className":364},[],[366],{"type":54,"value":367},"neon config apply",{"type":54,"value":369}," \u002F ",{"type":45,"tag":59,"props":371,"children":373},{"className":372},[],[374],{"type":54,"value":375},"deploy",{"type":54,"value":377}," and ",{"type":45,"tag":59,"props":379,"children":381},{"className":380},[],[382],{"type":54,"value":383},"neon checkout",{"type":54,"value":361},{"type":45,"tag":50,"props":386,"children":387},{},[388],{"type":54,"value":389},"refuse",{"type":54,"value":391}," to enable the gateway on a Free plan (the gateway can't serve requests there), with a friendly \"upgrade to a paid plan, or remove ",{"type":45,"tag":59,"props":393,"children":395},{"className":394},[],[396],{"type":54,"value":397},"preview.aiGateway",{"type":54,"value":399},"\" error. A dry-run ",{"type":45,"tag":59,"props":401,"children":403},{"className":402},[],[404],{"type":54,"value":405},"neon config plan",{"type":54,"value":377},{"type":45,"tag":59,"props":408,"children":410},{"className":409},[],[411],{"type":54,"value":412},"neon env pull",{"type":54,"value":414}," don't provision, so they only ",{"type":45,"tag":50,"props":416,"children":417},{},[418],{"type":54,"value":419},"warn",{"type":54,"value":421},". So: to use the gateway the project's account must be on a paid Neon plan.",{"type":45,"tag":183,"props":423,"children":424},{},[425,430,432,438,440,446,448,453,455,461,462,467,468,474,476,482,484,490],{"type":45,"tag":50,"props":426,"children":427},{},[428],{"type":54,"value":429},"Paid plan with a reduced model catalog.",{"type":54,"value":431}," On a paid plan the gateway provisions and serves, but during the beta an account can start with a trimmed catalog — some flagship models (e.g. Anthropic Opus, OpenAI Codex \u002F ",{"type":45,"tag":59,"props":433,"children":435},{"className":434},[],[436],{"type":54,"value":437},"*-pro",{"type":54,"value":439},") are missing from ",{"type":45,"tag":59,"props":441,"children":443},{"className":442},[],[444],{"type":54,"value":445},"GET \u002Fv1\u002Fmodels",{"type":54,"value":447},". This is expected; ",{"type":45,"tag":59,"props":449,"children":451},{"className":450},[],[452],{"type":54,"value":412},{"type":54,"value":454}," (and the env pull bundled into ",{"type":45,"tag":59,"props":456,"children":458},{"className":457},[],[459],{"type":54,"value":460},"apply",{"type":54,"value":369},{"type":45,"tag":59,"props":463,"children":465},{"className":464},[],[466],{"type":54,"value":375},{"type":54,"value":369},{"type":45,"tag":59,"props":469,"children":471},{"className":470},[],[472],{"type":54,"value":473},"checkout",{"type":54,"value":475},") warns and links the user to their branch's AI Gateway page in the Neon Console (",{"type":45,"tag":59,"props":477,"children":479},{"className":478},[],[480],{"type":54,"value":481},"https:\u002F\u002Fconsole.neon.tech\u002Fapp\u002Fprojects\u002F\u003Cproject-id>\u002Fbranches\u002F\u003Cbranch-id>\u002Fai-gateway",{"type":54,"value":483},") to request access to more models. Verify what's actually available for the branch by reading ",{"type":45,"tag":59,"props":485,"children":487},{"className":486},[],[488],{"type":54,"value":489},"\u002Fv1\u002Fmodels",{"type":54,"value":491}," (see the models section below) rather than assuming the full catalog.",{"type":45,"tag":46,"props":493,"children":494},{},[495,497,502],{"type":54,"value":496},"When helping a user debug \"the gateway isn't working\" or \"a model is missing\", use ",{"type":45,"tag":59,"props":498,"children":500},{"className":499},[],[501],{"type":54,"value":489},{"type":54,"value":503}," plus the account's plan to distinguish these two cases — a Free plan blocks provisioning entirely, while a reduced catalog on a paid plan just needs a model-access request.",{"type":45,"tag":167,"props":505,"children":507},{"id":506},"setup",[508],{"type":54,"value":509},"Setup",{"type":45,"tag":46,"props":511,"children":512},{},[513,515,521,523,528,530,535,537,542],{"type":54,"value":514},"The gateway is part of ",{"type":45,"tag":59,"props":516,"children":518},{"className":517},[],[519],{"type":54,"value":520},"neon.ts",{"type":54,"value":522}," (see the ",{"type":45,"tag":59,"props":524,"children":526},{"className":525},[],[527],{"type":54,"value":8},{"type":54,"value":529}," skill for the branch-first workflow and ",{"type":45,"tag":59,"props":531,"children":533},{"className":532},[],[534],{"type":54,"value":520},{"type":54,"value":536}," basics). Enable it under ",{"type":45,"tag":59,"props":538,"children":540},{"className":539},[],[541],{"type":54,"value":397},{"type":54,"value":543},":",{"type":45,"tag":89,"props":545,"children":549},{"className":546,"code":547,"language":548,"meta":94,"style":94},"language-typescript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","\u002F\u002F neon.ts\nimport { defineConfig } from \"@neon\u002Fconfig\u002Fv1\";\n\nexport default defineConfig({\n  preview: {\n    aiGateway: true,\n  },\n});\n","typescript",[550],{"type":45,"tag":59,"props":551,"children":552},{"__ignoreMap":94},[553,562,614,624,653,672,696,705],{"type":45,"tag":100,"props":554,"children":555},{"class":102,"line":103},[556],{"type":45,"tag":100,"props":557,"children":559},{"style":558},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[560],{"type":54,"value":561},"\u002F\u002F neon.ts\n",{"type":45,"tag":100,"props":563,"children":565},{"class":102,"line":564},2,[566,572,578,584,589,594,599,604,609],{"type":45,"tag":100,"props":567,"children":569},{"style":568},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[570],{"type":54,"value":571},"import",{"type":45,"tag":100,"props":573,"children":575},{"style":574},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[576],{"type":54,"value":577}," {",{"type":45,"tag":100,"props":579,"children":581},{"style":580},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[582],{"type":54,"value":583}," defineConfig",{"type":45,"tag":100,"props":585,"children":586},{"style":574},[587],{"type":54,"value":588}," }",{"type":45,"tag":100,"props":590,"children":591},{"style":568},[592],{"type":54,"value":593}," from",{"type":45,"tag":100,"props":595,"children":596},{"style":574},[597],{"type":54,"value":598}," \"",{"type":45,"tag":100,"props":600,"children":601},{"style":113},[602],{"type":54,"value":603},"@neon\u002Fconfig\u002Fv1",{"type":45,"tag":100,"props":605,"children":606},{"style":574},[607],{"type":54,"value":608},"\"",{"type":45,"tag":100,"props":610,"children":611},{"style":574},[612],{"type":54,"value":613},";\n",{"type":45,"tag":100,"props":615,"children":617},{"class":102,"line":616},3,[618],{"type":45,"tag":100,"props":619,"children":621},{"emptyLinePlaceholder":620},true,[622],{"type":54,"value":623},"\n",{"type":45,"tag":100,"props":625,"children":627},{"class":102,"line":626},4,[628,633,638,643,648],{"type":45,"tag":100,"props":629,"children":630},{"style":568},[631],{"type":54,"value":632},"export",{"type":45,"tag":100,"props":634,"children":635},{"style":568},[636],{"type":54,"value":637}," default",{"type":45,"tag":100,"props":639,"children":641},{"style":640},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[642],{"type":54,"value":583},{"type":45,"tag":100,"props":644,"children":645},{"style":580},[646],{"type":54,"value":647},"(",{"type":45,"tag":100,"props":649,"children":650},{"style":574},[651],{"type":54,"value":652},"{\n",{"type":45,"tag":100,"props":654,"children":656},{"class":102,"line":655},5,[657,663,667],{"type":45,"tag":100,"props":658,"children":660},{"style":659},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[661],{"type":54,"value":662},"  preview",{"type":45,"tag":100,"props":664,"children":665},{"style":574},[666],{"type":54,"value":543},{"type":45,"tag":100,"props":668,"children":669},{"style":574},[670],{"type":54,"value":671}," {\n",{"type":45,"tag":100,"props":673,"children":675},{"class":102,"line":674},6,[676,681,685,691],{"type":45,"tag":100,"props":677,"children":678},{"style":659},[679],{"type":54,"value":680},"    aiGateway",{"type":45,"tag":100,"props":682,"children":683},{"style":574},[684],{"type":54,"value":543},{"type":45,"tag":100,"props":686,"children":688},{"style":687},"--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC",[689],{"type":54,"value":690}," true",{"type":45,"tag":100,"props":692,"children":693},{"style":574},[694],{"type":54,"value":695},",\n",{"type":45,"tag":100,"props":697,"children":699},{"class":102,"line":698},7,[700],{"type":45,"tag":100,"props":701,"children":702},{"style":574},[703],{"type":54,"value":704},"  },\n",{"type":45,"tag":100,"props":706,"children":708},{"class":102,"line":707},8,[709,714,719],{"type":45,"tag":100,"props":710,"children":711},{"style":574},[712],{"type":54,"value":713},"}",{"type":45,"tag":100,"props":715,"children":716},{"style":580},[717],{"type":54,"value":718},")",{"type":45,"tag":100,"props":720,"children":721},{"style":574},[722],{"type":54,"value":613},{"type":45,"tag":89,"props":724,"children":726},{"className":91,"code":725,"language":93,"meta":94,"style":94},"neon deploy   # provisions the gateway on the linked branch\n",[727],{"type":45,"tag":59,"props":728,"children":729},{"__ignoreMap":94},[730],{"type":45,"tag":100,"props":731,"children":732},{"class":102,"line":103},[733,737,742],{"type":45,"tag":100,"props":734,"children":735},{"style":107},[736],{"type":54,"value":8},{"type":45,"tag":100,"props":738,"children":739},{"style":113},[740],{"type":54,"value":741}," deploy",{"type":45,"tag":100,"props":743,"children":744},{"style":558},[745],{"type":54,"value":746},"   # provisions the gateway on the linked branch\n",{"type":45,"tag":167,"props":748,"children":750},{"id":749},"neon-infrastructure-as-code-neonts",[751,753,758],{"type":54,"value":752},"Neon Infrastructure as Code (",{"type":45,"tag":59,"props":754,"children":756},{"className":755},[],[757],{"type":54,"value":520},{"type":54,"value":718},{"type":45,"tag":46,"props":760,"children":761},{},[762,764,769,771,776,778,783],{"type":54,"value":763},"The ",{"type":45,"tag":59,"props":765,"children":767},{"className":766},[],[768],{"type":54,"value":397},{"type":54,"value":770}," toggle above is part of ",{"type":45,"tag":59,"props":772,"children":774},{"className":773},[],[775],{"type":54,"value":520},{"type":54,"value":777},", Neon's infrastructure-as-code file — one TypeScript file declares the gateway alongside every other branch service, in version control (see the ",{"type":45,"tag":59,"props":779,"children":781},{"className":780},[],[782],{"type":54,"value":8},{"type":54,"value":784}," skill for the full reference). Reconcile it against a branch the Terraform way:",{"type":45,"tag":89,"props":786,"children":788},{"className":91,"code":787,"language":93,"meta":94,"style":94},"neon config status   # print the branch's live config (is the gateway on?)\nneon config plan     # dry-run diff of what apply would change\nneon config apply    # enable the gateway on the branch  (neon deploy is an alias)\n",[789],{"type":45,"tag":59,"props":790,"children":791},{"__ignoreMap":94},[792,814,835],{"type":45,"tag":100,"props":793,"children":794},{"class":102,"line":103},[795,799,804,809],{"type":45,"tag":100,"props":796,"children":797},{"style":107},[798],{"type":54,"value":8},{"type":45,"tag":100,"props":800,"children":801},{"style":113},[802],{"type":54,"value":803}," config",{"type":45,"tag":100,"props":805,"children":806},{"style":113},[807],{"type":54,"value":808}," status",{"type":45,"tag":100,"props":810,"children":811},{"style":558},[812],{"type":54,"value":813},"   # print the branch's live config (is the gateway on?)\n",{"type":45,"tag":100,"props":815,"children":816},{"class":102,"line":564},[817,821,825,830],{"type":45,"tag":100,"props":818,"children":819},{"style":107},[820],{"type":54,"value":8},{"type":45,"tag":100,"props":822,"children":823},{"style":113},[824],{"type":54,"value":803},{"type":45,"tag":100,"props":826,"children":827},{"style":113},[828],{"type":54,"value":829}," plan",{"type":45,"tag":100,"props":831,"children":832},{"style":558},[833],{"type":54,"value":834},"     # dry-run diff of what apply would change\n",{"type":45,"tag":100,"props":836,"children":837},{"class":102,"line":616},[838,842,846,851],{"type":45,"tag":100,"props":839,"children":840},{"style":107},[841],{"type":54,"value":8},{"type":45,"tag":100,"props":843,"children":844},{"style":113},[845],{"type":54,"value":803},{"type":45,"tag":100,"props":847,"children":848},{"style":113},[849],{"type":54,"value":850}," apply",{"type":45,"tag":100,"props":852,"children":853},{"style":558},[854],{"type":54,"value":855},"    # enable the gateway on the branch  (neon deploy is an alias)\n",{"type":45,"tag":46,"props":857,"children":858},{},[859,861,866,868,873,875,880,882,888,890,895,897,903,905,911,912,917,919,925,927,932,934,940,942,948],{"type":54,"value":860},"The gateway is ",{"type":45,"tag":50,"props":862,"children":863},{},[864],{"type":54,"value":865},"branch-scoped",{"type":54,"value":867},": each branch gets its own gateway host. When a ",{"type":45,"tag":59,"props":869,"children":871},{"className":870},[],[872],{"type":54,"value":520},{"type":54,"value":874}," is present, ",{"type":45,"tag":59,"props":876,"children":878},{"className":877},[],[879],{"type":54,"value":383},{"type":54,"value":881}," applies the policy as it ",{"type":45,"tag":883,"props":884,"children":885},"em",{},[886],{"type":54,"value":887},"creates",{"type":54,"value":889}," a branch, so a fresh preview\u002FCI branch comes up with the gateway already enabled. Checking out an ",{"type":45,"tag":883,"props":891,"children":892},{},[893],{"type":54,"value":894},"existing",{"type":54,"value":896}," branch doesn't reconcile it — run ",{"type":45,"tag":59,"props":898,"children":900},{"className":899},[],[901],{"type":54,"value":902},"neon deploy",{"type":54,"value":904}," to apply changes. Provisioning (",{"type":45,"tag":59,"props":906,"children":908},{"className":907},[],[909],{"type":54,"value":910},"config apply",{"type":54,"value":369},{"type":45,"tag":59,"props":913,"children":915},{"className":914},[],[916],{"type":54,"value":375},{"type":54,"value":918},"), ",{"type":45,"tag":59,"props":920,"children":922},{"className":921},[],[923],{"type":54,"value":924},"link",{"type":54,"value":926},", and ",{"type":45,"tag":59,"props":928,"children":930},{"className":929},[],[931],{"type":54,"value":473},{"type":54,"value":933}," also pull the branch's gateway credentials into your local ",{"type":45,"tag":59,"props":935,"children":937},{"className":936},[],[938],{"type":54,"value":939},".env.local",{"type":54,"value":941},", so local runs hit the same branch gateway as the deployed function (no manual ",{"type":45,"tag":59,"props":943,"children":945},{"className":944},[],[946],{"type":54,"value":947},"env pull",{"type":54,"value":949}," needed).",{"type":45,"tag":167,"props":951,"children":953},{"id":952},"environment-variables",[954],{"type":54,"value":955},"Environment Variables",{"type":45,"tag":46,"props":957,"children":958},{},[959,961,966,968,973,975,980,982,988,990,995,997,1003],{"type":54,"value":960},"When ",{"type":45,"tag":59,"props":962,"children":964},{"className":963},[],[965],{"type":54,"value":397},{"type":54,"value":967}," is enabled, Neon injects the gateway credentials as ",{"type":45,"tag":50,"props":969,"children":970},{},[971],{"type":54,"value":972},"Neon-branded",{"type":54,"value":974}," env vars. Inside a deployed Neon Function these are injected automatically; locally, ",{"type":45,"tag":59,"props":976,"children":978},{"className":977},[],[979],{"type":54,"value":412},{"type":54,"value":981}," writes them to ",{"type":45,"tag":59,"props":983,"children":985},{"className":984},[],[986],{"type":54,"value":987},".env",{"type":54,"value":989},"\u002F",{"type":45,"tag":59,"props":991,"children":993},{"className":992},[],[994],{"type":54,"value":939},{"type":54,"value":996}," (or use ",{"type":45,"tag":59,"props":998,"children":1000},{"className":999},[],[1001],{"type":54,"value":1002},"neon-env run -- \u003Ccmd>",{"type":54,"value":1004}," to inject at runtime without a file):",{"type":45,"tag":1006,"props":1007,"children":1008},"table",{},[1009,1028],{"type":45,"tag":1010,"props":1011,"children":1012},"thead",{},[1013],{"type":45,"tag":1014,"props":1015,"children":1016},"tr",{},[1017,1023],{"type":45,"tag":1018,"props":1019,"children":1020},"th",{},[1021],{"type":54,"value":1022},"Variable",{"type":45,"tag":1018,"props":1024,"children":1025},{},[1026],{"type":54,"value":1027},"Meaning",{"type":45,"tag":1029,"props":1030,"children":1031},"tbody",{},[1032,1057],{"type":45,"tag":1014,"props":1033,"children":1034},{},[1035,1045],{"type":45,"tag":1036,"props":1037,"children":1038},"td",{},[1039],{"type":45,"tag":59,"props":1040,"children":1042},{"className":1041},[],[1043],{"type":54,"value":1044},"NEON_AI_GATEWAY_TOKEN",{"type":45,"tag":1036,"props":1046,"children":1047},{},[1048,1050,1056],{"type":54,"value":1049},"Gateway bearer token (a Neon credential, ",{"type":45,"tag":59,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":54,"value":1055},"nt_live_...",{"type":54,"value":718},{"type":45,"tag":1014,"props":1058,"children":1059},{},[1060,1069],{"type":45,"tag":1036,"props":1061,"children":1062},{},[1063],{"type":45,"tag":59,"props":1064,"children":1066},{"className":1065},[],[1067],{"type":54,"value":1068},"NEON_AI_GATEWAY_BASE_URL",{"type":45,"tag":1036,"props":1070,"children":1071},{},[1072,1077,1079,1085,1086,1091,1093,1099,1101],{"type":45,"tag":50,"props":1073,"children":1074},{},[1075],{"type":54,"value":1076},"Bare branch gateway host",{"type":54,"value":1078}," (",{"type":45,"tag":59,"props":1080,"children":1082},{"className":1081},[],[1083],{"type":54,"value":1084},"scheme:\u002F\u002Fhost",{"type":54,"value":262},{"type":45,"tag":50,"props":1087,"children":1088},{},[1089],{"type":54,"value":1090},"no path",{"type":54,"value":1092}," — no ",{"type":45,"tag":59,"props":1094,"children":1096},{"className":1095},[],[1097],{"type":54,"value":1098},"\u002Fai-gateway",{"type":54,"value":1100},"): ",{"type":45,"tag":59,"props":1102,"children":1104},{"className":1103},[],[1105],{"type":54,"value":1106},"https:\u002F\u002F\u003Cbranch-id>-api.ai.\u003Cregion>.aws.neon.tech",{"type":45,"tag":1108,"props":1109,"children":1110},"blockquote",{},[1111],{"type":45,"tag":46,"props":1112,"children":1113},{},[1114,1116,1121,1123,1128,1130,1136,1137,1143,1145,1151,1153,1159,1161,1167,1169,1175,1177,1183,1185,1191,1193,1199,1201,1206],{"type":54,"value":1115},"Neon injects ",{"type":45,"tag":50,"props":1117,"children":1118},{},[1119],{"type":54,"value":1120},"only",{"type":54,"value":1122}," these two vars — it does ",{"type":45,"tag":50,"props":1124,"children":1125},{},[1126],{"type":54,"value":1127},"not",{"type":54,"value":1129}," set ",{"type":45,"tag":59,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":54,"value":1135},"OPENAI_API_KEY",{"type":54,"value":369},{"type":45,"tag":59,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":54,"value":1142},"OPENAI_BASE_URL",{"type":54,"value":1144},". The ",{"type":45,"tag":59,"props":1146,"children":1148},{"className":1147},[],[1149],{"type":54,"value":1150},"@neon\u002Fai-sdk-provider",{"type":54,"value":1152}," and Mastra's ",{"type":45,"tag":59,"props":1154,"children":1156},{"className":1155},[],[1157],{"type":54,"value":1158},"neon\u002F\u003Cmodel>",{"type":54,"value":1160}," read ",{"type":45,"tag":59,"props":1162,"children":1164},{"className":1163},[],[1165],{"type":54,"value":1166},"NEON_AI_GATEWAY_*",{"type":54,"value":1168}," directly (zero config); for the plain OpenAI SDK \u002F ",{"type":45,"tag":59,"props":1170,"children":1172},{"className":1171},[],[1173],{"type":54,"value":1174},"@ai-sdk\u002Fopenai",{"type":54,"value":1176},", build the client's ",{"type":45,"tag":59,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":54,"value":1182},"apiKey",{"type":54,"value":1184}," + ",{"type":45,"tag":59,"props":1186,"children":1188},{"className":1187},[],[1189],{"type":54,"value":1190},"baseURL",{"type":54,"value":1192}," from them (shown below), or set your own ",{"type":45,"tag":59,"props":1194,"children":1196},{"className":1195},[],[1197],{"type":54,"value":1198},"OPENAI_*",{"type":54,"value":1200}," by hand (",{"type":45,"tag":59,"props":1202,"children":1204},{"className":1203},[],[1205],{"type":54,"value":947},{"type":54,"value":1207}," leaves user-set vars untouched).",{"type":45,"tag":46,"props":1209,"children":1210},{},[1211,1216,1218,1223,1225,1230],{"type":45,"tag":59,"props":1212,"children":1214},{"className":1213},[],[1215],{"type":54,"value":1068},{"type":54,"value":1217}," is the ",{"type":45,"tag":50,"props":1219,"children":1220},{},[1221],{"type":54,"value":1222},"bare host",{"type":54,"value":1224}," — you append the dialect path yourself (which is exactly what the ",{"type":45,"tag":59,"props":1226,"children":1228},{"className":1227},[],[1229],{"type":54,"value":1150},{"type":54,"value":1231}," does for you). The routes under the host are:",{"type":45,"tag":179,"props":1233,"children":1234},{},[1235,1260,1308,1326],{"type":45,"tag":183,"props":1236,"children":1237},{},[1238,1244,1246,1251,1253,1259],{"type":45,"tag":59,"props":1239,"children":1241},{"className":1240},[],[1242],{"type":54,"value":1243},"\u002Fv1",{"type":54,"value":1245}," — unified, OpenAI ",{"type":45,"tag":50,"props":1247,"children":1248},{},[1249],{"type":54,"value":1250},"Chat Completions",{"type":54,"value":1252},"-compatible; recommended default, works with every provider (",{"type":45,"tag":59,"props":1254,"children":1256},{"className":1255},[],[1257],{"type":54,"value":1258},"\u002Fv1\u002Fchat\u002Fcompletions",{"type":54,"value":277},{"type":45,"tag":183,"props":1261,"children":1262},{},[1263,1269,1271,1276,1278,1284,1286,1292,1294,1299,1301,1307],{"type":45,"tag":59,"props":1264,"children":1266},{"className":1265},[],[1267],{"type":54,"value":1268},"\u002Fopenai\u002Fv1",{"type":54,"value":1270}," — OpenAI ",{"type":45,"tag":50,"props":1272,"children":1273},{},[1274],{"type":54,"value":1275},"Responses",{"type":54,"value":1277}," API (required for ",{"type":45,"tag":59,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":54,"value":1283},"gpt-5-…-codex",{"type":54,"value":1285}," variants and ",{"type":45,"tag":59,"props":1287,"children":1289},{"className":1288},[],[1290],{"type":54,"value":1291},"gpt-5-5-pro",{"type":54,"value":1293},"); the ",{"type":45,"tag":59,"props":1295,"children":1297},{"className":1296},[],[1298],{"type":54,"value":1174},{"type":54,"value":1300}," provider uses the Responses API by default (",{"type":45,"tag":59,"props":1302,"children":1304},{"className":1303},[],[1305],{"type":54,"value":1306},"\u002Fopenai\u002Fv1\u002Fresponses",{"type":54,"value":277},{"type":45,"tag":183,"props":1309,"children":1310},{},[1311,1317,1319,1325],{"type":45,"tag":59,"props":1312,"children":1314},{"className":1313},[],[1315],{"type":54,"value":1316},"\u002Fanthropic\u002Fv1",{"type":54,"value":1318}," — native Anthropic Messages (extended thinking, prompt caching); mirrors the real Anthropic API path (",{"type":45,"tag":59,"props":1320,"children":1322},{"className":1321},[],[1323],{"type":54,"value":1324},"\u002Fanthropic\u002Fv1\u002Fmessages",{"type":54,"value":277},{"type":45,"tag":183,"props":1327,"children":1328},{},[1329,1335,1337,1343,1345,1351],{"type":45,"tag":59,"props":1330,"children":1332},{"className":1331},[],[1333],{"type":54,"value":1334},"\u002Fai-gateway\u002Fgemini\u002Fv1beta\u002F...",{"type":54,"value":1336}," — native Gemini ",{"type":45,"tag":59,"props":1338,"children":1340},{"className":1339},[],[1341],{"type":54,"value":1342},"generateContent",{"type":54,"value":1344}," (this dialect is still served under the legacy ",{"type":45,"tag":59,"props":1346,"children":1348},{"className":1347},[],[1349],{"type":54,"value":1350},"\u002Fai-gateway\u002F",{"type":54,"value":1352}," prefix).",{"type":45,"tag":46,"props":1354,"children":1355},{},[1356,1358,1364,1366,1372],{"type":54,"value":1357},"So ",{"type":45,"tag":59,"props":1359,"children":1361},{"className":1360},[],[1362],{"type":54,"value":1363},"${NEON_AI_GATEWAY_BASE_URL}\u002Fv1",{"type":54,"value":1365}," is the chat-completions endpoint, ",{"type":45,"tag":59,"props":1367,"children":1369},{"className":1368},[],[1370],{"type":54,"value":1371},"${NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1",{"type":54,"value":1373}," the OpenAI Responses endpoint, and so on.",{"type":45,"tag":46,"props":1375,"children":1376},{},[1377,1379,1384,1386,1392,1394,1400,1402,1408,1410,1415,1416,1422],{"type":54,"value":1378},"For typed, validated access to the injected credentials, pass the same ",{"type":45,"tag":59,"props":1380,"children":1382},{"className":1381},[],[1383],{"type":54,"value":520},{"type":54,"value":1385}," config object to ",{"type":45,"tag":59,"props":1387,"children":1389},{"className":1388},[],[1390],{"type":54,"value":1391},"parseEnv",{"type":54,"value":1393}," from ",{"type":45,"tag":59,"props":1395,"children":1397},{"className":1396},[],[1398],{"type":54,"value":1399},"@neon\u002Fenv",{"type":54,"value":1401}," — it returns an ",{"type":45,"tag":59,"props":1403,"children":1405},{"className":1404},[],[1406],{"type":54,"value":1407},"env.aiGateway",{"type":54,"value":1409}," namespace (",{"type":45,"tag":59,"props":1411,"children":1413},{"className":1412},[],[1414],{"type":54,"value":1182},{"type":54,"value":262},{"type":45,"tag":59,"props":1417,"children":1419},{"className":1418},[],[1420],{"type":54,"value":1421},"baseUrl",{"type":54,"value":1423},") derived from your config.",{"type":45,"tag":167,"props":1425,"children":1427},{"id":1426},"build-agents-with-the-vercel-ai-sdk-recommended",[1428],{"type":54,"value":1429},"Build Agents with the Vercel AI SDK (Recommended)",{"type":45,"tag":46,"props":1431,"children":1432},{},[1433,1434,1441,1443,1449,1450,1456],{"type":54,"value":763},{"type":45,"tag":79,"props":1435,"children":1438},{"href":1436,"rel":1437},"https:\u002F\u002Fai-sdk.dev",[83],[1439],{"type":54,"value":1440},"Vercel AI SDK",{"type":54,"value":1442}," is the recommended way to call the gateway and build agents from TypeScript: one set of primitives (",{"type":45,"tag":59,"props":1444,"children":1446},{"className":1445},[],[1447],{"type":54,"value":1448},"generateText",{"type":54,"value":262},{"type":45,"tag":59,"props":1451,"children":1453},{"className":1452},[],[1454],{"type":54,"value":1455},"streamText",{"type":54,"value":1457},", tool calling, structured output) over every catalog model, with first-class streaming for the long agent responses Neon Functions are built to host.",{"type":45,"tag":46,"props":1459,"children":1460},{},[1461,1463,1468,1470,1475,1476,1481,1483,1488],{"type":54,"value":1462},"The dedicated ",{"type":45,"tag":59,"props":1464,"children":1466},{"className":1465},[],[1467],{"type":54,"value":1150},{"type":54,"value":1469}," reads ",{"type":45,"tag":59,"props":1471,"children":1473},{"className":1472},[],[1474],{"type":54,"value":1068},{"type":54,"value":1184},{"type":45,"tag":59,"props":1477,"children":1479},{"className":1478},[],[1480],{"type":54,"value":1044},{"type":54,"value":1482}," from the injected env with ",{"type":45,"tag":50,"props":1484,"children":1485},{},[1486],{"type":54,"value":1487},"zero config",{"type":54,"value":1489}," and routes each model to the best endpoint (Anthropic → Messages, OpenAI\u002FCodex → Responses, everything else → MLflow). On a Neon Function that streams text and generates images, just pick a catalog model:",{"type":45,"tag":89,"props":1491,"children":1493},{"className":546,"code":1492,"language":548,"meta":94,"style":94},"import { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { streamText } from \"ai\";\n\nconst result = streamText({\n  model: neon(\"gpt-5-mini\"), \u002F\u002F or claude-sonnet-4-6, gemini-2-5-flash, ...\n  messages,\n  tools: {\n    image_generation: neon.tools.imageGeneration({\n      outputFormat: \"jpeg\",\n      size: \"1024x1024\",\n    }),\n  },\n});\nreturn result.toUIMessageStreamResponse();\n",[1494],{"type":45,"tag":59,"props":1495,"children":1496},{"__ignoreMap":94},[1497,1537,1578,1585,1616,1662,1674,1690,1732,1762,1792,1809,1816,1832],{"type":45,"tag":100,"props":1498,"children":1499},{"class":102,"line":103},[1500,1504,1508,1513,1517,1521,1525,1529,1533],{"type":45,"tag":100,"props":1501,"children":1502},{"style":568},[1503],{"type":54,"value":571},{"type":45,"tag":100,"props":1505,"children":1506},{"style":574},[1507],{"type":54,"value":577},{"type":45,"tag":100,"props":1509,"children":1510},{"style":580},[1511],{"type":54,"value":1512}," neon",{"type":45,"tag":100,"props":1514,"children":1515},{"style":574},[1516],{"type":54,"value":588},{"type":45,"tag":100,"props":1518,"children":1519},{"style":568},[1520],{"type":54,"value":593},{"type":45,"tag":100,"props":1522,"children":1523},{"style":574},[1524],{"type":54,"value":598},{"type":45,"tag":100,"props":1526,"children":1527},{"style":113},[1528],{"type":54,"value":1150},{"type":45,"tag":100,"props":1530,"children":1531},{"style":574},[1532],{"type":54,"value":608},{"type":45,"tag":100,"props":1534,"children":1535},{"style":574},[1536],{"type":54,"value":613},{"type":45,"tag":100,"props":1538,"children":1539},{"class":102,"line":564},[1540,1544,1548,1553,1557,1561,1565,1570,1574],{"type":45,"tag":100,"props":1541,"children":1542},{"style":568},[1543],{"type":54,"value":571},{"type":45,"tag":100,"props":1545,"children":1546},{"style":574},[1547],{"type":54,"value":577},{"type":45,"tag":100,"props":1549,"children":1550},{"style":580},[1551],{"type":54,"value":1552}," streamText",{"type":45,"tag":100,"props":1554,"children":1555},{"style":574},[1556],{"type":54,"value":588},{"type":45,"tag":100,"props":1558,"children":1559},{"style":568},[1560],{"type":54,"value":593},{"type":45,"tag":100,"props":1562,"children":1563},{"style":574},[1564],{"type":54,"value":598},{"type":45,"tag":100,"props":1566,"children":1567},{"style":113},[1568],{"type":54,"value":1569},"ai",{"type":45,"tag":100,"props":1571,"children":1572},{"style":574},[1573],{"type":54,"value":608},{"type":45,"tag":100,"props":1575,"children":1576},{"style":574},[1577],{"type":54,"value":613},{"type":45,"tag":100,"props":1579,"children":1580},{"class":102,"line":616},[1581],{"type":45,"tag":100,"props":1582,"children":1583},{"emptyLinePlaceholder":620},[1584],{"type":54,"value":623},{"type":45,"tag":100,"props":1586,"children":1587},{"class":102,"line":626},[1588,1594,1599,1604,1608,1612],{"type":45,"tag":100,"props":1589,"children":1591},{"style":1590},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1592],{"type":54,"value":1593},"const",{"type":45,"tag":100,"props":1595,"children":1596},{"style":580},[1597],{"type":54,"value":1598}," result ",{"type":45,"tag":100,"props":1600,"children":1601},{"style":574},[1602],{"type":54,"value":1603},"=",{"type":45,"tag":100,"props":1605,"children":1606},{"style":640},[1607],{"type":54,"value":1552},{"type":45,"tag":100,"props":1609,"children":1610},{"style":580},[1611],{"type":54,"value":647},{"type":45,"tag":100,"props":1613,"children":1614},{"style":574},[1615],{"type":54,"value":652},{"type":45,"tag":100,"props":1617,"children":1618},{"class":102,"line":655},[1619,1624,1628,1632,1636,1640,1644,1648,1652,1657],{"type":45,"tag":100,"props":1620,"children":1621},{"style":659},[1622],{"type":54,"value":1623},"  model",{"type":45,"tag":100,"props":1625,"children":1626},{"style":574},[1627],{"type":54,"value":543},{"type":45,"tag":100,"props":1629,"children":1630},{"style":640},[1631],{"type":54,"value":1512},{"type":45,"tag":100,"props":1633,"children":1634},{"style":580},[1635],{"type":54,"value":647},{"type":45,"tag":100,"props":1637,"children":1638},{"style":574},[1639],{"type":54,"value":608},{"type":45,"tag":100,"props":1641,"children":1642},{"style":113},[1643],{"type":54,"value":268},{"type":45,"tag":100,"props":1645,"children":1646},{"style":574},[1647],{"type":54,"value":608},{"type":45,"tag":100,"props":1649,"children":1650},{"style":580},[1651],{"type":54,"value":718},{"type":45,"tag":100,"props":1653,"children":1654},{"style":574},[1655],{"type":54,"value":1656},",",{"type":45,"tag":100,"props":1658,"children":1659},{"style":558},[1660],{"type":54,"value":1661}," \u002F\u002F or claude-sonnet-4-6, gemini-2-5-flash, ...\n",{"type":45,"tag":100,"props":1663,"children":1664},{"class":102,"line":674},[1665,1670],{"type":45,"tag":100,"props":1666,"children":1667},{"style":580},[1668],{"type":54,"value":1669},"  messages",{"type":45,"tag":100,"props":1671,"children":1672},{"style":574},[1673],{"type":54,"value":695},{"type":45,"tag":100,"props":1675,"children":1676},{"class":102,"line":698},[1677,1682,1686],{"type":45,"tag":100,"props":1678,"children":1679},{"style":659},[1680],{"type":54,"value":1681},"  tools",{"type":45,"tag":100,"props":1683,"children":1684},{"style":574},[1685],{"type":54,"value":543},{"type":45,"tag":100,"props":1687,"children":1688},{"style":574},[1689],{"type":54,"value":671},{"type":45,"tag":100,"props":1691,"children":1692},{"class":102,"line":707},[1693,1698,1702,1706,1710,1715,1719,1724,1728],{"type":45,"tag":100,"props":1694,"children":1695},{"style":659},[1696],{"type":54,"value":1697},"    image_generation",{"type":45,"tag":100,"props":1699,"children":1700},{"style":574},[1701],{"type":54,"value":543},{"type":45,"tag":100,"props":1703,"children":1704},{"style":580},[1705],{"type":54,"value":1512},{"type":45,"tag":100,"props":1707,"children":1708},{"style":574},[1709],{"type":54,"value":155},{"type":45,"tag":100,"props":1711,"children":1712},{"style":580},[1713],{"type":54,"value":1714},"tools",{"type":45,"tag":100,"props":1716,"children":1717},{"style":574},[1718],{"type":54,"value":155},{"type":45,"tag":100,"props":1720,"children":1721},{"style":640},[1722],{"type":54,"value":1723},"imageGeneration",{"type":45,"tag":100,"props":1725,"children":1726},{"style":580},[1727],{"type":54,"value":647},{"type":45,"tag":100,"props":1729,"children":1730},{"style":574},[1731],{"type":54,"value":652},{"type":45,"tag":100,"props":1733,"children":1735},{"class":102,"line":1734},9,[1736,1741,1745,1749,1754,1758],{"type":45,"tag":100,"props":1737,"children":1738},{"style":659},[1739],{"type":54,"value":1740},"      outputFormat",{"type":45,"tag":100,"props":1742,"children":1743},{"style":574},[1744],{"type":54,"value":543},{"type":45,"tag":100,"props":1746,"children":1747},{"style":574},[1748],{"type":54,"value":598},{"type":45,"tag":100,"props":1750,"children":1751},{"style":113},[1752],{"type":54,"value":1753},"jpeg",{"type":45,"tag":100,"props":1755,"children":1756},{"style":574},[1757],{"type":54,"value":608},{"type":45,"tag":100,"props":1759,"children":1760},{"style":574},[1761],{"type":54,"value":695},{"type":45,"tag":100,"props":1763,"children":1765},{"class":102,"line":1764},10,[1766,1771,1775,1779,1784,1788],{"type":45,"tag":100,"props":1767,"children":1768},{"style":659},[1769],{"type":54,"value":1770},"      size",{"type":45,"tag":100,"props":1772,"children":1773},{"style":574},[1774],{"type":54,"value":543},{"type":45,"tag":100,"props":1776,"children":1777},{"style":574},[1778],{"type":54,"value":598},{"type":45,"tag":100,"props":1780,"children":1781},{"style":113},[1782],{"type":54,"value":1783},"1024x1024",{"type":45,"tag":100,"props":1785,"children":1786},{"style":574},[1787],{"type":54,"value":608},{"type":45,"tag":100,"props":1789,"children":1790},{"style":574},[1791],{"type":54,"value":695},{"type":45,"tag":100,"props":1793,"children":1795},{"class":102,"line":1794},11,[1796,1801,1805],{"type":45,"tag":100,"props":1797,"children":1798},{"style":574},[1799],{"type":54,"value":1800},"    }",{"type":45,"tag":100,"props":1802,"children":1803},{"style":580},[1804],{"type":54,"value":718},{"type":45,"tag":100,"props":1806,"children":1807},{"style":574},[1808],{"type":54,"value":695},{"type":45,"tag":100,"props":1810,"children":1811},{"class":102,"line":31},[1812],{"type":45,"tag":100,"props":1813,"children":1814},{"style":574},[1815],{"type":54,"value":704},{"type":45,"tag":100,"props":1817,"children":1819},{"class":102,"line":1818},13,[1820,1824,1828],{"type":45,"tag":100,"props":1821,"children":1822},{"style":574},[1823],{"type":54,"value":713},{"type":45,"tag":100,"props":1825,"children":1826},{"style":580},[1827],{"type":54,"value":718},{"type":45,"tag":100,"props":1829,"children":1830},{"style":574},[1831],{"type":54,"value":613},{"type":45,"tag":100,"props":1833,"children":1835},{"class":102,"line":1834},14,[1836,1841,1846,1850,1855,1860],{"type":45,"tag":100,"props":1837,"children":1838},{"style":568},[1839],{"type":54,"value":1840},"return",{"type":45,"tag":100,"props":1842,"children":1843},{"style":580},[1844],{"type":54,"value":1845}," result",{"type":45,"tag":100,"props":1847,"children":1848},{"style":574},[1849],{"type":54,"value":155},{"type":45,"tag":100,"props":1851,"children":1852},{"style":640},[1853],{"type":54,"value":1854},"toUIMessageStreamResponse",{"type":45,"tag":100,"props":1856,"children":1857},{"style":580},[1858],{"type":54,"value":1859},"()",{"type":45,"tag":100,"props":1861,"children":1862},{"style":574},[1863],{"type":54,"value":613},{"type":45,"tag":46,"props":1865,"children":1866},{},[1867,1869,1874],{"type":54,"value":1868},"A single completion is the same provider with ",{"type":45,"tag":59,"props":1870,"children":1872},{"className":1871},[],[1873],{"type":54,"value":1448},{"type":54,"value":543},{"type":45,"tag":89,"props":1876,"children":1878},{"className":546,"code":1877,"language":548,"meta":94,"style":94},"import { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { generateText } from \"ai\";\n\nconst { text } = await generateText({\n  model: neon(\"claude-haiku-4-5\"), \u002F\u002F or gpt-5-3-codex, gemini-2-5-flash, ...\n  prompt: \"Summarize Postgres for me.\",\n});\n",[1879],{"type":45,"tag":59,"props":1880,"children":1881},{"__ignoreMap":94},[1882,1921,1961,1968,2010,2055,2084],{"type":45,"tag":100,"props":1883,"children":1884},{"class":102,"line":103},[1885,1889,1893,1897,1901,1905,1909,1913,1917],{"type":45,"tag":100,"props":1886,"children":1887},{"style":568},[1888],{"type":54,"value":571},{"type":45,"tag":100,"props":1890,"children":1891},{"style":574},[1892],{"type":54,"value":577},{"type":45,"tag":100,"props":1894,"children":1895},{"style":580},[1896],{"type":54,"value":1512},{"type":45,"tag":100,"props":1898,"children":1899},{"style":574},[1900],{"type":54,"value":588},{"type":45,"tag":100,"props":1902,"children":1903},{"style":568},[1904],{"type":54,"value":593},{"type":45,"tag":100,"props":1906,"children":1907},{"style":574},[1908],{"type":54,"value":598},{"type":45,"tag":100,"props":1910,"children":1911},{"style":113},[1912],{"type":54,"value":1150},{"type":45,"tag":100,"props":1914,"children":1915},{"style":574},[1916],{"type":54,"value":608},{"type":45,"tag":100,"props":1918,"children":1919},{"style":574},[1920],{"type":54,"value":613},{"type":45,"tag":100,"props":1922,"children":1923},{"class":102,"line":564},[1924,1928,1932,1937,1941,1945,1949,1953,1957],{"type":45,"tag":100,"props":1925,"children":1926},{"style":568},[1927],{"type":54,"value":571},{"type":45,"tag":100,"props":1929,"children":1930},{"style":574},[1931],{"type":54,"value":577},{"type":45,"tag":100,"props":1933,"children":1934},{"style":580},[1935],{"type":54,"value":1936}," generateText",{"type":45,"tag":100,"props":1938,"children":1939},{"style":574},[1940],{"type":54,"value":588},{"type":45,"tag":100,"props":1942,"children":1943},{"style":568},[1944],{"type":54,"value":593},{"type":45,"tag":100,"props":1946,"children":1947},{"style":574},[1948],{"type":54,"value":598},{"type":45,"tag":100,"props":1950,"children":1951},{"style":113},[1952],{"type":54,"value":1569},{"type":45,"tag":100,"props":1954,"children":1955},{"style":574},[1956],{"type":54,"value":608},{"type":45,"tag":100,"props":1958,"children":1959},{"style":574},[1960],{"type":54,"value":613},{"type":45,"tag":100,"props":1962,"children":1963},{"class":102,"line":616},[1964],{"type":45,"tag":100,"props":1965,"children":1966},{"emptyLinePlaceholder":620},[1967],{"type":54,"value":623},{"type":45,"tag":100,"props":1969,"children":1970},{"class":102,"line":626},[1971,1975,1979,1984,1988,1993,1998,2002,2006],{"type":45,"tag":100,"props":1972,"children":1973},{"style":1590},[1974],{"type":54,"value":1593},{"type":45,"tag":100,"props":1976,"children":1977},{"style":574},[1978],{"type":54,"value":577},{"type":45,"tag":100,"props":1980,"children":1981},{"style":580},[1982],{"type":54,"value":1983}," text ",{"type":45,"tag":100,"props":1985,"children":1986},{"style":574},[1987],{"type":54,"value":713},{"type":45,"tag":100,"props":1989,"children":1990},{"style":574},[1991],{"type":54,"value":1992}," =",{"type":45,"tag":100,"props":1994,"children":1995},{"style":568},[1996],{"type":54,"value":1997}," await",{"type":45,"tag":100,"props":1999,"children":2000},{"style":640},[2001],{"type":54,"value":1936},{"type":45,"tag":100,"props":2003,"children":2004},{"style":580},[2005],{"type":54,"value":647},{"type":45,"tag":100,"props":2007,"children":2008},{"style":574},[2009],{"type":54,"value":652},{"type":45,"tag":100,"props":2011,"children":2012},{"class":102,"line":655},[2013,2017,2021,2025,2029,2033,2038,2042,2046,2050],{"type":45,"tag":100,"props":2014,"children":2015},{"style":659},[2016],{"type":54,"value":1623},{"type":45,"tag":100,"props":2018,"children":2019},{"style":574},[2020],{"type":54,"value":543},{"type":45,"tag":100,"props":2022,"children":2023},{"style":640},[2024],{"type":54,"value":1512},{"type":45,"tag":100,"props":2026,"children":2027},{"style":580},[2028],{"type":54,"value":647},{"type":45,"tag":100,"props":2030,"children":2031},{"style":574},[2032],{"type":54,"value":608},{"type":45,"tag":100,"props":2034,"children":2035},{"style":113},[2036],{"type":54,"value":2037},"claude-haiku-4-5",{"type":45,"tag":100,"props":2039,"children":2040},{"style":574},[2041],{"type":54,"value":608},{"type":45,"tag":100,"props":2043,"children":2044},{"style":580},[2045],{"type":54,"value":718},{"type":45,"tag":100,"props":2047,"children":2048},{"style":574},[2049],{"type":54,"value":1656},{"type":45,"tag":100,"props":2051,"children":2052},{"style":558},[2053],{"type":54,"value":2054}," \u002F\u002F or gpt-5-3-codex, gemini-2-5-flash, ...\n",{"type":45,"tag":100,"props":2056,"children":2057},{"class":102,"line":674},[2058,2063,2067,2071,2076,2080],{"type":45,"tag":100,"props":2059,"children":2060},{"style":659},[2061],{"type":54,"value":2062},"  prompt",{"type":45,"tag":100,"props":2064,"children":2065},{"style":574},[2066],{"type":54,"value":543},{"type":45,"tag":100,"props":2068,"children":2069},{"style":574},[2070],{"type":54,"value":598},{"type":45,"tag":100,"props":2072,"children":2073},{"style":113},[2074],{"type":54,"value":2075},"Summarize Postgres for me.",{"type":45,"tag":100,"props":2077,"children":2078},{"style":574},[2079],{"type":54,"value":608},{"type":45,"tag":100,"props":2081,"children":2082},{"style":574},[2083],{"type":54,"value":695},{"type":45,"tag":100,"props":2085,"children":2086},{"class":102,"line":698},[2087,2091,2095],{"type":45,"tag":100,"props":2088,"children":2089},{"style":574},[2090],{"type":54,"value":713},{"type":45,"tag":100,"props":2092,"children":2093},{"style":580},[2094],{"type":54,"value":718},{"type":45,"tag":100,"props":2096,"children":2097},{"style":574},[2098],{"type":54,"value":613},{"type":45,"tag":1108,"props":2100,"children":2101},{},[2102],{"type":45,"tag":46,"props":2103,"children":2104},{},[2105,2107,2112,2114,2119,2120,2126,2128,2133,2135,2140,2142,2147,2149,2154,2156,2162,2164,2170],{"type":54,"value":2106},"Prefer ",{"type":45,"tag":59,"props":2108,"children":2110},{"className":2109},[],[2111],{"type":54,"value":1150},{"type":54,"value":2113}," over the bare ",{"type":45,"tag":59,"props":2115,"children":2117},{"className":2116},[],[2118],{"type":54,"value":1174},{"type":54,"value":361},{"type":45,"tag":59,"props":2121,"children":2123},{"className":2122},[],[2124],{"type":54,"value":2125},"openai()",{"type":54,"value":2127},": Neon injects only ",{"type":45,"tag":59,"props":2129,"children":2131},{"className":2130},[],[2132],{"type":54,"value":1166},{"type":54,"value":2134},", not ",{"type":45,"tag":59,"props":2136,"children":2138},{"className":2137},[],[2139],{"type":54,"value":1198},{"type":54,"value":2141},", so ",{"type":45,"tag":59,"props":2143,"children":2145},{"className":2144},[],[2146],{"type":54,"value":2125},{"type":54,"value":2148}," won't pick up the gateway from the env on its own. If you do use ",{"type":45,"tag":59,"props":2150,"children":2152},{"className":2151},[],[2153],{"type":54,"value":1174},{"type":54,"value":2155},", configure it explicitly with ",{"type":45,"tag":59,"props":2157,"children":2159},{"className":2158},[],[2160],{"type":54,"value":2161},"createOpenAI({ apiKey: process.env.NEON_AI_GATEWAY_TOKEN, baseURL: ",{"type":54,"value":2163},"${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1",{"type":45,"tag":59,"props":2165,"children":2167},{"className":2166},[],[2168],{"type":54,"value":2169}," })",{"type":54,"value":155},{"type":45,"tag":46,"props":2172,"children":2173},{},[2174,2176,2181,2183,2188,2190,2196],{"type":54,"value":2175},"To build an ",{"type":45,"tag":50,"props":2177,"children":2178},{},[2179],{"type":54,"value":2180},"agent",{"type":54,"value":2182}," — a model that calls tools in a loop and then answers — add ",{"type":45,"tag":59,"props":2184,"children":2186},{"className":2185},[],[2187],{"type":54,"value":1714},{"type":54,"value":2189}," and a ",{"type":45,"tag":59,"props":2191,"children":2193},{"className":2192},[],[2194],{"type":54,"value":2195},"stopWhen",{"type":54,"value":2197}," budget. The loop runs in-process, so on a Neon Function it isn't cut off by lambda-style timeouts:",{"type":45,"tag":89,"props":2199,"children":2201},{"className":546,"code":2200,"language":548,"meta":94,"style":94},"import { neon } from \"@neon\u002Fai-sdk-provider\";\nimport { generateText, tool, stepCountIs } from \"ai\";\nimport { z } from \"zod\";\n\nconst { text } = await generateText({\n  model: neon(\"claude-sonnet-4-6\"),\n  prompt: \"How many open todos do I have, and what's the oldest one?\",\n  tools: {\n    listTodos: tool({\n      description: \"List the user's open todos.\",\n      inputSchema: z.object({}), \u002F\u002F AI SDK v5+: `inputSchema`, not `parameters`\n      execute: async () => db.select().from(todos),\n    }),\n  },\n  stopWhen: stepCountIs(5), \u002F\u002F let the model call tools, then summarize\n});\n",[2202],{"type":45,"tag":59,"props":2203,"children":2204},{"__ignoreMap":94},[2205,2244,2301,2342,2349,2388,2427,2455,2470,2494,2523,2570,2633,2648,2655,2695],{"type":45,"tag":100,"props":2206,"children":2207},{"class":102,"line":103},[2208,2212,2216,2220,2224,2228,2232,2236,2240],{"type":45,"tag":100,"props":2209,"children":2210},{"style":568},[2211],{"type":54,"value":571},{"type":45,"tag":100,"props":2213,"children":2214},{"style":574},[2215],{"type":54,"value":577},{"type":45,"tag":100,"props":2217,"children":2218},{"style":580},[2219],{"type":54,"value":1512},{"type":45,"tag":100,"props":2221,"children":2222},{"style":574},[2223],{"type":54,"value":588},{"type":45,"tag":100,"props":2225,"children":2226},{"style":568},[2227],{"type":54,"value":593},{"type":45,"tag":100,"props":2229,"children":2230},{"style":574},[2231],{"type":54,"value":598},{"type":45,"tag":100,"props":2233,"children":2234},{"style":113},[2235],{"type":54,"value":1150},{"type":45,"tag":100,"props":2237,"children":2238},{"style":574},[2239],{"type":54,"value":608},{"type":45,"tag":100,"props":2241,"children":2242},{"style":574},[2243],{"type":54,"value":613},{"type":45,"tag":100,"props":2245,"children":2246},{"class":102,"line":564},[2247,2251,2255,2259,2263,2268,2272,2277,2281,2285,2289,2293,2297],{"type":45,"tag":100,"props":2248,"children":2249},{"style":568},[2250],{"type":54,"value":571},{"type":45,"tag":100,"props":2252,"children":2253},{"style":574},[2254],{"type":54,"value":577},{"type":45,"tag":100,"props":2256,"children":2257},{"style":580},[2258],{"type":54,"value":1936},{"type":45,"tag":100,"props":2260,"children":2261},{"style":574},[2262],{"type":54,"value":1656},{"type":45,"tag":100,"props":2264,"children":2265},{"style":580},[2266],{"type":54,"value":2267}," tool",{"type":45,"tag":100,"props":2269,"children":2270},{"style":574},[2271],{"type":54,"value":1656},{"type":45,"tag":100,"props":2273,"children":2274},{"style":580},[2275],{"type":54,"value":2276}," stepCountIs",{"type":45,"tag":100,"props":2278,"children":2279},{"style":574},[2280],{"type":54,"value":588},{"type":45,"tag":100,"props":2282,"children":2283},{"style":568},[2284],{"type":54,"value":593},{"type":45,"tag":100,"props":2286,"children":2287},{"style":574},[2288],{"type":54,"value":598},{"type":45,"tag":100,"props":2290,"children":2291},{"style":113},[2292],{"type":54,"value":1569},{"type":45,"tag":100,"props":2294,"children":2295},{"style":574},[2296],{"type":54,"value":608},{"type":45,"tag":100,"props":2298,"children":2299},{"style":574},[2300],{"type":54,"value":613},{"type":45,"tag":100,"props":2302,"children":2303},{"class":102,"line":616},[2304,2308,2312,2317,2321,2325,2329,2334,2338],{"type":45,"tag":100,"props":2305,"children":2306},{"style":568},[2307],{"type":54,"value":571},{"type":45,"tag":100,"props":2309,"children":2310},{"style":574},[2311],{"type":54,"value":577},{"type":45,"tag":100,"props":2313,"children":2314},{"style":580},[2315],{"type":54,"value":2316}," z",{"type":45,"tag":100,"props":2318,"children":2319},{"style":574},[2320],{"type":54,"value":588},{"type":45,"tag":100,"props":2322,"children":2323},{"style":568},[2324],{"type":54,"value":593},{"type":45,"tag":100,"props":2326,"children":2327},{"style":574},[2328],{"type":54,"value":598},{"type":45,"tag":100,"props":2330,"children":2331},{"style":113},[2332],{"type":54,"value":2333},"zod",{"type":45,"tag":100,"props":2335,"children":2336},{"style":574},[2337],{"type":54,"value":608},{"type":45,"tag":100,"props":2339,"children":2340},{"style":574},[2341],{"type":54,"value":613},{"type":45,"tag":100,"props":2343,"children":2344},{"class":102,"line":626},[2345],{"type":45,"tag":100,"props":2346,"children":2347},{"emptyLinePlaceholder":620},[2348],{"type":54,"value":623},{"type":45,"tag":100,"props":2350,"children":2351},{"class":102,"line":655},[2352,2356,2360,2364,2368,2372,2376,2380,2384],{"type":45,"tag":100,"props":2353,"children":2354},{"style":1590},[2355],{"type":54,"value":1593},{"type":45,"tag":100,"props":2357,"children":2358},{"style":574},[2359],{"type":54,"value":577},{"type":45,"tag":100,"props":2361,"children":2362},{"style":580},[2363],{"type":54,"value":1983},{"type":45,"tag":100,"props":2365,"children":2366},{"style":574},[2367],{"type":54,"value":713},{"type":45,"tag":100,"props":2369,"children":2370},{"style":574},[2371],{"type":54,"value":1992},{"type":45,"tag":100,"props":2373,"children":2374},{"style":568},[2375],{"type":54,"value":1997},{"type":45,"tag":100,"props":2377,"children":2378},{"style":640},[2379],{"type":54,"value":1936},{"type":45,"tag":100,"props":2381,"children":2382},{"style":580},[2383],{"type":54,"value":647},{"type":45,"tag":100,"props":2385,"children":2386},{"style":574},[2387],{"type":54,"value":652},{"type":45,"tag":100,"props":2389,"children":2390},{"class":102,"line":674},[2391,2395,2399,2403,2407,2411,2415,2419,2423],{"type":45,"tag":100,"props":2392,"children":2393},{"style":659},[2394],{"type":54,"value":1623},{"type":45,"tag":100,"props":2396,"children":2397},{"style":574},[2398],{"type":54,"value":543},{"type":45,"tag":100,"props":2400,"children":2401},{"style":640},[2402],{"type":54,"value":1512},{"type":45,"tag":100,"props":2404,"children":2405},{"style":580},[2406],{"type":54,"value":647},{"type":45,"tag":100,"props":2408,"children":2409},{"style":574},[2410],{"type":54,"value":608},{"type":45,"tag":100,"props":2412,"children":2413},{"style":113},[2414],{"type":54,"value":260},{"type":45,"tag":100,"props":2416,"children":2417},{"style":574},[2418],{"type":54,"value":608},{"type":45,"tag":100,"props":2420,"children":2421},{"style":580},[2422],{"type":54,"value":718},{"type":45,"tag":100,"props":2424,"children":2425},{"style":574},[2426],{"type":54,"value":695},{"type":45,"tag":100,"props":2428,"children":2429},{"class":102,"line":698},[2430,2434,2438,2442,2447,2451],{"type":45,"tag":100,"props":2431,"children":2432},{"style":659},[2433],{"type":54,"value":2062},{"type":45,"tag":100,"props":2435,"children":2436},{"style":574},[2437],{"type":54,"value":543},{"type":45,"tag":100,"props":2439,"children":2440},{"style":574},[2441],{"type":54,"value":598},{"type":45,"tag":100,"props":2443,"children":2444},{"style":113},[2445],{"type":54,"value":2446},"How many open todos do I have, and what's the oldest one?",{"type":45,"tag":100,"props":2448,"children":2449},{"style":574},[2450],{"type":54,"value":608},{"type":45,"tag":100,"props":2452,"children":2453},{"style":574},[2454],{"type":54,"value":695},{"type":45,"tag":100,"props":2456,"children":2457},{"class":102,"line":707},[2458,2462,2466],{"type":45,"tag":100,"props":2459,"children":2460},{"style":659},[2461],{"type":54,"value":1681},{"type":45,"tag":100,"props":2463,"children":2464},{"style":574},[2465],{"type":54,"value":543},{"type":45,"tag":100,"props":2467,"children":2468},{"style":574},[2469],{"type":54,"value":671},{"type":45,"tag":100,"props":2471,"children":2472},{"class":102,"line":1734},[2473,2478,2482,2486,2490],{"type":45,"tag":100,"props":2474,"children":2475},{"style":659},[2476],{"type":54,"value":2477},"    listTodos",{"type":45,"tag":100,"props":2479,"children":2480},{"style":574},[2481],{"type":54,"value":543},{"type":45,"tag":100,"props":2483,"children":2484},{"style":640},[2485],{"type":54,"value":2267},{"type":45,"tag":100,"props":2487,"children":2488},{"style":580},[2489],{"type":54,"value":647},{"type":45,"tag":100,"props":2491,"children":2492},{"style":574},[2493],{"type":54,"value":652},{"type":45,"tag":100,"props":2495,"children":2496},{"class":102,"line":1764},[2497,2502,2506,2510,2515,2519],{"type":45,"tag":100,"props":2498,"children":2499},{"style":659},[2500],{"type":54,"value":2501},"      description",{"type":45,"tag":100,"props":2503,"children":2504},{"style":574},[2505],{"type":54,"value":543},{"type":45,"tag":100,"props":2507,"children":2508},{"style":574},[2509],{"type":54,"value":598},{"type":45,"tag":100,"props":2511,"children":2512},{"style":113},[2513],{"type":54,"value":2514},"List the user's open todos.",{"type":45,"tag":100,"props":2516,"children":2517},{"style":574},[2518],{"type":54,"value":608},{"type":45,"tag":100,"props":2520,"children":2521},{"style":574},[2522],{"type":54,"value":695},{"type":45,"tag":100,"props":2524,"children":2525},{"class":102,"line":1794},[2526,2531,2535,2539,2543,2548,2552,2557,2561,2565],{"type":45,"tag":100,"props":2527,"children":2528},{"style":659},[2529],{"type":54,"value":2530},"      inputSchema",{"type":45,"tag":100,"props":2532,"children":2533},{"style":574},[2534],{"type":54,"value":543},{"type":45,"tag":100,"props":2536,"children":2537},{"style":580},[2538],{"type":54,"value":2316},{"type":45,"tag":100,"props":2540,"children":2541},{"style":574},[2542],{"type":54,"value":155},{"type":45,"tag":100,"props":2544,"children":2545},{"style":640},[2546],{"type":54,"value":2547},"object",{"type":45,"tag":100,"props":2549,"children":2550},{"style":580},[2551],{"type":54,"value":647},{"type":45,"tag":100,"props":2553,"children":2554},{"style":574},[2555],{"type":54,"value":2556},"{}",{"type":45,"tag":100,"props":2558,"children":2559},{"style":580},[2560],{"type":54,"value":718},{"type":45,"tag":100,"props":2562,"children":2563},{"style":574},[2564],{"type":54,"value":1656},{"type":45,"tag":100,"props":2566,"children":2567},{"style":558},[2568],{"type":54,"value":2569}," \u002F\u002F AI SDK v5+: `inputSchema`, not `parameters`\n",{"type":45,"tag":100,"props":2571,"children":2572},{"class":102,"line":31},[2573,2578,2582,2587,2592,2597,2602,2606,2611,2615,2619,2624,2629],{"type":45,"tag":100,"props":2574,"children":2575},{"style":640},[2576],{"type":54,"value":2577},"      execute",{"type":45,"tag":100,"props":2579,"children":2580},{"style":574},[2581],{"type":54,"value":543},{"type":45,"tag":100,"props":2583,"children":2584},{"style":1590},[2585],{"type":54,"value":2586}," async",{"type":45,"tag":100,"props":2588,"children":2589},{"style":574},[2590],{"type":54,"value":2591}," ()",{"type":45,"tag":100,"props":2593,"children":2594},{"style":1590},[2595],{"type":54,"value":2596}," =>",{"type":45,"tag":100,"props":2598,"children":2599},{"style":580},[2600],{"type":54,"value":2601}," db",{"type":45,"tag":100,"props":2603,"children":2604},{"style":574},[2605],{"type":54,"value":155},{"type":45,"tag":100,"props":2607,"children":2608},{"style":640},[2609],{"type":54,"value":2610},"select",{"type":45,"tag":100,"props":2612,"children":2613},{"style":580},[2614],{"type":54,"value":1859},{"type":45,"tag":100,"props":2616,"children":2617},{"style":574},[2618],{"type":54,"value":155},{"type":45,"tag":100,"props":2620,"children":2621},{"style":640},[2622],{"type":54,"value":2623},"from",{"type":45,"tag":100,"props":2625,"children":2626},{"style":580},[2627],{"type":54,"value":2628},"(todos)",{"type":45,"tag":100,"props":2630,"children":2631},{"style":574},[2632],{"type":54,"value":695},{"type":45,"tag":100,"props":2634,"children":2635},{"class":102,"line":1818},[2636,2640,2644],{"type":45,"tag":100,"props":2637,"children":2638},{"style":574},[2639],{"type":54,"value":1800},{"type":45,"tag":100,"props":2641,"children":2642},{"style":580},[2643],{"type":54,"value":718},{"type":45,"tag":100,"props":2645,"children":2646},{"style":574},[2647],{"type":54,"value":695},{"type":45,"tag":100,"props":2649,"children":2650},{"class":102,"line":1834},[2651],{"type":45,"tag":100,"props":2652,"children":2653},{"style":574},[2654],{"type":54,"value":704},{"type":45,"tag":100,"props":2656,"children":2658},{"class":102,"line":2657},15,[2659,2664,2668,2672,2676,2682,2686,2690],{"type":45,"tag":100,"props":2660,"children":2661},{"style":659},[2662],{"type":54,"value":2663},"  stopWhen",{"type":45,"tag":100,"props":2665,"children":2666},{"style":574},[2667],{"type":54,"value":543},{"type":45,"tag":100,"props":2669,"children":2670},{"style":640},[2671],{"type":54,"value":2276},{"type":45,"tag":100,"props":2673,"children":2674},{"style":580},[2675],{"type":54,"value":647},{"type":45,"tag":100,"props":2677,"children":2679},{"style":2678},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[2680],{"type":54,"value":2681},"5",{"type":45,"tag":100,"props":2683,"children":2684},{"style":580},[2685],{"type":54,"value":718},{"type":45,"tag":100,"props":2687,"children":2688},{"style":574},[2689],{"type":54,"value":1656},{"type":45,"tag":100,"props":2691,"children":2692},{"style":558},[2693],{"type":54,"value":2694}," \u002F\u002F let the model call tools, then summarize\n",{"type":45,"tag":100,"props":2696,"children":2698},{"class":102,"line":2697},16,[2699,2703,2707],{"type":45,"tag":100,"props":2700,"children":2701},{"style":574},[2702],{"type":54,"value":713},{"type":45,"tag":100,"props":2704,"children":2705},{"style":580},[2706],{"type":54,"value":718},{"type":45,"tag":100,"props":2708,"children":2709},{"style":574},[2710],{"type":54,"value":613},{"type":45,"tag":46,"props":2712,"children":2713},{},[2714,2716,2722,2724,2730],{"type":54,"value":2715},"For a full AI SDK agent deployed as a Neon Function (streaming, tool calling, image generation, persistence), see the ",{"type":45,"tag":59,"props":2717,"children":2719},{"className":2718},[],[2720],{"type":54,"value":2721},"neon-functions",{"type":54,"value":2723}," skill's ",{"type":45,"tag":59,"props":2725,"children":2727},{"className":2726},[],[2728],{"type":54,"value":2729},"references\u002Fai-sdk.md",{"type":54,"value":155},{"type":45,"tag":167,"props":2732,"children":2734},{"id":2733},"build-agents-with-mastra-recommended",[2735],{"type":54,"value":2736},"Build Agents with Mastra (Recommended)",{"type":45,"tag":46,"props":2738,"children":2739},{},[2740,2747,2749,2755,2757,2762,2764,2769,2770,2775,2777,2782,2784,2789,2791,2796,2798,2804,2806,2812],{"type":45,"tag":79,"props":2741,"children":2744},{"href":2742,"rel":2743},"https:\u002F\u002Fmastra.ai",[83],[2745],{"type":54,"value":2746},"Mastra",{"type":54,"value":2748}," is the recommended framework when you want batteries-included agents — built-in memory, tools, workflows, and tracing — with the model still pointed at the gateway. With ",{"type":45,"tag":59,"props":2750,"children":2752},{"className":2751},[],[2753],{"type":54,"value":2754},"@mastra\u002Fcore",{"type":54,"value":2756}," 1.47+, use a ",{"type":45,"tag":59,"props":2758,"children":2760},{"className":2759},[],[2761],{"type":54,"value":1158},{"type":54,"value":2763}," magic string; Mastra reads ",{"type":45,"tag":59,"props":2765,"children":2767},{"className":2766},[],[2768],{"type":54,"value":1068},{"type":54,"value":377},{"type":45,"tag":59,"props":2771,"children":2773},{"className":2772},[],[2774],{"type":54,"value":1044},{"type":54,"value":2776}," from the environment (injected by ",{"type":45,"tag":59,"props":2778,"children":2780},{"className":2779},[],[2781],{"type":54,"value":902},{"type":54,"value":2783}," when ",{"type":45,"tag":59,"props":2785,"children":2787},{"className":2786},[],[2788],{"type":54,"value":397},{"type":54,"value":2790}," is enabled). Use ",{"type":45,"tag":59,"props":2792,"children":2794},{"className":2793},[],[2795],{"type":54,"value":1391},{"type":54,"value":2797}," only for other declared services (e.g. ",{"type":45,"tag":59,"props":2799,"children":2801},{"className":2800},[],[2802],{"type":54,"value":2803},"env.postgres.databaseUrl",{"type":54,"value":2805}," for ",{"type":45,"tag":59,"props":2807,"children":2809},{"className":2808},[],[2810],{"type":54,"value":2811},"@mastra\u002Fpg",{"type":54,"value":2813}," memory):",{"type":45,"tag":89,"props":2815,"children":2817},{"className":546,"code":2816,"language":548,"meta":94,"style":94},"import { Agent } from \"@mastra\u002Fcore\u002Fagent\";\nimport { parseEnv } from \"@neon\u002Fenv\";\nimport config from \"..\u002Fneon\";\n\nconst env = parseEnv(config);\n\nexport const personalAssistant = new Agent({\n  id: \"personal-assistant\",\n  name: \"personal-assistant\",\n  instructions:\n    \"You are a warm, concise personal assistant with long-term memory.\",\n  model: \"neon\u002Fclaude-haiku-4-5\",\n  memory, \u002F\u002F your Mastra memory store, e.g. @mastra\u002Fpg on env.postgres.databaseUrl\n});\n",[2818],{"type":45,"tag":59,"props":2819,"children":2820},{"__ignoreMap":94},[2821,2862,2902,2935,2942,2971,2978,3016,3045,3073,3086,3107,3135,3152],{"type":45,"tag":100,"props":2822,"children":2823},{"class":102,"line":103},[2824,2828,2832,2837,2841,2845,2849,2854,2858],{"type":45,"tag":100,"props":2825,"children":2826},{"style":568},[2827],{"type":54,"value":571},{"type":45,"tag":100,"props":2829,"children":2830},{"style":574},[2831],{"type":54,"value":577},{"type":45,"tag":100,"props":2833,"children":2834},{"style":580},[2835],{"type":54,"value":2836}," Agent",{"type":45,"tag":100,"props":2838,"children":2839},{"style":574},[2840],{"type":54,"value":588},{"type":45,"tag":100,"props":2842,"children":2843},{"style":568},[2844],{"type":54,"value":593},{"type":45,"tag":100,"props":2846,"children":2847},{"style":574},[2848],{"type":54,"value":598},{"type":45,"tag":100,"props":2850,"children":2851},{"style":113},[2852],{"type":54,"value":2853},"@mastra\u002Fcore\u002Fagent",{"type":45,"tag":100,"props":2855,"children":2856},{"style":574},[2857],{"type":54,"value":608},{"type":45,"tag":100,"props":2859,"children":2860},{"style":574},[2861],{"type":54,"value":613},{"type":45,"tag":100,"props":2863,"children":2864},{"class":102,"line":564},[2865,2869,2873,2878,2882,2886,2890,2894,2898],{"type":45,"tag":100,"props":2866,"children":2867},{"style":568},[2868],{"type":54,"value":571},{"type":45,"tag":100,"props":2870,"children":2871},{"style":574},[2872],{"type":54,"value":577},{"type":45,"tag":100,"props":2874,"children":2875},{"style":580},[2876],{"type":54,"value":2877}," parseEnv",{"type":45,"tag":100,"props":2879,"children":2880},{"style":574},[2881],{"type":54,"value":588},{"type":45,"tag":100,"props":2883,"children":2884},{"style":568},[2885],{"type":54,"value":593},{"type":45,"tag":100,"props":2887,"children":2888},{"style":574},[2889],{"type":54,"value":598},{"type":45,"tag":100,"props":2891,"children":2892},{"style":113},[2893],{"type":54,"value":1399},{"type":45,"tag":100,"props":2895,"children":2896},{"style":574},[2897],{"type":54,"value":608},{"type":45,"tag":100,"props":2899,"children":2900},{"style":574},[2901],{"type":54,"value":613},{"type":45,"tag":100,"props":2903,"children":2904},{"class":102,"line":616},[2905,2909,2914,2918,2922,2927,2931],{"type":45,"tag":100,"props":2906,"children":2907},{"style":568},[2908],{"type":54,"value":571},{"type":45,"tag":100,"props":2910,"children":2911},{"style":580},[2912],{"type":54,"value":2913}," config ",{"type":45,"tag":100,"props":2915,"children":2916},{"style":568},[2917],{"type":54,"value":2623},{"type":45,"tag":100,"props":2919,"children":2920},{"style":574},[2921],{"type":54,"value":598},{"type":45,"tag":100,"props":2923,"children":2924},{"style":113},[2925],{"type":54,"value":2926},"..\u002Fneon",{"type":45,"tag":100,"props":2928,"children":2929},{"style":574},[2930],{"type":54,"value":608},{"type":45,"tag":100,"props":2932,"children":2933},{"style":574},[2934],{"type":54,"value":613},{"type":45,"tag":100,"props":2936,"children":2937},{"class":102,"line":626},[2938],{"type":45,"tag":100,"props":2939,"children":2940},{"emptyLinePlaceholder":620},[2941],{"type":54,"value":623},{"type":45,"tag":100,"props":2943,"children":2944},{"class":102,"line":655},[2945,2949,2954,2958,2962,2967],{"type":45,"tag":100,"props":2946,"children":2947},{"style":1590},[2948],{"type":54,"value":1593},{"type":45,"tag":100,"props":2950,"children":2951},{"style":580},[2952],{"type":54,"value":2953}," env ",{"type":45,"tag":100,"props":2955,"children":2956},{"style":574},[2957],{"type":54,"value":1603},{"type":45,"tag":100,"props":2959,"children":2960},{"style":640},[2961],{"type":54,"value":2877},{"type":45,"tag":100,"props":2963,"children":2964},{"style":580},[2965],{"type":54,"value":2966},"(config)",{"type":45,"tag":100,"props":2968,"children":2969},{"style":574},[2970],{"type":54,"value":613},{"type":45,"tag":100,"props":2972,"children":2973},{"class":102,"line":674},[2974],{"type":45,"tag":100,"props":2975,"children":2976},{"emptyLinePlaceholder":620},[2977],{"type":54,"value":623},{"type":45,"tag":100,"props":2979,"children":2980},{"class":102,"line":698},[2981,2985,2990,2995,2999,3004,3008,3012],{"type":45,"tag":100,"props":2982,"children":2983},{"style":568},[2984],{"type":54,"value":632},{"type":45,"tag":100,"props":2986,"children":2987},{"style":1590},[2988],{"type":54,"value":2989}," const",{"type":45,"tag":100,"props":2991,"children":2992},{"style":580},[2993],{"type":54,"value":2994}," personalAssistant ",{"type":45,"tag":100,"props":2996,"children":2997},{"style":574},[2998],{"type":54,"value":1603},{"type":45,"tag":100,"props":3000,"children":3001},{"style":574},[3002],{"type":54,"value":3003}," new",{"type":45,"tag":100,"props":3005,"children":3006},{"style":640},[3007],{"type":54,"value":2836},{"type":45,"tag":100,"props":3009,"children":3010},{"style":580},[3011],{"type":54,"value":647},{"type":45,"tag":100,"props":3013,"children":3014},{"style":574},[3015],{"type":54,"value":652},{"type":45,"tag":100,"props":3017,"children":3018},{"class":102,"line":707},[3019,3024,3028,3032,3037,3041],{"type":45,"tag":100,"props":3020,"children":3021},{"style":659},[3022],{"type":54,"value":3023},"  id",{"type":45,"tag":100,"props":3025,"children":3026},{"style":574},[3027],{"type":54,"value":543},{"type":45,"tag":100,"props":3029,"children":3030},{"style":574},[3031],{"type":54,"value":598},{"type":45,"tag":100,"props":3033,"children":3034},{"style":113},[3035],{"type":54,"value":3036},"personal-assistant",{"type":45,"tag":100,"props":3038,"children":3039},{"style":574},[3040],{"type":54,"value":608},{"type":45,"tag":100,"props":3042,"children":3043},{"style":574},[3044],{"type":54,"value":695},{"type":45,"tag":100,"props":3046,"children":3047},{"class":102,"line":1734},[3048,3053,3057,3061,3065,3069],{"type":45,"tag":100,"props":3049,"children":3050},{"style":659},[3051],{"type":54,"value":3052},"  name",{"type":45,"tag":100,"props":3054,"children":3055},{"style":574},[3056],{"type":54,"value":543},{"type":45,"tag":100,"props":3058,"children":3059},{"style":574},[3060],{"type":54,"value":598},{"type":45,"tag":100,"props":3062,"children":3063},{"style":113},[3064],{"type":54,"value":3036},{"type":45,"tag":100,"props":3066,"children":3067},{"style":574},[3068],{"type":54,"value":608},{"type":45,"tag":100,"props":3070,"children":3071},{"style":574},[3072],{"type":54,"value":695},{"type":45,"tag":100,"props":3074,"children":3075},{"class":102,"line":1764},[3076,3081],{"type":45,"tag":100,"props":3077,"children":3078},{"style":659},[3079],{"type":54,"value":3080},"  instructions",{"type":45,"tag":100,"props":3082,"children":3083},{"style":574},[3084],{"type":54,"value":3085},":\n",{"type":45,"tag":100,"props":3087,"children":3088},{"class":102,"line":1794},[3089,3094,3099,3103],{"type":45,"tag":100,"props":3090,"children":3091},{"style":574},[3092],{"type":54,"value":3093},"    \"",{"type":45,"tag":100,"props":3095,"children":3096},{"style":113},[3097],{"type":54,"value":3098},"You are a warm, concise personal assistant with long-term memory.",{"type":45,"tag":100,"props":3100,"children":3101},{"style":574},[3102],{"type":54,"value":608},{"type":45,"tag":100,"props":3104,"children":3105},{"style":574},[3106],{"type":54,"value":695},{"type":45,"tag":100,"props":3108,"children":3109},{"class":102,"line":31},[3110,3114,3118,3122,3127,3131],{"type":45,"tag":100,"props":3111,"children":3112},{"style":659},[3113],{"type":54,"value":1623},{"type":45,"tag":100,"props":3115,"children":3116},{"style":574},[3117],{"type":54,"value":543},{"type":45,"tag":100,"props":3119,"children":3120},{"style":574},[3121],{"type":54,"value":598},{"type":45,"tag":100,"props":3123,"children":3124},{"style":113},[3125],{"type":54,"value":3126},"neon\u002Fclaude-haiku-4-5",{"type":45,"tag":100,"props":3128,"children":3129},{"style":574},[3130],{"type":54,"value":608},{"type":45,"tag":100,"props":3132,"children":3133},{"style":574},[3134],{"type":54,"value":695},{"type":45,"tag":100,"props":3136,"children":3137},{"class":102,"line":1818},[3138,3143,3147],{"type":45,"tag":100,"props":3139,"children":3140},{"style":580},[3141],{"type":54,"value":3142},"  memory",{"type":45,"tag":100,"props":3144,"children":3145},{"style":574},[3146],{"type":54,"value":1656},{"type":45,"tag":100,"props":3148,"children":3149},{"style":558},[3150],{"type":54,"value":3151}," \u002F\u002F your Mastra memory store, e.g. @mastra\u002Fpg on env.postgres.databaseUrl\n",{"type":45,"tag":100,"props":3153,"children":3154},{"class":102,"line":1834},[3155,3159,3163],{"type":45,"tag":100,"props":3156,"children":3157},{"style":574},[3158],{"type":54,"value":713},{"type":45,"tag":100,"props":3160,"children":3161},{"style":580},[3162],{"type":54,"value":718},{"type":45,"tag":100,"props":3164,"children":3165},{"style":574},[3166],{"type":54,"value":613},{"type":45,"tag":167,"props":3168,"children":3170},{"id":3169},"use-with-plain-sdks-lower-level",[3171],{"type":54,"value":3172},"Use with Plain SDKs (Lower-Level)",{"type":45,"tag":46,"props":3174,"children":3175},{},[3176,3178,3183,3185,3190,3192,3197,3198,3203,3205,3209,3211,3216],{"type":54,"value":3177},"When you don't need an agent framework — a single completion, an existing provider-SDK integration, or native provider features — call the gateway with the plain SDKs. Neon injects the ",{"type":45,"tag":59,"props":3179,"children":3181},{"className":3180},[],[3182],{"type":54,"value":1166},{"type":54,"value":3184}," vars (not ",{"type":45,"tag":59,"props":3186,"children":3188},{"className":3187},[],[3189],{"type":54,"value":1198},{"type":54,"value":3191},"), so set the client's ",{"type":45,"tag":59,"props":3193,"children":3195},{"className":3194},[],[3196],{"type":54,"value":1182},{"type":54,"value":1184},{"type":45,"tag":59,"props":3199,"children":3201},{"className":3200},[],[3202],{"type":54,"value":1190},{"type":54,"value":3204}," from them. For the OpenAI ",{"type":45,"tag":50,"props":3206,"children":3207},{},[3208],{"type":54,"value":1275},{"type":54,"value":3210}," dialect (",{"type":45,"tag":59,"props":3212,"children":3214},{"className":3213},[],[3215],{"type":54,"value":1268},{"type":54,"value":3217},"):",{"type":45,"tag":89,"props":3219,"children":3221},{"className":546,"code":3220,"language":548,"meta":94,"style":94},"import OpenAI from \"openai\";\n\nconst client = new OpenAI({\n  apiKey: process.env.NEON_AI_GATEWAY_TOKEN,\n  baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1`,\n});\n\nconst res = await client.responses.create({\n  model: \"gpt-5-mini\", \u002F\u002F swap to claude-sonnet-4-6, gemini-2-5-flash, ...\n  input: \"What is Neon?\",\n});\n",[3222],{"type":45,"tag":59,"props":3223,"children":3224},{"__ignoreMap":94},[3225,3258,3265,3298,3336,3391,3406,3413,3464,3496,3525],{"type":45,"tag":100,"props":3226,"children":3227},{"class":102,"line":103},[3228,3232,3237,3241,3245,3250,3254],{"type":45,"tag":100,"props":3229,"children":3230},{"style":568},[3231],{"type":54,"value":571},{"type":45,"tag":100,"props":3233,"children":3234},{"style":580},[3235],{"type":54,"value":3236}," OpenAI ",{"type":45,"tag":100,"props":3238,"children":3239},{"style":568},[3240],{"type":54,"value":2623},{"type":45,"tag":100,"props":3242,"children":3243},{"style":574},[3244],{"type":54,"value":598},{"type":45,"tag":100,"props":3246,"children":3247},{"style":113},[3248],{"type":54,"value":3249},"openai",{"type":45,"tag":100,"props":3251,"children":3252},{"style":574},[3253],{"type":54,"value":608},{"type":45,"tag":100,"props":3255,"children":3256},{"style":574},[3257],{"type":54,"value":613},{"type":45,"tag":100,"props":3259,"children":3260},{"class":102,"line":564},[3261],{"type":45,"tag":100,"props":3262,"children":3263},{"emptyLinePlaceholder":620},[3264],{"type":54,"value":623},{"type":45,"tag":100,"props":3266,"children":3267},{"class":102,"line":616},[3268,3272,3277,3281,3285,3290,3294],{"type":45,"tag":100,"props":3269,"children":3270},{"style":1590},[3271],{"type":54,"value":1593},{"type":45,"tag":100,"props":3273,"children":3274},{"style":580},[3275],{"type":54,"value":3276}," client ",{"type":45,"tag":100,"props":3278,"children":3279},{"style":574},[3280],{"type":54,"value":1603},{"type":45,"tag":100,"props":3282,"children":3283},{"style":574},[3284],{"type":54,"value":3003},{"type":45,"tag":100,"props":3286,"children":3287},{"style":640},[3288],{"type":54,"value":3289}," OpenAI",{"type":45,"tag":100,"props":3291,"children":3292},{"style":580},[3293],{"type":54,"value":647},{"type":45,"tag":100,"props":3295,"children":3296},{"style":574},[3297],{"type":54,"value":652},{"type":45,"tag":100,"props":3299,"children":3300},{"class":102,"line":626},[3301,3306,3310,3315,3319,3324,3328,3332],{"type":45,"tag":100,"props":3302,"children":3303},{"style":659},[3304],{"type":54,"value":3305},"  apiKey",{"type":45,"tag":100,"props":3307,"children":3308},{"style":574},[3309],{"type":54,"value":543},{"type":45,"tag":100,"props":3311,"children":3312},{"style":580},[3313],{"type":54,"value":3314}," process",{"type":45,"tag":100,"props":3316,"children":3317},{"style":574},[3318],{"type":54,"value":155},{"type":45,"tag":100,"props":3320,"children":3321},{"style":580},[3322],{"type":54,"value":3323},"env",{"type":45,"tag":100,"props":3325,"children":3326},{"style":574},[3327],{"type":54,"value":155},{"type":45,"tag":100,"props":3329,"children":3330},{"style":580},[3331],{"type":54,"value":1044},{"type":45,"tag":100,"props":3333,"children":3334},{"style":574},[3335],{"type":54,"value":695},{"type":45,"tag":100,"props":3337,"children":3338},{"class":102,"line":655},[3339,3344,3348,3353,3358,3362,3366,3370,3374,3378,3382,3387],{"type":45,"tag":100,"props":3340,"children":3341},{"style":659},[3342],{"type":54,"value":3343},"  baseURL",{"type":45,"tag":100,"props":3345,"children":3346},{"style":574},[3347],{"type":54,"value":543},{"type":45,"tag":100,"props":3349,"children":3350},{"style":574},[3351],{"type":54,"value":3352}," `${",{"type":45,"tag":100,"props":3354,"children":3355},{"style":580},[3356],{"type":54,"value":3357},"process",{"type":45,"tag":100,"props":3359,"children":3360},{"style":574},[3361],{"type":54,"value":155},{"type":45,"tag":100,"props":3363,"children":3364},{"style":580},[3365],{"type":54,"value":3323},{"type":45,"tag":100,"props":3367,"children":3368},{"style":574},[3369],{"type":54,"value":155},{"type":45,"tag":100,"props":3371,"children":3372},{"style":580},[3373],{"type":54,"value":1068},{"type":45,"tag":100,"props":3375,"children":3376},{"style":574},[3377],{"type":54,"value":713},{"type":45,"tag":100,"props":3379,"children":3380},{"style":113},[3381],{"type":54,"value":1268},{"type":45,"tag":100,"props":3383,"children":3384},{"style":574},[3385],{"type":54,"value":3386},"`",{"type":45,"tag":100,"props":3388,"children":3389},{"style":574},[3390],{"type":54,"value":695},{"type":45,"tag":100,"props":3392,"children":3393},{"class":102,"line":674},[3394,3398,3402],{"type":45,"tag":100,"props":3395,"children":3396},{"style":574},[3397],{"type":54,"value":713},{"type":45,"tag":100,"props":3399,"children":3400},{"style":580},[3401],{"type":54,"value":718},{"type":45,"tag":100,"props":3403,"children":3404},{"style":574},[3405],{"type":54,"value":613},{"type":45,"tag":100,"props":3407,"children":3408},{"class":102,"line":698},[3409],{"type":45,"tag":100,"props":3410,"children":3411},{"emptyLinePlaceholder":620},[3412],{"type":54,"value":623},{"type":45,"tag":100,"props":3414,"children":3415},{"class":102,"line":707},[3416,3420,3425,3429,3433,3438,3442,3447,3451,3456,3460],{"type":45,"tag":100,"props":3417,"children":3418},{"style":1590},[3419],{"type":54,"value":1593},{"type":45,"tag":100,"props":3421,"children":3422},{"style":580},[3423],{"type":54,"value":3424}," res ",{"type":45,"tag":100,"props":3426,"children":3427},{"style":574},[3428],{"type":54,"value":1603},{"type":45,"tag":100,"props":3430,"children":3431},{"style":568},[3432],{"type":54,"value":1997},{"type":45,"tag":100,"props":3434,"children":3435},{"style":580},[3436],{"type":54,"value":3437}," client",{"type":45,"tag":100,"props":3439,"children":3440},{"style":574},[3441],{"type":54,"value":155},{"type":45,"tag":100,"props":3443,"children":3444},{"style":580},[3445],{"type":54,"value":3446},"responses",{"type":45,"tag":100,"props":3448,"children":3449},{"style":574},[3450],{"type":54,"value":155},{"type":45,"tag":100,"props":3452,"children":3453},{"style":640},[3454],{"type":54,"value":3455},"create",{"type":45,"tag":100,"props":3457,"children":3458},{"style":580},[3459],{"type":54,"value":647},{"type":45,"tag":100,"props":3461,"children":3462},{"style":574},[3463],{"type":54,"value":652},{"type":45,"tag":100,"props":3465,"children":3466},{"class":102,"line":1734},[3467,3471,3475,3479,3483,3487,3491],{"type":45,"tag":100,"props":3468,"children":3469},{"style":659},[3470],{"type":54,"value":1623},{"type":45,"tag":100,"props":3472,"children":3473},{"style":574},[3474],{"type":54,"value":543},{"type":45,"tag":100,"props":3476,"children":3477},{"style":574},[3478],{"type":54,"value":598},{"type":45,"tag":100,"props":3480,"children":3481},{"style":113},[3482],{"type":54,"value":268},{"type":45,"tag":100,"props":3484,"children":3485},{"style":574},[3486],{"type":54,"value":608},{"type":45,"tag":100,"props":3488,"children":3489},{"style":574},[3490],{"type":54,"value":1656},{"type":45,"tag":100,"props":3492,"children":3493},{"style":558},[3494],{"type":54,"value":3495}," \u002F\u002F swap to claude-sonnet-4-6, gemini-2-5-flash, ...\n",{"type":45,"tag":100,"props":3497,"children":3498},{"class":102,"line":1764},[3499,3504,3508,3512,3517,3521],{"type":45,"tag":100,"props":3500,"children":3501},{"style":659},[3502],{"type":54,"value":3503},"  input",{"type":45,"tag":100,"props":3505,"children":3506},{"style":574},[3507],{"type":54,"value":543},{"type":45,"tag":100,"props":3509,"children":3510},{"style":574},[3511],{"type":54,"value":598},{"type":45,"tag":100,"props":3513,"children":3514},{"style":113},[3515],{"type":54,"value":3516},"What is Neon?",{"type":45,"tag":100,"props":3518,"children":3519},{"style":574},[3520],{"type":54,"value":608},{"type":45,"tag":100,"props":3522,"children":3523},{"style":574},[3524],{"type":54,"value":695},{"type":45,"tag":100,"props":3526,"children":3527},{"class":102,"line":1794},[3528,3532,3536],{"type":45,"tag":100,"props":3529,"children":3530},{"style":574},[3531],{"type":54,"value":713},{"type":45,"tag":100,"props":3533,"children":3534},{"style":580},[3535],{"type":54,"value":718},{"type":45,"tag":100,"props":3537,"children":3538},{"style":574},[3539],{"type":54,"value":613},{"type":45,"tag":46,"props":3541,"children":3542},{},[3543,3545,3550,3552,3557,3559,3564],{"type":54,"value":3544},"For the unified ",{"type":45,"tag":50,"props":3546,"children":3547},{},[3548],{"type":54,"value":3549},"chat-completions",{"type":54,"value":3551}," dialect, point ",{"type":45,"tag":59,"props":3553,"children":3555},{"className":3554},[],[3556],{"type":54,"value":1190},{"type":54,"value":3558}," at ",{"type":45,"tag":59,"props":3560,"children":3562},{"className":3561},[],[3563],{"type":54,"value":1243},{"type":54,"value":3565}," instead:",{"type":45,"tag":89,"props":3567,"children":3569},{"className":546,"code":3568,"language":548,"meta":94,"style":94},"const client = new OpenAI({\n  apiKey: process.env.NEON_AI_GATEWAY_TOKEN,\n  baseURL: `${process.env.NEON_AI_GATEWAY_BASE_URL}\u002Fv1`,\n});\n\nconst res = await client.chat.completions.create({\n  model: \"claude-sonnet-4-6\",\n  messages: [{ role: \"user\", content: \"What is Neon?\" }],\n});\n",[3570],{"type":45,"tag":59,"props":3571,"children":3572},{"__ignoreMap":94},[3573,3604,3639,3690,3705,3712,3769,3796,3877],{"type":45,"tag":100,"props":3574,"children":3575},{"class":102,"line":103},[3576,3580,3584,3588,3592,3596,3600],{"type":45,"tag":100,"props":3577,"children":3578},{"style":1590},[3579],{"type":54,"value":1593},{"type":45,"tag":100,"props":3581,"children":3582},{"style":580},[3583],{"type":54,"value":3276},{"type":45,"tag":100,"props":3585,"children":3586},{"style":574},[3587],{"type":54,"value":1603},{"type":45,"tag":100,"props":3589,"children":3590},{"style":574},[3591],{"type":54,"value":3003},{"type":45,"tag":100,"props":3593,"children":3594},{"style":640},[3595],{"type":54,"value":3289},{"type":45,"tag":100,"props":3597,"children":3598},{"style":580},[3599],{"type":54,"value":647},{"type":45,"tag":100,"props":3601,"children":3602},{"style":574},[3603],{"type":54,"value":652},{"type":45,"tag":100,"props":3605,"children":3606},{"class":102,"line":564},[3607,3611,3615,3619,3623,3627,3631,3635],{"type":45,"tag":100,"props":3608,"children":3609},{"style":659},[3610],{"type":54,"value":3305},{"type":45,"tag":100,"props":3612,"children":3613},{"style":574},[3614],{"type":54,"value":543},{"type":45,"tag":100,"props":3616,"children":3617},{"style":580},[3618],{"type":54,"value":3314},{"type":45,"tag":100,"props":3620,"children":3621},{"style":574},[3622],{"type":54,"value":155},{"type":45,"tag":100,"props":3624,"children":3625},{"style":580},[3626],{"type":54,"value":3323},{"type":45,"tag":100,"props":3628,"children":3629},{"style":574},[3630],{"type":54,"value":155},{"type":45,"tag":100,"props":3632,"children":3633},{"style":580},[3634],{"type":54,"value":1044},{"type":45,"tag":100,"props":3636,"children":3637},{"style":574},[3638],{"type":54,"value":695},{"type":45,"tag":100,"props":3640,"children":3641},{"class":102,"line":616},[3642,3646,3650,3654,3658,3662,3666,3670,3674,3678,3682,3686],{"type":45,"tag":100,"props":3643,"children":3644},{"style":659},[3645],{"type":54,"value":3343},{"type":45,"tag":100,"props":3647,"children":3648},{"style":574},[3649],{"type":54,"value":543},{"type":45,"tag":100,"props":3651,"children":3652},{"style":574},[3653],{"type":54,"value":3352},{"type":45,"tag":100,"props":3655,"children":3656},{"style":580},[3657],{"type":54,"value":3357},{"type":45,"tag":100,"props":3659,"children":3660},{"style":574},[3661],{"type":54,"value":155},{"type":45,"tag":100,"props":3663,"children":3664},{"style":580},[3665],{"type":54,"value":3323},{"type":45,"tag":100,"props":3667,"children":3668},{"style":574},[3669],{"type":54,"value":155},{"type":45,"tag":100,"props":3671,"children":3672},{"style":580},[3673],{"type":54,"value":1068},{"type":45,"tag":100,"props":3675,"children":3676},{"style":574},[3677],{"type":54,"value":713},{"type":45,"tag":100,"props":3679,"children":3680},{"style":113},[3681],{"type":54,"value":1243},{"type":45,"tag":100,"props":3683,"children":3684},{"style":574},[3685],{"type":54,"value":3386},{"type":45,"tag":100,"props":3687,"children":3688},{"style":574},[3689],{"type":54,"value":695},{"type":45,"tag":100,"props":3691,"children":3692},{"class":102,"line":626},[3693,3697,3701],{"type":45,"tag":100,"props":3694,"children":3695},{"style":574},[3696],{"type":54,"value":713},{"type":45,"tag":100,"props":3698,"children":3699},{"style":580},[3700],{"type":54,"value":718},{"type":45,"tag":100,"props":3702,"children":3703},{"style":574},[3704],{"type":54,"value":613},{"type":45,"tag":100,"props":3706,"children":3707},{"class":102,"line":655},[3708],{"type":45,"tag":100,"props":3709,"children":3710},{"emptyLinePlaceholder":620},[3711],{"type":54,"value":623},{"type":45,"tag":100,"props":3713,"children":3714},{"class":102,"line":674},[3715,3719,3723,3727,3731,3735,3739,3744,3748,3753,3757,3761,3765],{"type":45,"tag":100,"props":3716,"children":3717},{"style":1590},[3718],{"type":54,"value":1593},{"type":45,"tag":100,"props":3720,"children":3721},{"style":580},[3722],{"type":54,"value":3424},{"type":45,"tag":100,"props":3724,"children":3725},{"style":574},[3726],{"type":54,"value":1603},{"type":45,"tag":100,"props":3728,"children":3729},{"style":568},[3730],{"type":54,"value":1997},{"type":45,"tag":100,"props":3732,"children":3733},{"style":580},[3734],{"type":54,"value":3437},{"type":45,"tag":100,"props":3736,"children":3737},{"style":574},[3738],{"type":54,"value":155},{"type":45,"tag":100,"props":3740,"children":3741},{"style":580},[3742],{"type":54,"value":3743},"chat",{"type":45,"tag":100,"props":3745,"children":3746},{"style":574},[3747],{"type":54,"value":155},{"type":45,"tag":100,"props":3749,"children":3750},{"style":580},[3751],{"type":54,"value":3752},"completions",{"type":45,"tag":100,"props":3754,"children":3755},{"style":574},[3756],{"type":54,"value":155},{"type":45,"tag":100,"props":3758,"children":3759},{"style":640},[3760],{"type":54,"value":3455},{"type":45,"tag":100,"props":3762,"children":3763},{"style":580},[3764],{"type":54,"value":647},{"type":45,"tag":100,"props":3766,"children":3767},{"style":574},[3768],{"type":54,"value":652},{"type":45,"tag":100,"props":3770,"children":3771},{"class":102,"line":698},[3772,3776,3780,3784,3788,3792],{"type":45,"tag":100,"props":3773,"children":3774},{"style":659},[3775],{"type":54,"value":1623},{"type":45,"tag":100,"props":3777,"children":3778},{"style":574},[3779],{"type":54,"value":543},{"type":45,"tag":100,"props":3781,"children":3782},{"style":574},[3783],{"type":54,"value":598},{"type":45,"tag":100,"props":3785,"children":3786},{"style":113},[3787],{"type":54,"value":260},{"type":45,"tag":100,"props":3789,"children":3790},{"style":574},[3791],{"type":54,"value":608},{"type":45,"tag":100,"props":3793,"children":3794},{"style":574},[3795],{"type":54,"value":695},{"type":45,"tag":100,"props":3797,"children":3798},{"class":102,"line":707},[3799,3803,3807,3812,3817,3822,3826,3830,3835,3839,3843,3848,3852,3856,3860,3864,3868,3873],{"type":45,"tag":100,"props":3800,"children":3801},{"style":659},[3802],{"type":54,"value":1669},{"type":45,"tag":100,"props":3804,"children":3805},{"style":574},[3806],{"type":54,"value":543},{"type":45,"tag":100,"props":3808,"children":3809},{"style":580},[3810],{"type":54,"value":3811}," [",{"type":45,"tag":100,"props":3813,"children":3814},{"style":574},[3815],{"type":54,"value":3816},"{",{"type":45,"tag":100,"props":3818,"children":3819},{"style":659},[3820],{"type":54,"value":3821}," role",{"type":45,"tag":100,"props":3823,"children":3824},{"style":574},[3825],{"type":54,"value":543},{"type":45,"tag":100,"props":3827,"children":3828},{"style":574},[3829],{"type":54,"value":598},{"type":45,"tag":100,"props":3831,"children":3832},{"style":113},[3833],{"type":54,"value":3834},"user",{"type":45,"tag":100,"props":3836,"children":3837},{"style":574},[3838],{"type":54,"value":608},{"type":45,"tag":100,"props":3840,"children":3841},{"style":574},[3842],{"type":54,"value":1656},{"type":45,"tag":100,"props":3844,"children":3845},{"style":659},[3846],{"type":54,"value":3847}," content",{"type":45,"tag":100,"props":3849,"children":3850},{"style":574},[3851],{"type":54,"value":543},{"type":45,"tag":100,"props":3853,"children":3854},{"style":574},[3855],{"type":54,"value":598},{"type":45,"tag":100,"props":3857,"children":3858},{"style":113},[3859],{"type":54,"value":3516},{"type":45,"tag":100,"props":3861,"children":3862},{"style":574},[3863],{"type":54,"value":608},{"type":45,"tag":100,"props":3865,"children":3866},{"style":574},[3867],{"type":54,"value":588},{"type":45,"tag":100,"props":3869,"children":3870},{"style":580},[3871],{"type":54,"value":3872},"]",{"type":45,"tag":100,"props":3874,"children":3875},{"style":574},[3876],{"type":54,"value":695},{"type":45,"tag":100,"props":3878,"children":3879},{"class":102,"line":1734},[3880,3884,3888],{"type":45,"tag":100,"props":3881,"children":3882},{"style":574},[3883],{"type":54,"value":713},{"type":45,"tag":100,"props":3885,"children":3886},{"style":580},[3887],{"type":54,"value":718},{"type":45,"tag":100,"props":3889,"children":3890},{"style":574},[3891],{"type":54,"value":613},{"type":45,"tag":46,"props":3893,"children":3894},{},[3895,3897,3903,3905,3910,3912,3918,3920,3925],{"type":54,"value":3896},"The Anthropic SDK and google-genai work the same way for native provider features — point the Anthropic SDK at ",{"type":45,"tag":59,"props":3898,"children":3900},{"className":3899},[],[3901],{"type":54,"value":3902},"${NEON_AI_GATEWAY_BASE_URL}\u002Fanthropic\u002Fv1",{"type":54,"value":3904}," (mirrors the real Anthropic API path, so ",{"type":45,"tag":59,"props":3906,"children":3908},{"className":3907},[],[3909],{"type":54,"value":1324},{"type":54,"value":3911},") and google-genai at ",{"type":45,"tag":59,"props":3913,"children":3915},{"className":3914},[],[3916],{"type":54,"value":3917},"${NEON_AI_GATEWAY_BASE_URL}\u002Fai-gateway\u002Fgemini",{"type":54,"value":3919}," (Gemini is still served under the legacy ",{"type":45,"tag":59,"props":3921,"children":3923},{"className":3922},[],[3924],{"type":54,"value":1350},{"type":54,"value":1352},{"type":45,"tag":167,"props":3927,"children":3929},{"id":3928},"model-identifiers",[3930],{"type":54,"value":3931},"Model Identifiers",{"type":45,"tag":46,"props":3933,"children":3934},{},[3935,3937,3942,3944,3949,3950,3955,3956,3961],{"type":54,"value":3936},"Use a model's catalog ID directly in the ",{"type":45,"tag":59,"props":3938,"children":3940},{"className":3939},[],[3941],{"type":54,"value":208},{"type":54,"value":3943}," field — e.g. ",{"type":45,"tag":59,"props":3945,"children":3947},{"className":3946},[],[3948],{"type":54,"value":260},{"type":54,"value":262},{"type":45,"tag":59,"props":3951,"children":3953},{"className":3952},[],[3954],{"type":54,"value":268},{"type":54,"value":262},{"type":45,"tag":59,"props":3957,"children":3959},{"className":3958},[],[3960],{"type":54,"value":275},{"type":54,"value":3962},". No provider prefix is needed. To look up the exact identifiers the gateway serves, which underlying model each maps to, and their context windows, pricing, and capabilities, use any of:",{"type":45,"tag":179,"props":3964,"children":3965},{},[3966,3997],{"type":45,"tag":183,"props":3967,"children":3968},{},[3969,3980,3982,3988,3990,3995],{"type":45,"tag":50,"props":3970,"children":3971},{},[3972,3974],{"type":54,"value":3973},"models.dev Neon provider page: ",{"type":45,"tag":79,"props":3975,"children":3978},{"href":3976,"rel":3977},"https:\u002F\u002Fmodels.dev\u002Fproviders\u002Fneon",[83],[3979],{"type":54,"value":3976},{"type":54,"value":3981}," — the canonical, always-current list of the Neon provider's model IDs and their underlying models. The machine-readable catalog is at ",{"type":45,"tag":79,"props":3983,"children":3986},{"href":3984,"rel":3985},"https:\u002F\u002Fmodels.dev\u002Fapi.json",[83],[3987],{"type":54,"value":3984},{"type":54,"value":3989}," (the ",{"type":45,"tag":59,"props":3991,"children":3993},{"className":3992},[],[3994],{"type":54,"value":8},{"type":54,"value":3996}," key).",{"type":45,"tag":183,"props":3998,"children":3999},{},[4000,4005],{"type":45,"tag":50,"props":4001,"children":4002},{},[4003],{"type":54,"value":4004},"Models doc:",{"type":54,"value":4006}," see Further Reading.",{"type":45,"tag":167,"props":4008,"children":4010},{"id":4009},"list-available-models-at-runtime-v1models",[4011,4013,4018],{"type":54,"value":4012},"List Available Models at Runtime (",{"type":45,"tag":59,"props":4014,"children":4016},{"className":4015},[],[4017],{"type":54,"value":489},{"type":54,"value":718},{"type":45,"tag":46,"props":4020,"children":4021},{},[4022,4024,4029,4031,4036,4037,4042],{"type":54,"value":4023},"The gateway also exposes the model catalog ",{"type":45,"tag":50,"props":4025,"children":4026},{},[4027],{"type":54,"value":4028},"live from your own branch endpoint",{"type":54,"value":4030},", so an app or agent can discover exactly which models this branch serves without hard-coding the list. It is an OpenAI-compatible list endpoint, served ",{"type":45,"tag":50,"props":4032,"children":4033},{},[4034],{"type":54,"value":4035},"only on the unified dialect",{"type":54,"value":1078},{"type":45,"tag":59,"props":4038,"children":4040},{"className":4039},[],[4041],{"type":54,"value":1243},{"type":54,"value":3217},{"type":45,"tag":89,"props":4044,"children":4046},{"className":91,"code":4045,"language":93,"meta":94,"style":94},"curl \"$NEON_AI_GATEWAY_BASE_URL\u002Fv1\u002Fmodels\" \\\n  -H \"Authorization: Bearer $NEON_AI_GATEWAY_TOKEN\"\n",[4047],{"type":45,"tag":59,"props":4048,"children":4049},{"__ignoreMap":94},[4050,4080],{"type":45,"tag":100,"props":4051,"children":4052},{"class":102,"line":103},[4053,4058,4062,4067,4071,4075],{"type":45,"tag":100,"props":4054,"children":4055},{"style":107},[4056],{"type":54,"value":4057},"curl",{"type":45,"tag":100,"props":4059,"children":4060},{"style":574},[4061],{"type":54,"value":598},{"type":45,"tag":100,"props":4063,"children":4064},{"style":580},[4065],{"type":54,"value":4066},"$NEON_AI_GATEWAY_BASE_URL",{"type":45,"tag":100,"props":4068,"children":4069},{"style":113},[4070],{"type":54,"value":489},{"type":45,"tag":100,"props":4072,"children":4073},{"style":574},[4074],{"type":54,"value":608},{"type":45,"tag":100,"props":4076,"children":4077},{"style":580},[4078],{"type":54,"value":4079}," \\\n",{"type":45,"tag":100,"props":4081,"children":4082},{"class":102,"line":564},[4083,4088,4092,4097,4102],{"type":45,"tag":100,"props":4084,"children":4085},{"style":113},[4086],{"type":54,"value":4087},"  -H",{"type":45,"tag":100,"props":4089,"children":4090},{"style":574},[4091],{"type":54,"value":598},{"type":45,"tag":100,"props":4093,"children":4094},{"style":113},[4095],{"type":54,"value":4096},"Authorization: Bearer ",{"type":45,"tag":100,"props":4098,"children":4099},{"style":580},[4100],{"type":54,"value":4101},"$NEON_AI_GATEWAY_TOKEN",{"type":45,"tag":100,"props":4103,"children":4104},{"style":574},[4105],{"type":54,"value":4106},"\"\n",{"type":45,"tag":179,"props":4108,"children":4109},{},[4110,4126],{"type":45,"tag":183,"props":4111,"children":4112},{},[4113,4119,4121],{"type":45,"tag":59,"props":4114,"children":4116},{"className":4115},[],[4117],{"type":54,"value":4118},"GET ${NEON_AI_GATEWAY_BASE_URL}\u002Fv1\u002Fmodels",{"type":54,"value":4120}," → ",{"type":45,"tag":50,"props":4122,"children":4123},{},[4124],{"type":54,"value":4125},"200",{"type":45,"tag":183,"props":4127,"children":4128},{},[4129,4135,4136,4141,4143,4148],{"type":45,"tag":59,"props":4130,"children":4132},{"className":4131},[],[4133],{"type":54,"value":4134},"GET ${NEON_AI_GATEWAY_BASE_URL}\u002Fopenai\u002Fv1\u002Fmodels",{"type":54,"value":4120},{"type":45,"tag":50,"props":4137,"children":4138},{},[4139],{"type":54,"value":4140},"404",{"type":54,"value":4142}," (not served on the Responses dialect — use ",{"type":45,"tag":59,"props":4144,"children":4146},{"className":4145},[],[4147],{"type":54,"value":1243},{"type":54,"value":718},{"type":45,"tag":46,"props":4150,"children":4151},{},[4152,4157],{"type":45,"tag":50,"props":4153,"children":4154},{},[4155],{"type":54,"value":4156},"Getting the credentials for the request.",{"type":54,"value":4158}," Both values come from the same branch-scoped Neon credential the gateway uses everywhere else — you never manage a provider key:",{"type":45,"tag":179,"props":4160,"children":4161},{},[4162,4252,4302],{"type":45,"tag":183,"props":4163,"children":4164},{},[4165,4177,4179,4184,4186,4191,4193,4198,4200,4205,4207,4213,4214,4219,4221,4226,4227,4232,4234,4239,4241,4245,4246,4250],{"type":45,"tag":50,"props":4166,"children":4167},{},[4168,4170,4175],{"type":54,"value":4169},"Provision via ",{"type":45,"tag":59,"props":4171,"children":4173},{"className":4172},[],[4174],{"type":54,"value":520},{"type":54,"value":4176}," (recommended).",{"type":54,"value":4178}," Enable ",{"type":45,"tag":59,"props":4180,"children":4182},{"className":4181},[],[4183],{"type":54,"value":397},{"type":54,"value":4185}," in ",{"type":45,"tag":59,"props":4187,"children":4189},{"className":4188},[],[4190],{"type":54,"value":520},{"type":54,"value":4192}," and run ",{"type":45,"tag":59,"props":4194,"children":4196},{"className":4195},[],[4197],{"type":54,"value":902},{"type":54,"value":4199}," (or ",{"type":45,"tag":59,"props":4201,"children":4203},{"className":4202},[],[4204],{"type":54,"value":367},{"type":54,"value":4206},"). Provisioning, ",{"type":45,"tag":59,"props":4208,"children":4210},{"className":4209},[],[4211],{"type":54,"value":4212},"neon link",{"type":54,"value":926},{"type":45,"tag":59,"props":4215,"children":4217},{"className":4216},[],[4218],{"type":54,"value":383},{"type":54,"value":4220}," pull ",{"type":45,"tag":59,"props":4222,"children":4224},{"className":4223},[],[4225],{"type":54,"value":1044},{"type":54,"value":1184},{"type":45,"tag":59,"props":4228,"children":4230},{"className":4229},[],[4231],{"type":54,"value":1068},{"type":54,"value":4233}," into your local ",{"type":45,"tag":59,"props":4235,"children":4237},{"className":4236},[],[4238],{"type":54,"value":939},{"type":54,"value":4240},"; inside a deployed Neon Function they're injected automatically. See ",{"type":45,"tag":50,"props":4242,"children":4243},{},[4244],{"type":54,"value":509},{"type":54,"value":377},{"type":45,"tag":50,"props":4247,"children":4248},{},[4249],{"type":54,"value":955},{"type":54,"value":4251}," above.",{"type":45,"tag":183,"props":4253,"children":4254},{},[4255,4260,4261,4266,4268,4273,4274,4279,4281,4286,4288,4293,4295,4300],{"type":45,"tag":50,"props":4256,"children":4257},{},[4258],{"type":54,"value":4259},"Pull into the environment via CLI.",{"type":54,"value":361},{"type":45,"tag":59,"props":4262,"children":4264},{"className":4263},[],[4265],{"type":54,"value":412},{"type":54,"value":4267}," writes the two vars to ",{"type":45,"tag":59,"props":4269,"children":4271},{"className":4270},[],[4272],{"type":54,"value":987},{"type":54,"value":989},{"type":45,"tag":59,"props":4275,"children":4277},{"className":4276},[],[4278],{"type":54,"value":939},{"type":54,"value":4280},", or ",{"type":45,"tag":59,"props":4282,"children":4284},{"className":4283},[],[4285],{"type":54,"value":1002},{"type":54,"value":4287}," injects them at runtime without a file — but only when ",{"type":45,"tag":59,"props":4289,"children":4291},{"className":4290},[],[4292],{"type":54,"value":520},{"type":54,"value":4294}," declares ",{"type":45,"tag":59,"props":4296,"children":4298},{"className":4297},[],[4299],{"type":54,"value":397},{"type":54,"value":4301},"; the vars are never pulled off branch state alone.",{"type":45,"tag":183,"props":4303,"children":4304},{},[4305,4310],{"type":45,"tag":50,"props":4306,"children":4307},{},[4308],{"type":54,"value":4309},"Provision via the Console UI.",{"type":54,"value":4311}," Enable the AI Gateway on the branch in the Neon Console and copy the branch's gateway base URL and a Neon credential (token) from the project's connection\u002Fcredentials view.",{"type":45,"tag":46,"props":4313,"children":4314},{},[4315,4317,4322,4324,4329],{"type":54,"value":4316},"Any Neon credential (",{"type":45,"tag":59,"props":4318,"children":4320},{"className":4319},[],[4321],{"type":54,"value":1055},{"type":54,"value":4323},") valid for the branch works as the bearer token; ",{"type":45,"tag":59,"props":4325,"children":4327},{"className":4326},[],[4328],{"type":54,"value":1068},{"type":54,"value":4330}," is the bare branch host (no path).",{"type":45,"tag":46,"props":4332,"children":4333},{},[4334,4339],{"type":45,"tag":50,"props":4335,"children":4336},{},[4337],{"type":54,"value":4338},"Response shape",{"type":54,"value":4340}," — OpenAI\u002FOpenRouter-compatible list:",{"type":45,"tag":89,"props":4342,"children":4346},{"className":4343,"code":4344,"language":4345,"meta":94,"style":94},"language-jsonc shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"object\": \"list\",\n  \"data\": [\n    {\n      \"id\": \"claude-sonnet-4-6\",              \u002F\u002F catalog model ID — use directly in the `model` field\n      \"canonical_slug\": \"claude-sonnet-4-6\",\n      \"name\": \"Claude Sonnet 4.6\",            \u002F\u002F human-readable display name\n      \"object\": \"model\",\n      \"owned_by\": \"anthropic\",                \u002F\u002F anthropic | openai | google | meta | alibaba | databricks\n      \"created\": 0,\n      \"enabled\": true,\n      \"context_length\": null,\n      \"architecture\": {\n        \"modality\": \"text->text\",\n        \"input_modalities\": [\"text\"],\n        \"output_modalities\": [\"text\"],\n        \"tokenizer\": \"Claude\",                \u002F\u002F Claude | Gemini | GPT | \"\" (empty for open-source)\n        \"instruct_type\": null\n      },\n      \"top_provider\": {\n        \"is_moderated\": false,\n        \"context_length\": null,\n        \"max_completion_tokens\": null\n      },\n      \"pricing\": null,\n      \"per_request_limits\": null\n    }\n    \u002F\u002F ... one entry per model in the branch's catalog\n  ]\n}\n","jsonc",[4347],{"type":45,"tag":59,"props":4348,"children":4349},{"__ignoreMap":94},[4350,4357,4365,4373,4381,4394,4402,4415,4423,4436,4444,4452,4460,4468,4476,4484,4492,4506,4515,4524,4533,4542,4551,4560,4568,4577,4586,4595,4604,4613],{"type":45,"tag":100,"props":4351,"children":4352},{"class":102,"line":103},[4353],{"type":45,"tag":100,"props":4354,"children":4355},{},[4356],{"type":54,"value":652},{"type":45,"tag":100,"props":4358,"children":4359},{"class":102,"line":564},[4360],{"type":45,"tag":100,"props":4361,"children":4362},{},[4363],{"type":54,"value":4364},"  \"object\": \"list\",\n",{"type":45,"tag":100,"props":4366,"children":4367},{"class":102,"line":616},[4368],{"type":45,"tag":100,"props":4369,"children":4370},{},[4371],{"type":54,"value":4372},"  \"data\": [\n",{"type":45,"tag":100,"props":4374,"children":4375},{"class":102,"line":626},[4376],{"type":45,"tag":100,"props":4377,"children":4378},{},[4379],{"type":54,"value":4380},"    {\n",{"type":45,"tag":100,"props":4382,"children":4383},{"class":102,"line":655},[4384,4389],{"type":45,"tag":100,"props":4385,"children":4386},{},[4387],{"type":54,"value":4388},"      \"id\": \"claude-sonnet-4-6\",",{"type":45,"tag":100,"props":4390,"children":4391},{},[4392],{"type":54,"value":4393},"              \u002F\u002F catalog model ID — use directly in the `model` field\n",{"type":45,"tag":100,"props":4395,"children":4396},{"class":102,"line":674},[4397],{"type":45,"tag":100,"props":4398,"children":4399},{},[4400],{"type":54,"value":4401},"      \"canonical_slug\": \"claude-sonnet-4-6\",\n",{"type":45,"tag":100,"props":4403,"children":4404},{"class":102,"line":698},[4405,4410],{"type":45,"tag":100,"props":4406,"children":4407},{},[4408],{"type":54,"value":4409},"      \"name\": \"Claude Sonnet 4.6\",",{"type":45,"tag":100,"props":4411,"children":4412},{},[4413],{"type":54,"value":4414},"            \u002F\u002F human-readable display name\n",{"type":45,"tag":100,"props":4416,"children":4417},{"class":102,"line":707},[4418],{"type":45,"tag":100,"props":4419,"children":4420},{},[4421],{"type":54,"value":4422},"      \"object\": \"model\",\n",{"type":45,"tag":100,"props":4424,"children":4425},{"class":102,"line":1734},[4426,4431],{"type":45,"tag":100,"props":4427,"children":4428},{},[4429],{"type":54,"value":4430},"      \"owned_by\": \"anthropic\",",{"type":45,"tag":100,"props":4432,"children":4433},{},[4434],{"type":54,"value":4435},"                \u002F\u002F anthropic | openai | google | meta | alibaba | databricks\n",{"type":45,"tag":100,"props":4437,"children":4438},{"class":102,"line":1764},[4439],{"type":45,"tag":100,"props":4440,"children":4441},{},[4442],{"type":54,"value":4443},"      \"created\": 0,\n",{"type":45,"tag":100,"props":4445,"children":4446},{"class":102,"line":1794},[4447],{"type":45,"tag":100,"props":4448,"children":4449},{},[4450],{"type":54,"value":4451},"      \"enabled\": true,\n",{"type":45,"tag":100,"props":4453,"children":4454},{"class":102,"line":31},[4455],{"type":45,"tag":100,"props":4456,"children":4457},{},[4458],{"type":54,"value":4459},"      \"context_length\": null,\n",{"type":45,"tag":100,"props":4461,"children":4462},{"class":102,"line":1818},[4463],{"type":45,"tag":100,"props":4464,"children":4465},{},[4466],{"type":54,"value":4467},"      \"architecture\": {\n",{"type":45,"tag":100,"props":4469,"children":4470},{"class":102,"line":1834},[4471],{"type":45,"tag":100,"props":4472,"children":4473},{},[4474],{"type":54,"value":4475},"        \"modality\": \"text->text\",\n",{"type":45,"tag":100,"props":4477,"children":4478},{"class":102,"line":2657},[4479],{"type":45,"tag":100,"props":4480,"children":4481},{},[4482],{"type":54,"value":4483},"        \"input_modalities\": [\"text\"],\n",{"type":45,"tag":100,"props":4485,"children":4486},{"class":102,"line":2697},[4487],{"type":45,"tag":100,"props":4488,"children":4489},{},[4490],{"type":54,"value":4491},"        \"output_modalities\": [\"text\"],\n",{"type":45,"tag":100,"props":4493,"children":4495},{"class":102,"line":4494},17,[4496,4501],{"type":45,"tag":100,"props":4497,"children":4498},{},[4499],{"type":54,"value":4500},"        \"tokenizer\": \"Claude\",",{"type":45,"tag":100,"props":4502,"children":4503},{},[4504],{"type":54,"value":4505},"                \u002F\u002F Claude | Gemini | GPT | \"\" (empty for open-source)\n",{"type":45,"tag":100,"props":4507,"children":4509},{"class":102,"line":4508},18,[4510],{"type":45,"tag":100,"props":4511,"children":4512},{},[4513],{"type":54,"value":4514},"        \"instruct_type\": null\n",{"type":45,"tag":100,"props":4516,"children":4518},{"class":102,"line":4517},19,[4519],{"type":45,"tag":100,"props":4520,"children":4521},{},[4522],{"type":54,"value":4523},"      },\n",{"type":45,"tag":100,"props":4525,"children":4527},{"class":102,"line":4526},20,[4528],{"type":45,"tag":100,"props":4529,"children":4530},{},[4531],{"type":54,"value":4532},"      \"top_provider\": {\n",{"type":45,"tag":100,"props":4534,"children":4536},{"class":102,"line":4535},21,[4537],{"type":45,"tag":100,"props":4538,"children":4539},{},[4540],{"type":54,"value":4541},"        \"is_moderated\": false,\n",{"type":45,"tag":100,"props":4543,"children":4545},{"class":102,"line":4544},22,[4546],{"type":45,"tag":100,"props":4547,"children":4548},{},[4549],{"type":54,"value":4550},"        \"context_length\": null,\n",{"type":45,"tag":100,"props":4552,"children":4554},{"class":102,"line":4553},23,[4555],{"type":45,"tag":100,"props":4556,"children":4557},{},[4558],{"type":54,"value":4559},"        \"max_completion_tokens\": null\n",{"type":45,"tag":100,"props":4561,"children":4563},{"class":102,"line":4562},24,[4564],{"type":45,"tag":100,"props":4565,"children":4566},{},[4567],{"type":54,"value":4523},{"type":45,"tag":100,"props":4569,"children":4571},{"class":102,"line":4570},25,[4572],{"type":45,"tag":100,"props":4573,"children":4574},{},[4575],{"type":54,"value":4576},"      \"pricing\": null,\n",{"type":45,"tag":100,"props":4578,"children":4580},{"class":102,"line":4579},26,[4581],{"type":45,"tag":100,"props":4582,"children":4583},{},[4584],{"type":54,"value":4585},"      \"per_request_limits\": null\n",{"type":45,"tag":100,"props":4587,"children":4589},{"class":102,"line":4588},27,[4590],{"type":45,"tag":100,"props":4591,"children":4592},{},[4593],{"type":54,"value":4594},"    }\n",{"type":45,"tag":100,"props":4596,"children":4598},{"class":102,"line":4597},28,[4599],{"type":45,"tag":100,"props":4600,"children":4601},{},[4602],{"type":54,"value":4603},"    \u002F\u002F ... one entry per model in the branch's catalog\n",{"type":45,"tag":100,"props":4605,"children":4607},{"class":102,"line":4606},29,[4608],{"type":45,"tag":100,"props":4609,"children":4610},{},[4611],{"type":54,"value":4612},"  ]\n",{"type":45,"tag":100,"props":4614,"children":4616},{"class":102,"line":4615},30,[4617],{"type":45,"tag":100,"props":4618,"children":4619},{},[4620],{"type":54,"value":4621},"}\n",{"type":45,"tag":1108,"props":4623,"children":4624},{},[4625],{"type":45,"tag":46,"props":4626,"children":4627},{},[4628,4630,4636,4637,4643,4644,4650,4652,4658,4659,4665,4667,4673,4675,4680,4682,4687],{"type":54,"value":4629},"Note: ",{"type":45,"tag":59,"props":4631,"children":4633},{"className":4632},[],[4634],{"type":54,"value":4635},"context_length",{"type":54,"value":262},{"type":45,"tag":59,"props":4638,"children":4640},{"className":4639},[],[4641],{"type":54,"value":4642},"pricing",{"type":54,"value":926},{"type":45,"tag":59,"props":4645,"children":4647},{"className":4646},[],[4648],{"type":54,"value":4649},"per_request_limits",{"type":54,"value":4651}," are currently ",{"type":45,"tag":59,"props":4653,"children":4655},{"className":4654},[],[4656],{"type":54,"value":4657},"null",{"type":54,"value":377},{"type":45,"tag":59,"props":4660,"children":4662},{"className":4661},[],[4663],{"type":54,"value":4664},"created",{"type":54,"value":4666}," is ",{"type":45,"tag":59,"props":4668,"children":4670},{"className":4669},[],[4671],{"type":54,"value":4672},"0",{"type":54,"value":4674}," for every entry — for context windows, pricing, and capabilities use the models.dev catalog above. Use ",{"type":45,"tag":59,"props":4676,"children":4678},{"className":4677},[],[4679],{"type":54,"value":489},{"type":54,"value":4681}," when you need the live, branch-scoped list of servable model IDs (e.g. to populate a model picker or validate a ",{"type":45,"tag":59,"props":4683,"children":4685},{"className":4684},[],[4686],{"type":54,"value":208},{"type":54,"value":4688}," before a request).",{"type":45,"tag":167,"props":4690,"children":4692},{"id":4691},"neon-documentation",[4693],{"type":54,"value":4694},"Neon Documentation",{"type":45,"tag":46,"props":4696,"children":4697},{},[4698,4700,4706,4708,4714,4716,4722],{"type":54,"value":4699},"The Neon documentation is the source of truth and the AI Gateway is evolving rapidly, so always verify against the official docs. Any doc page can be fetched as markdown by appending ",{"type":45,"tag":59,"props":4701,"children":4703},{"className":4702},[],[4704],{"type":54,"value":4705},".md",{"type":54,"value":4707}," to the URL or by requesting ",{"type":45,"tag":59,"props":4709,"children":4711},{"className":4710},[],[4712],{"type":54,"value":4713},"Accept: text\u002Fmarkdown",{"type":54,"value":4715},". Find the right page from the docs index (",{"type":45,"tag":79,"props":4717,"children":4720},{"href":4718,"rel":4719},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fllms.txt",[83],[4721],{"type":54,"value":4718},{"type":54,"value":4723},") and the changelog announcements.",{"type":45,"tag":167,"props":4725,"children":4727},{"id":4726},"further-reading",[4728],{"type":54,"value":4729},"Further Reading",{"type":45,"tag":179,"props":4731,"children":4732},{},[4733,4742,4751,4760,4769,4778,4787,4796,4805],{"type":45,"tag":183,"props":4734,"children":4735},{},[4736],{"type":45,"tag":79,"props":4737,"children":4740},{"href":4738,"rel":4739},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Foverview.md",[83],[4741],{"type":54,"value":4738},{"type":45,"tag":183,"props":4743,"children":4744},{},[4745],{"type":45,"tag":79,"props":4746,"children":4749},{"href":4747,"rel":4748},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fget-started.md",[83],[4750],{"type":54,"value":4747},{"type":45,"tag":183,"props":4752,"children":4753},{},[4754],{"type":45,"tag":79,"props":4755,"children":4758},{"href":4756,"rel":4757},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fmodels.md",[83],[4759],{"type":54,"value":4756},{"type":45,"tag":183,"props":4761,"children":4762},{},[4763],{"type":45,"tag":79,"props":4764,"children":4767},{"href":4765,"rel":4766},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fchat-completions.md",[83],[4768],{"type":54,"value":4765},{"type":45,"tag":183,"props":4770,"children":4771},{},[4772],{"type":45,"tag":79,"props":4773,"children":4776},{"href":4774,"rel":4775},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fanthropic-messages.md",[83],[4777],{"type":54,"value":4774},{"type":45,"tag":183,"props":4779,"children":4780},{},[4781],{"type":45,"tag":79,"props":4782,"children":4785},{"href":4783,"rel":4784},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fopenai-responses.md",[83],[4786],{"type":54,"value":4783},{"type":45,"tag":183,"props":4788,"children":4789},{},[4790],{"type":45,"tag":79,"props":4791,"children":4794},{"href":4792,"rel":4793},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fgemini.md",[83],[4795],{"type":54,"value":4792},{"type":45,"tag":183,"props":4797,"children":4798},{},[4799],{"type":45,"tag":79,"props":4800,"children":4803},{"href":4801,"rel":4802},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Fauthentication.md",[83],[4804],{"type":54,"value":4801},{"type":45,"tag":183,"props":4806,"children":4807},{},[4808],{"type":45,"tag":79,"props":4809,"children":4812},{"href":4810,"rel":4811},"https:\u002F\u002Fneon.com\u002Fdocs\u002Fai-gateway\u002Ftroubleshooting.md",[83],[4813],{"type":54,"value":4810},{"type":45,"tag":4815,"props":4816,"children":4817},"style",{},[4818],{"type":54,"value":4819},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":4821,"total":698},[4822,4836,4855,4863,4881,4894,4913],{"slug":4823,"name":4823,"fn":4824,"description":4825,"org":4826,"tags":4827,"stars":27,"repoUrl":28,"updatedAt":4835},"claimable-postgres","provision temporary Postgres databases","Provision instant temporary Postgres databases via Claimable Postgres by Neon (neon.new) with no login, signup, or credit card. Supports REST API, CLI, and SDK. Use when users ask for a quick Postgres environment, a throwaway DATABASE_URL for prototyping\u002Ftests, or \"just give me a DB now\". Triggers include: \"quick postgres\", \"temporary postgres\", \"no signup database\", \"no credit card database\", \"instant DATABASE_URL\", \"npx neon-new\", \"neon.new\", \"neon.new API\", \"claimable postgres API\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4828,4831,4832],{"name":4829,"slug":4830,"type":14},"Database","database",{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},"PostgreSQL","postgresql","2026-07-27T06:07:56.160588",{"slug":8,"name":8,"fn":4837,"description":4838,"org":4839,"tags":4840,"stars":27,"repoUrl":28,"updatedAt":4854},"build applications on the Neon platform","Overview of the Neon platform for apps and agents, spanning Postgres, Auth, the Data API, Object Storage, Compute Functions, and the AI Gateway. Start here to route to the right Neon skill, set up the CLI or MCP server, and follow the branch-first workflow. Use when \"Neon\" is mentioned, or when any of its individual capabilities are the trigger: \"object storage\" or \"S3\", \"buckets\", \"serverless functions\", \"AI gateway\", \"call an LLM\", \"postgres\", \"database\", or \"backend\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4841,4842,4845,4846,4847,4848,4851],{"name":22,"slug":23,"type":14},{"name":4843,"slug":4844,"type":14},"Authentication","authentication",{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"name":4849,"slug":4850,"type":14},"Serverless","serverless",{"name":4852,"slug":4853,"type":14},"Storage","storage","2026-07-27T06:08:01.383115",{"slug":4,"name":4,"fn":5,"description":6,"org":4856,"tags":4857,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4858,4859,4860,4861,4862],{"name":22,"slug":23,"type":14},{"name":25,"slug":26,"type":14},{"name":19,"slug":20,"type":14},{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"slug":2721,"name":2721,"fn":4864,"description":4865,"org":4866,"tags":4867,"stars":27,"repoUrl":28,"updatedAt":4880},"deploy serverless functions on Neon","Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your data. Use when a user wants to host an API, an AI agent with long streaming responses, a WebSocket or server-sent-events (SSE) server, a webhook handler, a Discord bot, an MCP server, or any request\u002Fresponse workload that risks timing out on short, lambda-style serverless functions — and wants it to branch with their database. Triggers include \"serverless function\", \"deploy an API\", \"long-running function\", \"streaming agent\", \"SSE server\", \"WebSocket server\", \"webhook handler\", \"MCP server\", \"run code next to my database\", \"function that won't time out\", \"Neon Functions\", and \"Neon Compute\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4868,4869,4872,4875,4876,4879],{"name":25,"slug":26,"type":14},{"name":4870,"slug":4871,"type":14},"Backend","backend",{"name":4873,"slug":4874,"type":14},"Edge Functions","edge-functions",{"name":9,"slug":8,"type":14},{"name":4877,"slug":4878,"type":14},"Node.js","node-js",{"name":4849,"slug":4850,"type":14},"2026-07-27T06:07:59.147675",{"slug":4882,"name":4882,"fn":4883,"description":4884,"org":4885,"tags":4886,"stars":27,"repoUrl":28,"updatedAt":4893},"neon-object-storage","manage Neon object storage","S3-compatible object storage that branches with your Neon project, so files and the database stay in sync across every branch. Use when a user wants object storage, a bucket, blob\u002Ffile storage, or somewhere to put uploads, images, documents, avatars, or user-generated files for their app or agent — especially when they already use (or are setting up) Neon Postgres and don't want to add a separate storage provider like AWS S3, Cloudflare R2, or Supabase Storage. Triggers include \"object storage\", \"bucket\", \"blob storage\", \"file storage\", \"store uploads\u002Fimages\u002Ffiles\", \"S3-compatible storage\", \"presigned URL\", \"where do I put files\", \"Neon Object Storage\", \"Neon Storage\", and \"storage that branches with my database\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4887,4888,4891,4892],{"name":4829,"slug":4830,"type":14},{"name":4889,"slug":4890,"type":14},"File Storage","file-storage",{"name":9,"slug":8,"type":14},{"name":4852,"slug":4853,"type":14},"2026-07-27T06:07:57.150892",{"slug":4895,"name":4895,"fn":4896,"description":4897,"org":4898,"tags":4899,"stars":27,"repoUrl":28,"updatedAt":4912},"neon-postgres-branches","manage Neon PostgreSQL database branches","Choose and create the right Neon branch type for testing and development. Use when users ask about Neon branching, migration testing with real data, isolated test environments, schema-only branch workflows for sensitive data, resetting a branch from its parent, branch expiration and CI\u002FCD branch lifecycles, or branch creation via Neon CLI or Neon MCP. Triggers include \"Neon branch\", \"test migrations safely\", \"branch production data\", \"schema-only branch\", \"reset branch\", \"branch per PR\" and \"sensitive data testing\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4900,4901,4904,4907,4908,4909],{"name":4829,"slug":4830,"type":14},{"name":4902,"slug":4903,"type":14},"DevOps","devops",{"name":4905,"slug":4906,"type":14},"Migration","migration",{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"name":4910,"slug":4911,"type":14},"Testing","testing","2026-07-27T06:07:55.162249",{"slug":4914,"name":4914,"fn":4915,"description":4916,"org":4917,"tags":4918,"stars":27,"repoUrl":28,"updatedAt":4927},"neon-postgres-egress-optimizer","diagnose and fix Postgres egress costs","Diagnose and fix excessive Postgres egress (network data transfer) in a codebase. Use when a user mentions high database bills, unexpected data transfer costs, network transfer charges, egress spikes, \"why is my Neon bill so high\", \"database costs jumped\", SELECT * optimization, query overfetching, reduce Neon costs, optimize database usage, or wants to reduce data sent from their database to their application. Also use when reviewing query patterns for cost efficiency, even if the user doesn't explicitly mention egress or data transfer.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4919,4922,4923,4926],{"name":4920,"slug":4921,"type":14},"Cost Optimization","cost-optimization",{"name":9,"slug":8,"type":14},{"name":4924,"slug":4925,"type":14},"Performance","performance",{"name":4833,"slug":4834,"type":14},"2026-07-27T06:07:58.159412",{"items":4929,"total":4517},[4930,4943,4957,4969,4985,4997,5009,5022,5028,5038,5046,5055],{"slug":4931,"name":4931,"fn":4932,"description":4933,"org":4934,"tags":4935,"stars":4940,"repoUrl":4941,"updatedAt":4942},"neon-postgres","build apps with Neon serverless Postgres","Guides and best practices for working with Neon Serverless Postgres. Covers setup, connection methods and drivers, pooled vs direct connections, branching, autoscaling, scale-to-zero, instant restore, read replicas, connection pooling, IP allow lists, and logical replication. Use when users ask about \"Neon setup\", \"connect to Neon\", \"Neon project\", \"DATABASE_URL\", \"serverless Postgres\", \"Neon CLI\", \"neon\", \"Neon MCP\", \"Neon Auth\", \"@neondatabase\u002Fserverless\", \"@neondatabase\u002Fneon-js\", \"scale to zero\", \"Neon autoscaling\", \"Neon read replica\", or \"Neon connection pooling\".",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4936,4937,4938,4939],{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"name":4849,"slug":4850,"type":14},321,"https:\u002F\u002Fgithub.com\u002Fneondatabase\u002Fwebsite","2026-07-27T06:08:14.168734",{"slug":4944,"name":4944,"fn":4945,"description":4946,"org":4947,"tags":4948,"stars":4954,"repoUrl":4955,"updatedAt":4956},"add-neon-docs","add Neon docs to project AI docs","Use this skill when the user asks to add documentation, add docs, add references, or install documentation about Neon. Adds Neon best practices reference links to project AI documentation (CLAUDE.md, AGENTS.md, or Cursor rules). Does not install packages or modify code.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4949,4950,4953],{"name":4829,"slug":4830,"type":14},{"name":4951,"slug":4952,"type":14},"Documentation","documentation",{"name":9,"slug":8,"type":14},86,"https:\u002F\u002Fgithub.com\u002Fneondatabase\u002Fai-rules","2026-04-06T18:38:53.722898",{"slug":4958,"name":4958,"fn":4959,"description":4960,"org":4961,"tags":4962,"stars":4954,"repoUrl":4955,"updatedAt":4968},"neon-auth","set up Neon Auth for apps","Sets up Neon Auth for your application. Configures authentication, creates auth routes, and generates UI components. Use when adding authentication to Next.js, React SPA, or Node.js projects.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4963,4966,4967],{"name":4964,"slug":4965,"type":14},"Auth","auth",{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},"2026-04-06T18:38:52.386193",{"slug":4970,"name":4970,"fn":4971,"description":4972,"org":4973,"tags":4974,"stars":4954,"repoUrl":4955,"updatedAt":4984},"neon-drizzle","set up Drizzle ORM with Neon","Creates a fully functional Drizzle ORM setup with a provisioned Neon database. Installs dependencies, provisions database credentials, configures connections, generates schemas, and runs migrations. Results in working code that can immediately connect to and query the database. Use when creating new projects with Drizzle, adding ORM to existing applications, or modifying database schemas.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4975,4976,4979,4980,4983],{"name":4829,"slug":4830,"type":14},{"name":4977,"slug":4978,"type":14},"Drizzle","drizzle",{"name":9,"slug":8,"type":14},{"name":4981,"slug":4982,"type":14},"ORM","orm",{"name":4833,"slug":4834,"type":14},"2026-04-06T18:38:56.217495",{"slug":4986,"name":4986,"fn":4987,"description":4988,"org":4989,"tags":4990,"stars":4954,"repoUrl":4955,"updatedAt":4996},"neon-js","set up the Neon JS SDK for auth and queries","Sets up the full Neon JS SDK with unified auth and PostgREST-style database queries. Configures auth client, data client, and type generation. Use when building apps that need both authentication and database access in one SDK.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[4991,4992,4993,4994],{"name":4964,"slug":4965,"type":14},{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4995,"slug":548,"type":14},"TypeScript","2026-04-06T18:38:51.116041",{"slug":4998,"name":4998,"fn":4999,"description":5000,"org":5001,"tags":5002,"stars":4954,"repoUrl":4955,"updatedAt":5008},"neon-serverless","configure Neon serverless driver","Configures Neon Serverless Driver for Next.js, Vercel Edge Functions, AWS Lambda, and other serverless environments. Installs @neondatabase\u002Fserverless, sets up environment variables, and creates working API route examples with TypeScript types. Use when users need to connect their application to Neon, fetch or query data from a Neon database, integrate Neon with Next.js or serverless frameworks, or set up database access in edge\u002Fserverless environments where traditional PostgreSQL clients don't work.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5003,5004,5005,5006,5007],{"name":4829,"slug":4830,"type":14},{"name":4873,"slug":4874,"type":14},{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"name":4849,"slug":4850,"type":14},"2026-04-06T18:38:54.97085",{"slug":5010,"name":5010,"fn":5011,"description":5012,"org":5013,"tags":5014,"stars":4954,"repoUrl":4955,"updatedAt":5021},"neon-toolkit","create ephemeral Neon databases for testing","Creates and manages ephemeral Neon databases for testing, CI\u002FCD pipelines, and isolated development environments. Use when building temporary databases for automated tests or rapid prototyping.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5015,5018,5019,5020],{"name":5016,"slug":5017,"type":14},"CI\u002FCD","cicd",{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4910,"slug":4911,"type":14},"2026-04-06T18:38:57.490782",{"slug":4823,"name":4823,"fn":4824,"description":4825,"org":5023,"tags":5024,"stars":27,"repoUrl":28,"updatedAt":4835},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5025,5026,5027],{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"slug":8,"name":8,"fn":4837,"description":4838,"org":5029,"tags":5030,"stars":27,"repoUrl":28,"updatedAt":4854},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5031,5032,5033,5034,5035,5036,5037],{"name":22,"slug":23,"type":14},{"name":4843,"slug":4844,"type":14},{"name":4829,"slug":4830,"type":14},{"name":9,"slug":8,"type":14},{"name":4833,"slug":4834,"type":14},{"name":4849,"slug":4850,"type":14},{"name":4852,"slug":4853,"type":14},{"slug":4,"name":4,"fn":5,"description":6,"org":5039,"tags":5040,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5041,5042,5043,5044,5045],{"name":22,"slug":23,"type":14},{"name":25,"slug":26,"type":14},{"name":19,"slug":20,"type":14},{"name":16,"slug":17,"type":14},{"name":9,"slug":8,"type":14},{"slug":2721,"name":2721,"fn":4864,"description":4865,"org":5047,"tags":5048,"stars":27,"repoUrl":28,"updatedAt":4880},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5049,5050,5051,5052,5053,5054],{"name":25,"slug":26,"type":14},{"name":4870,"slug":4871,"type":14},{"name":4873,"slug":4874,"type":14},{"name":9,"slug":8,"type":14},{"name":4877,"slug":4878,"type":14},{"name":4849,"slug":4850,"type":14},{"slug":4882,"name":4882,"fn":4883,"description":4884,"org":5056,"tags":5057,"stars":27,"repoUrl":28,"updatedAt":4893},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[5058,5059,5060,5061],{"name":4829,"slug":4830,"type":14},{"name":4889,"slug":4890,"type":14},{"name":9,"slug":8,"type":14},{"name":4852,"slug":4853,"type":14}]