neon-ai-gateway
Fungsinya
Neon AI Gateway memungkinkan Anda menggunakan berbagai model AI (seperti dari OpenAI, Google, dan Meta) melalui satu koneksi dan satu key. Fitur ini memudahkan akses ke model-model tersebut dengan mengintegrasikannya langsung ke project Neon Anda.
Kapan dipakai
- βSaat Anda ingin menggunakan berbagai model AI tanpa perlu membuat akun terpisah untuk masing-masing.
- βSaat ingin berpindah model AI di kode Anda tanpa harus menulis ulang semuanya.
- βUntuk memisahkan panggilan AI di environment test atau development tertentu dalam project Anda.
Link skill
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/neon-ai-gateway/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBagaimana cara mengonfigurasi Neon AI Gateway agar menggunakan model GPT-4?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Anda mengaktifkan fitur ini di file konfigurasi project Neon Anda (`neon.ts`), lalu Anda bisa menggunakan tool pengembangan AI yang sudah ada, cukup dengan mengganti alamat koneksinya menjadi alamat Gateway.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.
Neon AI Gateway
This is a preview feature and only available in us-east-2. 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/Anthropic/Gemini SDK works by changing only the base URL.
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.
When to Use
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:
- One credential instead of many provider accounts. A single Neon credential reaches the entire model catalog across seven providers. No separate OpenAI / Anthropic / Google billing, keys, or signups to provision and rotate.
- Switch models without rewiring. The unified endpoint is OpenAI-compatible and works with every model in the catalog β change one
modelfield to move between Claude, GPT, and Gemini. Standard SDKs (OpenAI, Anthropic, google-genai) work with just a base-URL change. - AI follows your branches. Each branch has its own gateway endpoint, scoped with the same lineage as your database. AI requests from a preview/feature branch are isolated to that branch β the same isolation your data already gets β which makes preview, CI, and agent environments self-contained.
- 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.
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.
What It Does
- 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). - Standard SDKs, one URL change β OpenAI SDK and AI SDK (OpenAI-compatible MLflow/Responses routes), Anthropic SDK (native Messages), google-genai (native Gemini).
- Branch-scoped β Each branch gets its own gateway host; the Neon credential authorizes requests for that branch and its descendants.
- Streaming β Server-sent events work on all endpoints with no extra configuration.
Setup
The gateway is part of neon.ts (see the neon skill for the branch-first workflow and neon.ts basics). Enable it under preview.aiGateway:
// neon.ts
import { defineConfig } from "@neon/config/v1";
export default defineConfig({
preview: {
aiGateway: true,
},
});
neon deploy # provisions the gateway on the linked branch
Neon Infrastructure as Code (neon.ts)
The 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:
neon config status # print the branch's live config (is the gateway on?)
neon config plan # dry-run diff of what apply would change
neon config apply # enable the gateway on the branch (neon deploy is an alias)
The 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/CI 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 / 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).
For typed, validated access to the injected credentials, pass the same config object to parseEnv from @neon/env β it returns an env.aiGateway namespace (apiKey, baseUrl) derived from your neon.ts.
β¦
Pertanyaan umum
Apakah saya perlu banyak access key?
Tidak, Anda cukup menggunakan satu key Neon untuk mengakses semua model yang tersedia melalui Gateway.
Bisakah saya memakai library AI yang sudah saya gunakan?
Bisa, library Anda seperti OpenAI, Anthropic, atau Google Gemini tetap berfungsi dengan hanya mengganti alamat koneksi dasarnya (base URL).
Apa arti 'branch-scoped'?
Artinya setiap 'branch' dari project Anda memiliki titik akses Gateway sendiri, sehingga panggilan AI tetap terisolasi dan terikat pada konteks branch tersebut, sama seperti data Anda.
Detail
Deskripsi asli dari pembuat
One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.
Popularitas
- Bintang GitHub
- 48k
- Peringkat
- #5281
- Lisensi
- MIT
- Diperbarui
- 15/10/2026
Komentar
- β¦
Skill lain dari repositori ini
00-andruia-consultant
48kMembantu agent Anda memulai atau meningkatkan proyek AI. Agent menganalisis kode, menyarankan tools, dan membuat rencana aksi dalam bahasa Spanyol.
007
48kMemungkinkan agent Anda melakukan audit keamanan dan threat modeling. Berguna untuk melindungi proyek dari serangan dan celah keamanan.
10-andruia-skill-smith
48kMembantu agent Anda membuat atau meningkatkan tools AI. Agent mendefinisikan cara kerja tools, menulis dokumentasi, dan memvalidasi strukturnya.
20-andruia-niche-intelligence
48kMemungkinkan agent Anda membuat ringkasan industri tertentu. Berguna untuk memahami konteks, aturan, pola penggunaan, dan risiko proyek dengan sumber terpercaya.
Skill serupa
api-connector-builder
280kMembuat agent Anda membangun koneksi API baru mengikuti pola yang sudah ada. Gunakan saat ingin menambah integrasi lagi tanpa membuat cara baru.
api-design
280kMembantu agent Anda merancang REST API sesuai praktik terbaik. Berguna untuk mengatur cara API berkomunikasi, menampilkan error, dan mengorganisasi data.
backend-patterns
280kMembantu agent Anda dengan pola arsitektur sisi server dan optimasi database. Berguna untuk membangun atau meninjau kode yang berjalan di server.