vercel-ai-gateway
Vercel AI Gateway provider fallback and host order configuration. Use when working with aiGateway, hostOrder, getGatewayOptions, provider fallback, gateway configuration, or multi-host model routing.
npx skills add majiayu000/claude-skill-registry --skill vercel-ai-gateway --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Vercel AI Gateway Patterns Vercel AI Gateway routes requests to multiple inference hosts with automatic fallback. Enables specifying host order per model (e.g., try Cerebras first, fall back to Groq). ## Core Concepts **Host order**: Array of inference provider names to try in sequence. Only set for specific models needing fallback. **Gateway options**: Object passed to Vercel AI SDK with `gateway` key (SDK requirement). **User tracking**: Propagate `userId` and `tags` for analytics/debugging. ## Key Files - `apps/web/src/lib/ai/gateway.ts` - Main gateway logic - `apps/web/src/lib/ai/providers/gateway.ts` - Gateway instantiation - `apps/web/src/lib/ai/models.ts` - Model configs with hostOrder - `packages/backend/convex/generation.ts` - Usage in generation ## Host Order Configuration ### Model Config Pattern Set `hostOrder` in model config only when fallback needed: ```typescript // From models.ts - Llama 4 Nemotron 70B (multi-host) "openai:llama-4-nemotron-70b": { id: "openai:llama-4-nemotron-70b", provider: "openai", name: "Llama 4 Nemotron 70B", contextWindow: 131000, pricing: { input: 0.15, output: 0.6 }, capabilities: ["function-calling", "thinking"], hostOrder: ["cerebras",
- Core Concepts
- Key Files
- Host Order Configuration
- Model Config Pattern
- Retrieving Host Order
- Gateway Options Structure
- Building Options
- Conditional Order Injection
- Usage in Generation
- Basic Pattern
- Merging with Reasoning Options
- Tag Customization
- Helper: generateWithGateway
- Model-Specific Patterns
What does the vercel-ai-gateway skill do?
Vercel AI Gateway provider fallback and host order configuration. Use when working with aiGateway, hostOrder, getGatewayOptions, provider fallback, gateway configuration, or multi-host model routing.
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill vercel-ai-gateway --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
