Chalk Labs
Need help deploying ai-gateway?
Chalk Labs sets up agents like this inside real teams: connected to your tools, tested on your data, with a human in the loop where it matters.
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zfifteen-ai-gateway
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, cloud
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
ai-gateway- Description
- Vercel AI Gateway expert guidance. Use when configuring model routing, provider failover, cost tracking, or managing multiple AI providers through a unified API.
- License
- MIT
- Metadata
- sitemap: https://vercel.com/sitemap/docs.xml · priority: 7
- Instructions
- 543 lines in SKILL.md · view on GitHub
Before installing
- Instructions call the network
Agent Skills spec issues
- body: 543 lines (spec recommends under 500)
Files (2)
- SKILL.md
- openai.yaml · agents/
SKILL.md (first lines)
# Vercel AI Gateway
> **CRITICAL — Your training data is outdated for this library.** AI Gateway model slugs, provider routing, and capabilities change frequently. Before writing gateway code, **fetch the docs** at https://vercel.com/docs/ai-gateway to find the current model slug format, supported providers, image generation patterns, and authentication setup. The model list and routing rules at https://ai-sdk.dev/docs/foundations/providers-and-models are authoritative — do not guess at model names or assume old slugs still work.
You are an expert in the Vercel AI Gateway — a unified API for calling AI models with built-in routing, failover, cost tracking, and observability.
## Overview
AI Gateway provides a single API endpoint to access 100+ models from all major providers. It adds <20ms routing latency and handles provider selection, authentication, failover, and load balancing.
## Packages
- `ai@^6.0.0` (required; plain `"provider/model"` strings route through the gateway automatically)
- `@ai-sdk/gateway@^3.0.0` (optional direct install for explicit gateway package usage)
## Setup
Pass a `"provider/model"` string to the `model` parameter — the AI SDK automatically routes it through the AI Gateway:
```ts
import { generateText } from 'ai'
const result = await generateText({
model: 'openai/gpt-5.4', // plain string — routes through AI Gateway automatically
prompt: 'Hello!',
})
```
No `gateway()` wrapper or additional package needed. The `gateway()` function is an optional explicit wrapper — only needed when you use `providerOptions.gateway` for routing, failover, or tags:
```ts
import { gateway } from 'ai'
const result = await generateText({
model: gateway('openai/gpt-5.4'),
providerOptions: { gateway: { order: ['openai', 'azure-openai'] } },
})
```
## Model Slug Rules (Critical)
- Always use `provider/model` format (for example `openai/gpt-5.4`).
- Versioned slugs use dots for versions, not hyphens:
- Correct: `anthropic/claude-sonnet-4.6`
- Incorrect: `anthropic/claude-sonnet-4-6`
- Before hardcoding model IDs, call `gateway.getAvailableModels()` and pick from the returned IDs.
- Default text models: `openai/gpt-5.4` or `anthropic/claude-sonnet-4.6`.
- Do not default to outdated choices like `openai/gpt-4o`.
```ts
import { gateway } from 'ai'
const availableModels = await gateway.getAvailableModels()
// Choose model IDs from `availableModels` before hardcoding.
```
## Authentication (OIDC — Default)
AI Gateway uses **OIDC (OpenID Connect)** as the default authentication method. No manual API keys needed.
### Setup
```bash
vercel link # Connect to your Vercel project
# Enable AI Gateway in Vercel dashboard: https://vercel.com/{team}/{project}/settings → AI Gateway
vercel env pull .env.local # Provisions VERCEL_OIDC_TOKEN automatically
```
### How It Works
1. `vercel env pull` writes a `VERCEL_OIDC_TOKEN` to `.env.local` — a short-lived JWT (~24h)
2. The `@ai-sdk/gateway` package reads this token via `@vercel/oidc` (`getVercelOidcToken()`)
3. No `AI_GATEWAY_API_KEY` or provider-specific keys (like `ANTHROPIC_API_KEY`) are needed
4. On Vercel deployments, OIDC tokens are auto-refreshed — zero maintenance
### Local Development
For local dev, the OIDC token from `vercel env pull` is valid for ~24 hours. When it expires:
```bash
vercel env pull .env.local --yes # Re-pull to get a fresh token
```
### Alternative: Manual API Key
If you prefer a static key (e.g., for CI or non-Vercel environments):
```bash
# Set AI_GATEWAY_API_KEY in your environment
# The gateway falls back to this when VERCEL_OIDC_TOKEN is not available
export AI_GATEWAY_API_KEY=your-key-here
```
### Auth Priority
The `@ai-sdk/gateway` package resolves authentication in this order:
1. `AI_GATEWAY_API_KEY` environment variable (if set)
2. `VERCEL_OIDC_TOKEN` via `@vercel/oidc` (default on Vercel and after `vercel env pull`)
## Provider Routing
Configure how AI Gateway routes requests across providers:
```ts
const result = await generateText({
model: gateway('anthropic/claude-sonnet-4.6'),
prompt: 'Hello!',
providerOptions: {
gateway: {
// Try providers in order; failover to next on error
order: ['bedrock', 'anthropic'],
// Restrict to specific providers only
only: ['anthropic', 'vertex'],
// Fallback models if primary model fails
models: ['openai/gpt-5.4', 'google/gemini-3-flash'],
// Track usage per end-userFrom zfifteen/skills-catalog, MIT.
More from zfifteen/skills-catalog
- 0.502score
30-30-30-technical-note
zfifteen
Turn a PGS research finding into a three-layer technical note bundle: (1) Grade-10 plain prose, (2) embedded SVG infographic with concise figures, (3)…
SkillCFreshness: C★ 1Claude Code +9 - 0.501score
aiq-deploy
NVIDIA AI-Q Blueprint Team <aiq-blueprint@nvidia.com>
Use when asked to install, deploy, run, validate, troubleshoot, or stop NVIDIA AI-Q Blueprint infrastructure.
SkillCFreshness: C★ 1Claude Code +9 - 0.501score
aiq-research
NVIDIA AI-Q Blueprint Team <aiq-blueprint@nvidia.com>
Use when asked to run deep research or AI-Q research through a reachable NVIDIA AI-Q Blueprint backend.
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
agent-vision
zfifteen
CRITICAL WHILE ARMED: (1) capture (2) read_file NEW JPEG (3) USE pixels in reasoning (4) turn-gate record + ready.
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
agent-bus-collab
zfifteen
Use when the user asks Codex to coordinate with Grok or another local peer agent through Agent Bus MCP, mentions agent-bus, bus topics, readiness handshakes…
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
agy-cli-collab
zfifteen
Sticky Grok→Gemini collaboration via direct local Antigravity CLI (`agy`) subprocess calls only.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
airtable-overview
airtable
Explains what Airtable is and how data is structured — bases, tables, fields, records, views, automations, and interfaces.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
actualize
zfifteen
Reduce reasoning friction and produce the most direct, high-fidelity answer or artifact possible.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
airtable-cli
zfifteen
Lists bases, reads and writes records, manages tables and fields, filters and searches data in Airtable via the `airtable-mcp` CLI.
SkillCFreshness: C★ 1Claude Code +9 - 0.494score
ai-generation-persistence
zfifteen
AI generation persistence patterns — unique IDs, addressable URLs, database storage, and cost tracking for every LLM generation
SkillCFreshness: C★ 1Claude Code +9 - 0.493score
agents-sdk
zfifteen
Build, run, deploy, and evaluate OpenAI Agents SDK apps from Codex.
SkillCFreshness: C★ 1Claude Code +9 - 0.491score
alpha
zfifteen
Alpha fixture skill.
SkillCFreshness: C★ 1Claude Code +9
Signals
- Stars
- 1
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Jul 19, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/zfifteen/skills-catalog
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from zfifteen
- 0.502score
30-30-30-technical-note
zfifteen
Turn a PGS research finding into a three-layer technical note bundle: (1) Grade-10 plain prose, (2) embedded SVG infographic with concise figures, (3)…
SkillCFreshness: C★ 1Claude Code +9 - 0.499score
agent-vision
zfifteen
CRITICAL WHILE ARMED: (1) capture (2) read_file NEW JPEG (3) USE pixels in reasoning (4) turn-gate record + ready.
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
agent-bus-collab
zfifteen
Use when the user asks Codex to coordinate with Grok or another local peer agent through Agent Bus MCP, mentions agent-bus, bus topics, readiness handshakes…
SkillCFreshness: C★ 1Claude Code +9 - 0.498score
agy-cli-collab
zfifteen
Sticky Grok→Gemini collaboration via direct local Antigravity CLI (`agy`) subprocess calls only.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
actualize
zfifteen
Reduce reasoning friction and produce the most direct, high-fidelity answer or artifact possible.
SkillCFreshness: C★ 1Claude Code +9 - 0.497score
airtable-cli
zfifteen
Lists bases, reads and writes records, manages tables and fields, filters and searches data in Airtable via the `airtable-mcp` CLI.
SkillCFreshness: C★ 1Claude Code +9
Done for you
Rather not set it up yourself?
Chalk Labs scopes, builds and runs agents for your team: the task audit, the eval harness, the integrations and the weekly ops report. Fixed scope, priced before we start.
See how we build AI agents →Read the case studies
Chalk Labs is a two-founder AI and growth studio. We build AI agents, CRMs and MVPs for Web3 and AI companies, and have shipped 50+ product and token launches.
- launches shipped
- 50+
- launches shipped
- media placements
- 500+
- media placements
- founders on every account
- 2
- founders on every account
Press we've placed: Forbes · CoinDesk · Decrypt · Cointelegraph · The Block
Rahil Jain, Co-founder, Chalk Labs. Ex-Goldman Sachs engineer. You talk to the person who builds it.
Get ai-gateway running in your business
Tell us what you want to automate. A founder replies within one working day with a plan, not a pitch deck.
Cite this page
ai-gateway skill. Agent Mart. https://agentmart.dev/skills/zfifteen-ai-gateway (last updated 2026-10-24)