llm-gateway-routing
LLM gateway and routing configuration using OpenRouter and LiteLLM. Invoke when: - Setting up multi-model access (OpenRouter, LiteLLM) - Configuring model fallbacks and reliability - Implementing cost-based or latency-based routing - A/B testing different models - Self-hosting an LLM proxy
npx skills add majiayu000/claude-skill-registry --skill llm-gateway-routing-phrazzld-claude-config-2 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# LLM Gateway & Routing Configure multi-model access, fallbacks, cost optimization, and A/B testing. ## Why Use a Gateway? **Without gateway:** - Vendor lock-in (one provider) - No fallbacks (provider down = app down) - Hard to A/B test models - Scattered API keys and configs **With gateway:** - Single API for 400+ models - Automatic fallbacks - Easy model switching - Unified cost tracking ## Quick Decision | Need | Solution | |------|----------| | Fastest setup, multi-model | **OpenRouter** | | Full control, self-hosted | **LiteLLM** | | Observability + routing | **Helicone** | | Enterprise, guardrails | **Portkey** | ## OpenRouter (Recommended) ### Why OpenRouter - **400+ models**: OpenAI, Anthropic, Google, Meta, Mistral, and more - **Single API**: One key for all providers - **Automatic fallbacks**: Built-in reliability - **A/B testing**: Easy model comparison - **Cost tracking**: Unified billing dashboard - **Free credits**: $1 free to start ### Setup ```bash # 1. Sign up at openrouter.ai # 2. Get API key from dashboard # 3. Add to .env: OPENROUTER_API_KEY=sk-or-v1-... ``` ### Basic Usage ```typescript // Using fetch const response = await fetch('https://openrouter.ai/api/v1/c
- Why Use a Gateway?
- Quick Decision
- OpenRouter (Recommended)
- Why OpenRouter
- Setup
- Basic Usage
- With Vercel AI SDK (Recommended)
- Model IDs
- Fallback Chains
- Cost Routing
- A/B Testing
- LiteLLM (Self-Hosted)
- Why LiteLLM
- Configuration
Install pip install litellm[proxy] Run proxy litellm --config config.yaml Use as OpenAI-compatible endpoint export OPENAI_API_BASE=http://localhost:4000
What does the llm-gateway-routing skill do?
LLM gateway and routing configuration using OpenRouter and LiteLLM. Invoke when: - Setting up multi-model access (OpenRouter, LiteLLM) - Configuring model fallbacks and reliability - Implementing cost-based or latency-based routing - A/B testing different models - Self-hosting an LLM proxy
How do I install it?
Run `npx skills add majiayu000/claude-skill-registry --skill llm-gateway-routing-phrazzld-claude-config-2 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From majiayu000/claude-skill-registry, a repository with 534 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
