ai-gateway

Route AI model requests across providers with failover and cost tracking.

Updated Dec 12, 2025
One-click install
npx skills add https://github.com/global-os/gproxy --skill ai-gateway-global-os
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-gateway
Source: https://github.com/global-os/gproxy/tree/main/.agents/skills/ai-gateway
Command: npx skills add https://github.com/global-os/gproxy --skill ai-gateway-global-os

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @ai-sdk/gateway, and includes scripts (resource) and references (resource) components.

What problem does it solve?

This Skill streamlines the configuration and management of AI models across multiple providers, addressing challenges with routing, failover, cost tracking, and authentication.

Core Features & Use Cases

  • Model Routing: Directs requests to the most appropriate AI model based on predefined rules.
  • Provider Failover: Automatically switches to alternative providers if the primary one is unavailable.
  • Cost Tracking: Provides insights into AI usage and costs, enabling budget management.
  • Use Case: For a company using AI models for customer service, this Skill ensures that if one model goes down, another takes over seamlessly, and it tracks the usage to stay within budget.

Quick Start

Use the ai-gateway skill to set up model routing for 'openai/gpt-5.4' with failover to 'anthropic/claude-sonnet-4.6'.

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 AI model routing and failover across multiple providers?

AI model routing directs requests to the most appropriate AI model based on predefined rules, while failover automatically switches to alternative providers if the primary one is unavailable. You configure routing rules and failover sequences using the @ai-sdk/gateway package.

What is the best way to track AI API usage and costs across different providers?

Cost tracking provides insights into AI usage and costs across multiple providers, enabling budget management for your application. This Skill monitors requests to OpenAI, Anthropic, and Google to keep spending within defined limits.

Does @ai-sdk/gateway support OIDC-based authentication and rate limiting?

Yes, @ai-sdk/gateway supports OIDC-based authentication and rate limiting to manage access to your AI models. These features secure your API endpoints and prevent usage spikes from exceeding provider quotas.

Can I configure automatic provider switching if my primary OpenAI model goes down?

Provider failover automatically switches to alternative providers if the primary one is unavailable. You can set up a primary model like 'openai/gpt-5.4' with a failover to 'anthropic/claude-sonnet-4.6' to ensure continuous availability.

What are the limitations when managing multiple AI providers with a unified API?

This Skill requires the @ai-sdk/gateway package for integration and manages routing across specific supported providers like OpenAI, Anthropic, and Google. Limitations depend on the individual rate limits and availability constraints of each underlying provider.