Skip to content
Skills Library
AI & agents · Planning

model-gateway-routing

/model-gateway-routing

Model gateway / LLM router architecture: a control point in front of multiple models/providers for routing (cost/quality/latency), fallback, rate limiting, caching, observability, and governance. Architect-level, multi-provider. USE WHEN: designing an LLM gateway/router, "model router", "LLM gateway", "multi-provider", "fallback", "cost routing", "LiteLLM", "Envoy AI Gateway", semantic cache, central key/quota/observability for LLM calls. DO NOT USE FOR: single-engine serving (use `inference-serving-topology`); edge/cascade (use `hybrid-edge-cloud`); agent orchestration (use `agentic-architect

Licence
MIT
Last repository change
21.10.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Model gateway / LLM router architecture: a control point in front of multiple models/providers for routing (cost/quality/latency), fallback, rate limiting, caching, observability, and governance. Architect-level, multi-provider. USE WHEN: designing an LLM gateway/router, "model router", "LLM gateway", "multi-provider", "fallback", "cost routing", "LiteLLM", "Envoy AI Gateway", semantic cache, central key/quota/observability for LLM calls. DO NOT USE FOR: single-engine serving (use `inference-serving-topology`); edge/cascade (use `hybrid-edge-cloud`); agent orchestration (use `agentic-architect

Triggers from the description

model routerLLM gatewaymulti-providerfallbackcost routingLiteLLMEnvoy AI Gateway
Original author description

Model gateway / LLM router architecture: a control point in front of multiple models/providers for routing (cost/quality/latency), fallback, rate limiting, caching, observability, and governance. Architect-level, multi-provider. USE WHEN: designing an LLM gateway/router, "model router", "LLM gateway", "multi-provider", "fallback", "cost routing", "LiteLLM", "Envoy AI Gateway", semantic cache, central key/quota/observability for LLM calls. DO NOT USE FOR: single-engine serving (use `inference-serving-topology`); edge/cascade (use `hybrid-edge-cloud`); agent orchestration (use `agentic-architect

How it works

  1. What it centralizes (the reasons to build/buy one)
  2. Design decisions
  3. When to recommend
Original SKILL.md headings · 32 lines, 230 words
SKILL.md preview
---
name: model-gateway-routing
description: |
  Model gateway / LLM router architecture: a control point in front of multiple
  models/providers for routing (cost/quality/latency), fallback, rate limiting,
  caching, observability, and governance. Architect-level, multi-provider.

  USE WHEN: designing an LLM gateway/router, "model router", "LLM gateway",
  "multi-provider", "fallback", "cost routing", "LiteLLM", "Envoy AI Gateway",
  semantic cache, central key/quota/observability for LLM calls.

  DO NOT USE FOR: single-engine serving (use `inference-serving-topology`);
  edge/cascade (use `hybrid-edge-cloud`); agent orchestration (use `agentic-architecture`).
allowed-tools: Read, Grep, Glob
---
# Model Gateway / Routing

A gateway is a single control point between apps and many models/providers.
It turns "which model?" and cross-cutting concerns into infrastructure.

## What it centralizes (the reasons to build/buy one)
- **Routing**: pick a model per request by **cost / quality / latency / context
  length / capability**, or A/B and canary new models.
- **Fallback & resilience**: retry/failover across providers on error or rate
  limit; circuit-break a failing provider.
- **Cost control**: per-team/app budgets, quotas, and **cost attribution**;
  route cheap queries to cheap models.
- **Caching**: exact + **semantic cache** to skip duplicate/near-duplicate calls.
- **Security/governance**: central API-key custody, PII redaction, audit logs,
  policy (which teams may call which models).
- **Observability**: latency/tokens/cost/error metrics in one place.

Implementations: **LiteLLM**, **Envoy AI Gateway**, cloud AI gateways, or custom.

## Design decisions
- **Routing policy**: static (rules) vs learned/heuristic (route by predicted
  difficulty). Keep it explainable; mind added hop latency.
- **Sync vs streaming**: must pass through token streaming with low overhead.
- **Statelessness**: keep the gateway stateless + horizontally scalable; push
  state (cache, budgets) to fast stores.
- **Failure semantics**: define what happens when all providers fail.

## When to recommend
- Multiple models/providers, multiple teams, real cost/governance needs → yes.
- Single model, single team, prototype → a gateway is premature; call the model
  directly and add the gateway when the second model/provider/team appears.

Versions

The database has no other skills named model-gateway-routing.

Database snapshot: 13.11.2026 · package version 3081128096b7 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90hybrid-edge-cloud
    Hybrid edge-cloud AI architecture: local-first inference with cloud escalation, model cascading, and splitting the workload across device and datacenter to balance latency, cost, privacy, and quality. Architect-level topology. USE WHEN: designing systems that combine on-device…
  • 100llm-gateway-and-multi-provider-routing
    Configures an LLM gateway/proxy (LiteLLM, Portkey, OpenRouter-style) that sits between agent code and one or more model providers to unify routing, automatic fallback on a provider outage or rate-limit, and cost/rate-limit tracking across providers behind one API surface. Use…
  • 90agentic-architecture
    Architecture of LLM agent systems: orchestration topologies (single agent, supervisor/sub-agents, pipelines, networks), memory/context strategy, the tool layer, and human-in-the-loop/control. Architect-level system design, not prompt wording. USE WHEN: designing…
  • 100vercel-ai-gateway
    Route every LLM call through one unified API on Vercel - plain "provider/model" strings via the AI SDK, automatic provider routing and model fallbacks, observability and per-key cost tracking, and zero data retention. Use when you ask "how do I add an LLM to my Vercel app",…
  • 100llm-cost-optimizer
    Use when you need to reduce LLM API spend, control token usage, route between models by cost/quality, implement prompt caching, or build cost observability for AI features. Triggers: 'my AI costs are too high', 'optimize token usage', 'which model should I use', 'LLM spend is…
  • 100llm-gateway-and-routing
    Route application LLM traffic across providers — request tiering, fallback chains, health-aware failover, deprecation planning, and schema-constrained outputs. Use when a production service calls model providers on a path that must succeed.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.