neon-ai-gateway
ما الذي تفعله
تتيح لك Neon AI Gateway استخدام نماذج ذكاء اصطناعي متعددة (مثل نماذج OpenAI وGoogle وMeta) عبر اتصال ومفتاح واحد. تُسهّل هذه المهارة الوصول إليها بدمجها مباشرة في مشروع Neon.
متى تستخدمها
- ✓عندما تريد استخدام نماذج ذكاء اصطناعي مختلفة دون إنشاء حساب منفصل لكل واحد منها.
- ✓عندما تبدّل نموذج الذكاء الاصطناعي في الكود دون الحاجة إلى إعادة كتابة كل شيء.
- ✓عندما تريد عزل استدعاءات الذكاء الاصطناعي داخل بيئات الاختبار أو التطوير الخاصة بمشروعك.
رابط المهارة
https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/neon-ai-gateway/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“كيف أُعدّ Neon AI Gateway لاستخدام نموذج GPT-4؟”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
تفعّل الميزة في ملف إعداد مشروع Neon (`neon.ts`)، ثم تستطيع استخدام أدوات التطوير الخاصة بالذكاء الاصطناعي التي تستخدمها، بتغيير عنوان الاتصال إلى عنوان البوابة فقط.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من 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.
…
الأسئلة الشائعة
هل أحتاج إلى عدة مفاتيح وصول؟
لا، تستخدم مفتاح Neon واحدًا للوصول إلى كل النماذج المتاحة عبر البوابة.
هل أستطيع استخدام مكتبات الذكاء الاصطناعي الحالية لديّ؟
نعم، تعمل مكتباتك مثل OpenAI وAnthropic وGoogle Gemini بمجرد تغيير عنوان الاتصال الأساسي.
ماذا يعني «branch-scoped»؟
يعني أن لكل «فرع» في مشروعك نقطة وصول خاصة به إلى البوابة، فتبقى استدعاءات الذكاء الاصطناعي معزولة ومرتبطة بسياق ذلك الفرع، تمامًا كبياناته.
التفاصيل
الوصف الأصلي من المؤلف
One API and one credential for frontier and open-source LLMs, built into your Neon branch and powered by Databricks.
الشعبية
- نجوم GitHub
- 48k
- الترتيب
- #5281
- الترخيص
- MIT
- آخر تحديث
- 15/10/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
00-andruia-consultant
48kيساعد وكيلك على بدء مشاريع الذكاء الاصطناعي أو تحسينها. يحلل الكود ويقترح الأدوات ويُعد خطط عمل بالإسبانية.
007
48kيتيح لوكيلك إجراء تدقيقات أمنية ونمذجة التهديدات. مفيد لحماية المشاريع من الهجمات والثغرات الأمنية.
10-andruia-skill-smith
48kيساعد وكيلك على إنشاء أدوات الذكاء الاصطناعي أو تحسينها. يحدد طريقة عملها، ويكتب توثيقها، ويتحقق من بنيتها.
20-andruia-niche-intelligence
48kيتيح لوكيلك إعداد ملخص عن صناعة محددة. مفيد لفهم السياق والقواعد وأنماط الاستخدام والمخاطر لمشروع ما، باستخدام مصادر موثوقة.
مهارات مشابهة
api-connector-builder
280kيبني وكيلك اتصالات API جديدة على النمط الموجود، ويفيد عندما تحتاج إلى تكامل إضافي دون ابتكار طريقة جديدة للعمل.
api-design
280kيساعد وكيلك على تصميم واجهات REST API وفق أفضل الممارسات، ويوضح كيف تتواصل وكيف تُعرض الأخطاء وكيف تُنظَّم البيانات.
backend-patterns
280kيساعد وكيلك على أنماط بنية الخادم وتحسين قاعدة البيانات، ويفيد في بناء الشيفرة التي تعمل على الخادم أو مراجعتها.