Skip to main content
Route agent LLM calls through OpenRouter, LiteLLM Proxy, or a custom OpenAI-compatible gateway — no manual registration required.
Gateway providers ship pre-registered. To register your own provider, see Custom Provider Registry — as of PR #3011 user-registered providers are visible to the same wrapper hot paths that gateway providers use.
The user picks a gateway-backed model string; the agent routes the request through the gateway to the underlying provider.

Quick Start

1

OpenRouter — one line

Gateway providers auto-register on import — no register_gateway_providers() call needed.
2

LiteLLM Proxy

3

Custom gateway (advanced)


Choose Your Gateway


How It Works


Provider Reference

OpenRouter

Aliases: openrouter, or. Model IDs are prefixed with openrouter/ automatically unless already prefixed.

LiteLLM Proxy

Aliases: litellm-proxy, llm-proxy, litellm-gateway. Model IDs are passed through unchanged.

Custom Gateway

Aliases: custom-gateway, gateway, custom. Explicit config["api_key"] overrides environment variables at init time.

Common Patterns

Multi-agent, different gateways:
OpenRouter attribution headers:
Shorthand alias:

Developer Flow


Best Practices

Set OPENROUTER_API_KEY or LITELLM_PROXY_API_KEY instead of hardcoding keys in config.
Quick access to 100+ models with one API key — ideal for prototyping.
Self-hosted caching, observability, and fallback routing suit production workloads.
Use CustomGatewayProvider when traffic must stay on an internal OpenAI-compatible proxy.
OpenRouter uses X-Title and HTTP-Referer for app ranking and routing hints.

OpenRouter

OpenRouter model strings and env vars

LiteLLM Proxy

Self-hosted proxy setup

LLM Endpoint Config

Environment-based endpoint configuration

Custom Provider

Register custom LLM providers