ai-gateway

Configure Vercel AI Gateway routing, failover, and cost controls with OIDC authentication.

3|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/rauell1/safaricharge --skill ai-gateway-rauell1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-gateway
Source: https://github.com/rauell1/safaricharge/tree/main/.agents/skills/ai-gateway
Command: npx skills add https://github.com/rauell1/safaricharge --skill ai-gateway-rauell1

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you configure and troubleshoot Vercel AI Gateway so AI requests can be routed through a single API with reliable provider selection, failover, and spend control.

Core Features & Use Cases

  • Model Routing: Send requests to the right provider and model using unified provider/model identifiers.
  • Failover and Resilience: Keep production apps running by falling back across providers and models when a service is unavailable.
  • Cost and Usage Control: Track usage by user and feature, add budget safeguards, and support caching for repeated requests.
  • Use Case: A SaaS team can route chat, analysis, and image generation through Vercel AI Gateway while preserving audit logs and preventing runaway costs.

Quick Start

Use the ai-gateway skill to configure your application to route model requests through Vercel AI Gateway with OIDC authentication, provider failover, and cost tracking.

Frequently Asked Questions about ai-gateway

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

FAQPage Schema
How do I configure Vercel AI Gateway model routing for multiple providers?

Vercel AI Gateway model routing uses unified provider/model slugs to direct API requests to the correct destination. You configure routing by specifying these identifiers for each request.

How does failover work when an AI provider goes down?

Failover in Vercel AI Gateway keeps production apps running by automatically falling back across configured providers and models when a service becomes unavailable. This resilience prevents request failures during outages.

Can I track AI API costs and usage per user with Vercel AI Gateway?

Yes, Vercel AI Gateway supports per-user and per-feature cost tracking to monitor API spend. You can add budget safeguards and enable caching to prevent runaway costs in production applications.

Does Vercel AI Gateway require OIDC authentication or can I use API keys?

Vercel AI Gateway supports OIDC-based authentication for secure access, with an API-key fallback option. This dual approach ensures you can integrate gateway routing regardless of your current auth setup.

How do I troubleshoot deprecated model names in Vercel AI Gateway?

Troubleshooting deprecated model names in Vercel AI Gateway requires validating your configured provider and model slugs. You must ensure you are using current identifiers and correct provider-specific keys to resolve routing failures.

What is the best way to prevent runaway costs in production AI applications?

Using Vercel AI Gateway is an effective way to prevent runaway costs by applying per-user tracking, budget alerts, and caching. This centralizes spend control across multi-provider integrations and workflows.