llm-gateway-routing
Skill1 starsChanged 34 days agoMITView on GitHub
Design an LLM gateway layer — one OpenAI-compatible endpoint with per-team keys, model aliases, routing and fallbacks, budgets, rate limits, caching and logging policy (for example LiteLLM, Portkey, Envoy AI Gateway or a cloud gateway). Use when several applications or agents consume models from multiple providers, or when costs and keys are getting out of control.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- rogue-dev-studio/ai-agents-roguetheir own version, first seen Nov 1, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- rogue-dev-studio/ai-agents-rogue★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository105 other files it gives its agents.
- AGENTS.mdAGENTS.md
- instructions/AGENTS.mdAGENTS.md
- accessibility-reviewSkill
- agent-evaluationSkill
- agent-guardrailsSkill
- agenthub-routerSkill
- ai-red-teamingSkill
- ansible-reviewSkill
- api-designSkill
- api-integrationSkill
- architecture-decisionSkill
- backup-restoreSkill
- caching-strategySkill
- chaos-engineeringSkill
- ci-cd-pipeline-designSkill
- cloud-cost-optimizationSkill
- cloud-iam-least-privilegeSkill
- code-reviewSkill
- container-image-optimizationSkill
- cyber-resilience-actSkill
- database-migrationsSkill
- data-pipeline-reviewSkill
- data-privacySkill
- data-quality-checksSkill
- debugging-root-causeSkill
- dependency-auditSkill
- dependency-upgradeSkill
- disaster-recovery-drillSkill
- docker-hardeningSkill
- documentationSkill
- dora-readinessSkill
- dpiaSkill
- email-deliverabilitySkill
- embedding-model-selectionSkill
- error-handling-reviewSkill
- eu-ai-act-readinessSkill
- eu-data-sovereigntySkill
- european-accessibility-actSkill
- event-driven-architectureSkill
- feature-flagsSkill
- frontend-reviewSkill
- gdpr-dsar-handlingSkill
- github-actionsSkill
- gitlab-ciSkill
- git-workflowSkill
- go-developmentSkill
- graphql-api-reviewSkill
- helm-chart-reviewSkill
- i18n-localizationSkill
- incident-responseSkill
- java-spring-reviewSkill
- kubernetes-reviewSkill
- linux-server-hardeningSkill
- llm-cost-analysisSkill
- llm-observabilitySkill
- llm-output-evaluationSkill
- llm-structured-extractionSkill
- load-testingSkill
- local-llm-servingSkill
- log-analysisSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
No application holds a provider key directly (repository and configuration search).
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
LLM Gateway and Routing
Goal
Applications call stable model aliases through one controlled entry point, while the platform team manages providers, keys, spend, reliability and data policy centrally.
Inputs
- Consumers (applications, agents, teams), their models, volumes and data sensitivity.
- Providers and self-hosted endpoints, contracts and data-processing terms, budget owners.
Procedure
- Model aliases. Applications use names such as
chat-default,chat-reasoning,embed-default; the gateway maps aliases to concrete provider models and versions. Changing the provider does not require application releases. - Keys per consumer. Virtual keys per application or agent with allowed aliases, rate limits (requests and tokens per minute) and budgets; provider keys stay only in the gateway's secret store.
- Routing and fallback. Define a primary and fallback per alias (another region, provider or local model); fall back on timeouts, 429 and 5xx only — not on 4xx validation errors; cap retries; make sure fallbacks satisfy the same data-policy class.
- Data policy classes. For example public, internal, confidential: confidential traffic routes only to approved providers or self-hosted models; enforce by key or metadata rather than by convention.
- Budgets and alerts. Per key and per team, with soft alerts (80 %) and hard limits; daily cost reports by alias and consumer.
- Caching. Exact or semantic caching only where answers are not user-specific; scope the cache by tenant; set TTLs.
- Logging. Metadata by default (consumer, alias, model, tokens, latency, cost, status); prompt and response logging only where approved, with retention limits and redaction.
- Reliability. Health checks per backend, timeouts per alias, and dashboards for error rate, latency and fallback rate.
- Change management. Alias remapping goes through review with an evaluation run (see
llm-output-evaluation), and is announced to consumers.
Example fixture
aliases:
chat-default:
primary: provider-a/model-x-2024-08
fallback: [self-hosted/model-y-awq]
data_class: internal
keys:
support-bot: {aliases: [chat-default], tpm: 200000, monthly_budget_eur: 300}Negative test: the support-bot key requesting chat-reasoning is refused; a confidential-class key never routes to a non-approved provider even during a fallback.
Acceptance checks
- No application holds a provider key directly (repository and configuration search).
- Each key has scoped aliases, rate limits and a budget; exceeding them is tested.
- Fallback behaviour is tested by simulating a primary outage, and respects data classes.
- Logging policy and retention are documented and match the configuration.
Output
Gateway configuration, alias and key matrix, data-policy mapping, dashboards and test results.
Safety
The gateway concentrates sensitive traffic: protect its admin interface and API (never public without authentication), rotate provider keys, and restrict who can read logs. Prompts and responses often contain personal data: before routing or logging them through a provider, confirm a data processing agreement, the processing location (EU or a valid GDPR transfer mechanism) and retention; route personal and confidential data classes only to approved EU or self-hosted endpoints, and for AI systems offered in the EU check AI Act duties (see eu-ai-act-readiness, eu-data-sovereignty).
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

