ai-gateway
БесплатноБез исполняемых скриптовНе проверенVercel AI Gateway guidance for setup, model discovery, authentication, routing, fallbacks, virtual models, evaluation models, BYOK, budgets, spend reporting…
от vercel★ 356 звёзд на GitHubОб этом скилле
Vercel AI Gateway
AI Gateway exposes models from multiple providers through shared authentication, model IDs, routing, billing, and observability. Model availability, SDK APIs, CLI commands, prices, and product capabilities change frequently. Verify them from current sources before changing code.
Start with current sources
Before implementing:
Inspect the project's language, package manager, installed AI SDK version, and existing provider integration.
Read the relevant Vercel page under https://vercel.com/docs/ai-gateway. Use the page's
.mdform when a tool needs Markdown.Fetch the complete live model list. Do not construct model variants by analogy:
curl -fsSL https://ai-gateway.vercel.sh/v1/modelsIf the code uses the
aipackage, load theai-sdkskill when available. Read version-matched docs undernode_modules/ai/docs/and source undernode_modules/ai/src/. If the skill is not installed, use those bundled files directly.Run
vercel ai-gateway <command> --helpbefore documenting or scripting CLI flags.
The live model endpoint and installed package take precedence over model names or SDK syntax remembered from training data.
Vercel CLI inventory
The vercel ai-gateway command manages gateway resources for the current team. The setup subcommand connects local coding agents; the rest of the CLI covers the jobs that previously required dashboard work:
| Command | What it does |
|---|---|
api-keys create/list/inspect/revoke |
Create and manage AI Gateway API keys, with budgets, spend alerts, expiry, and restriction exemptions. revoke needs CLI 64.6+; older CLIs use remove |
budgets set/list/inspect/remove |
Set metered spend limits for the team, a project, a user, or an API key |
budgets set/inspect/remove --default, budgets list --defaults |
Set per-scope default limits covering projects, keys, or members without a custom budget. Needs CLI 59.13+; the older budgets defaults group is deprecated |
models list / models endpoints <model> |
List the model catalog and one model's provider endpoints from the CLI |
virtual-models create/list/inspect/update/delete/restore |
Manage reusable, team-scoped model configurations addressed as vmc/<slug>. update needs CLI 64.4+ and delete 64.6+; older CLIs use edit and remove |
rules add/list/update/remove |
Manage routing rules; the CLI marks rules beta, so check --help before relying on them. update needs CLI 64.4+; older CLIs use edit. REST CRUD exists under https://api.vercel.com/ai-gateway/rules |
setup |
Configure supported coding agents; see references/coding-agents.md |
leaderboard |
Explore public, anonymized usage leaderboards; rarely needed for implementation work |
Use the CLI for credential and spend management when the user is working from a terminal or in CI. Check vercel ai-gateway <command> --help for current flags before scripting; do not copy a flag list from this skill into generated code.
Route the request to the right guide
| User's job | Read |
|---|---|
| Ask a coding agent to make one Gateway request, or handle first-request credentials, compatible SDKs, or migration | references/setup.md |
| Provider selection, model fallbacks, caching, BYOK, or timeouts | references/routing.md |
Reusable model configuration, a vmc/<slug>, or provider options for a client that cannot send them |
references/virtual-models.md |
Typed decisions (formerly evaluation) through AI SDK, the OpenAI-compatible POST /v1/decisions, the deprecated POST /v1/evaluate, or the TypeSafe-compatible API |
references/evaluation.md |
| Credits, budgets, reporting, Logs, or request debugging | references/spend-observability.md |
| Route Claude Code, Codex, OpenCode, Pi, or another coding agent's own model traffic through Gateway | references/coding-agents.md |
Read each relevant reference before editing. A task can require more than one.
Choose the integration surface
| Existing project | Default path |
|---|---|
| JavaScript or TypeScript using AI SDK | Use a plain provider/model string with generateText, streamText, ToolLoopAgent, or the relevant modality API |
| Python using AI SDK for Python | Use ai.get_model('provider/model') and the current Python SDK docs |
| Existing OpenAI SDK | Keep the SDK and point baseURL or base_url to https://ai-gateway.vercel.sh/v1 |
| Existing Anthropic SDK | Keep the SDK and point baseURL or base_url to https://ai-gateway.vercel.sh |
| Decisions over provider-neutral HTTP | Send the OpenAI-compatible Decisions request shape to POST https://ai-gateway.vercel.sh/v1/decisions; POST /v1/evaluate is deprecated |
| Existing TypeSafe evaluation client | Keep `@typesaf |
Установить ai-gateway в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл ai-gateway?
Vercel AI Gateway guidance for setup, model discovery, authentication, routing, fallbacks, virtual models, evaluation models, BYOK, budgets, spend reporting, observability, compatible APIs, and coding-agent configuration. Use when adding AI Gateway to an app, migrating provider calls, choosing models or providers, centralizing model configuration, evaluating application state, debugging gateway requests, or running `vercel ai-gateway` commands.
Как установить скилл ai-gateway?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл ai-gateway запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic