Agent skill · AI & Agents

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

majiayu000github.com/majiayu000GitHub ↗
claude-codeMIT
Install
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.

Facts
Files in the skill folder: 2
SKILL.md size: 10 KB
Bundled scripts: none
Path: skills/ai-llm/llm-gateway-routing-phrazzld-claude-config-2/SKILL.md
Open the folder on GitHub →
Where it comes from
Stars: 534
Language: HTML

Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.

From the SKILL.md

# 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

What's inside
Steps it walks through
  1. Why Use a Gateway?
  2. Quick Decision
  3. OpenRouter (Recommended)
  4. Why OpenRouter
  5. Setup
  6. Basic Usage
  7. With Vercel AI SDK (Recommended)
  8. Model IDs
  9. Fallback Chains
  10. Cost Routing
  11. A/B Testing
  12. LiteLLM (Self-Hosted)
  13. Why LiteLLM
  14. Configuration
Ships with 1 file
  • metadata.json
Commands it runs
Install
pip install litellm[proxy]
Run proxy
litellm --config config.yaml
Use as OpenAI-compatible endpoint
export OPENAI_API_BASE=http://localhost:4000
More from claude-skill-registry
All skills →
About this skill
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.

Keep going