ai-gateway

Route LLM requests across Ollama, Anthropic, and HuggingFace providers.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/astoeffer/plugin-marketplace --skill ai-gateway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ai-gateway
Source: https://github.com/astoeffer/plugin-marketplace/tree/main/plugins/cloodle-ai-integration/skills/ai-gateway
Command: npx skills add https://github.com/astoeffer/plugin-marketplace --skill ai-gateway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Builds AI gateway services for routing, rate-limiting, and multi-provider AI integration.

Core Features & Use Cases

  • Provider Switching: Runtime selection between local Ollama, Anthropic, and HuggingFace.
  • Model Recommendations: Guidance on model selection per use case.
  • Environment Configuration: Centralized env-based configuration for providers.

Quick Start

Set AI_PROVIDER and related environment variables, then test with a simple request to verify provider switching and responses.

Frequently Asked Questions about ai-gateway

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

FAQPage Schema
How do I route LLM requests across multiple AI providers?

Route LLM requests across multiple AI providers by setting environment variables for your chosen provider—OLLAMA_BASE_URL and OLLAMA_MODEL for local Ollama, ANTHROPIC_API_KEY and ANTHROPIC_MODEL for Anthropic, or HF_API_KEY and HF_MODEL for HuggingFace—then use the get_llm function to switch providers at runtime based on configuration.

Can I switch between Ollama, Anthropic, and HuggingFace without changing code?

Yes, provider switching happens automatically through environment-driven configuration. Set AI_PROVIDER and the corresponding API credentials or endpoints, and the gateway routes requests to your selected provider without code changes across development, testing, and production environments.

What environment variables do I need to configure for multi-provider AI routing?

Configure OLLAMA_BASE_URL and OLLAMA_MODEL for Ollama, ANTHROPIC_API_KEY and ANTHROPIC_MODEL for Anthropic, or HF_API_KEY and HF_MODEL for HuggingFace. The gateway reads these variables to enable seamless provider selection and supports optional defaults for fallback behavior.

Does this gateway support rate limiting and API proxying for LLM requests?

Yes, the gateway applies rate limiting and API proxying to manage LLM requests across multiple providers, enabling controlled access, load distribution, and centralized request handling in development, testing, and production environments.

How do I test provider switching to verify my gateway configuration?

Test provider switching using the provided test endpoint after setting your AI_PROVIDER and environment variables. A simple request confirms that the gateway correctly routes to your selected provider and returns responses without errors.