ai-gateway

Route AI requests through Vercel AI Gateway with failover and per-user rate limits.

1|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/Moisesjr20/gueclaw --skill ai-gateway-moisesjr20
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ai-gateway
Source: https://github.com/Moisesjr20/gueclaw/tree/main/.agents/skills/ai-gateway
Command: npx skills add https://github.com/Moisesjr20/gueclaw --skill ai-gateway-moisesjr20

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill eliminates the complexity of managing multiple AI providers by providing a single, unified gateway for routing requests, handling provider failover, and attributing costs so teams can operate AI features reliably in production.

Core Features & Use Cases

  • Unified Model Routing: Use provider/model strings to route requests through Vercel AI Gateway for consistent provider selection.
  • Failover & Reliability: Configure provider order and fallback models to maintain uptime when a provider experiences errors or quotas.
  • Cost Controls & Observability: Per-user tags, budget alerts, and usage logs enable cost tracking, budget enforcement, and audit trails for multi-tenant applications.
  • Auth & Local Development: OIDC-first authentication via vercel env pull with AI_GATEWAY_API_KEY fallback supports both Vercel deployments and local CI usage.
  • Use Case: Deploy a multi-tenant chat service that requires per-user rate limits, per-feature cost attribution, and automatic failover between OpenAI and Anthropic.

Quick Start

Route the model openai/gpt-5.4 through the Vercel AI Gateway with per-user tags and a failover order of openai then anthropic.

Frequently Asked Questions about ai-gateway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up unified model routing and provider failover for AI requests?▼

Unified model routing directs AI requests through a single gateway using provider/model strings, while failover configures a provider order to automatically fallback to alternative models during errors or quota limits.

What is the best way to enforce per-user rate limiting and cost tracking in a multi-tenant SaaS?▼

Per-user rate limiting and cost tracking in a multi-tenant SaaS are enforced by applying per-request tags, monitoring usage logs, and configuring programmatic budget alerts to maintain cost attribution.

How does OIDC authentication work with the Vercel AI Gateway for local development?▼

OIDC authentication operates via vercel env pull for secure deployments, with an AI_GATEWAY_API_KEY fallback mechanism specifically designed to support local CI usage and development workflows.

Can I route requests to specific models like OpenAI and Anthropic while maintaining uptime?▼

Routing requests to specific models like OpenAI and Anthropic maintains uptime by defining a failover order, ensuring the gateway automatically switches providers when the primary one experiences failures.

When do I need an AI gateway for my production application?▼

An AI gateway is needed for production applications requiring reliable provider selection, consistent cost attribution, audit logging, and automatic failover to manage multiple AI providers seamlessly.