Hosted LLM gateway security: a vendor evaluation checklist
How to evaluate a hosted LLM gateway so your prompts, cache, and model keys stay inside your boundary — data residency, retention, BYOK, audit trails, eval fallbacks, and compliance.
Once you decide to put a gateway in front of your model calls — for cost control, caching, routing, or observability — the next question is how to run it without creating new operational or compliance burden. A hosted gateway, consumed as an API, is the fastest path: you change a base URL and get cost control, caching, and routing without deploying anything. The tradeoff is trust — your prompts and responses pass through the vendor's infrastructure — so the evaluation matters. This article gives you a concrete checklist for that evaluation.
Architecture of a hosted API gateway
Understanding the data flow is the first step to evaluating risk. In a typical hosted gateway, your application sends the prompt to the gateway over HTTPS. The gateway may optimize the prompt, check a cache, choose a model, and then call the model provider on your behalf. The response follows the same path back.
Your app ──HTTPS──> Hosted gateway ──HTTPS──> Model provider
│ │ │
▼ ▼ ▼
Cache Logs Routing rulesEvery box in that diagram is a place where data can be stored, logged, or transformed. Your evaluation should cover each one.
Data residency and retention
The first thing to verify is what the vendor stores and for how long. At minimum, a hosted gateway should let you configure zero retention for prompts and responses. Cache metadata is different: a semantic cache needs embeddings or hashes to recognize repeated prompts, but those should be tenant-scoped and deletable. Ask for the retention policy in writing, and confirm it covers cache, logs, and any model-provider call records.
- —Where are prompts, responses, and embeddings processed?
- —Can you configure zero retention for prompts and responses?
- —What is the cache TTL and is it tenant-scoped?
- —Are logs retained, and can you export or delete them?
For regulated data — PII, source code, health records, financials — you also need to know where processing happens. A data-residency guarantee is only meaningful if it covers the model routing, caching, and validation layers, not just the ingress proxy.
Bring your own keys
The gateway should never require a shared credential. You bring your own model-provider keys, encrypted at rest and scoped to the minimum permissions. This keeps the economic relationship between you and the model provider intact and limits blast radius if a credential leaks. If the gateway asks you to proxy through a vendor key, that is an API proxy, not a gateway you control.
Good: Your app → Gateway → OpenAI (using your key) Bad: Your app → Gateway → OpenAI (using vendor's shared key)
Audit trail and eval-guarded fallback
Every optimization the gateway applies — pruning, caching, routing — should be observable. Logs should include input tokens, output tokens, model used, routing decision, and quality outcome. Better gateways also run an inline validator: if an optimization risks degrading quality, they fall back to a direct model call. That combination is what lets you trust the savings number.
| Metric | Why it matters | Target |
|---|---|---|
| Optimization rate | How often the gateway changed the request | Track by feature |
| Fallback rate | How often optimization was unsafe | < 5% for mature rules |
| Quality pass rate | How often optimized output passes eval | > 99% |
| Cost per 1K requests | Realized savings after gateway fees | Trending down |
Compliance and certifications
SOC 2 Type II, ISO 27001, and GDPR/CCPA commitments are table stakes for an enterprise gateway. If you handle health data, ask about HIPAA/BAA. If you handle cardholder data, PCI DSS scope matters. Certifications alone are not enough — ask how often audits occur and whether you can review the controls relevant to your data.
What to ask before you integrate
- —Do prompts, responses, or embeddings ever leave my tenant boundary?
- —Can I configure zero retention for prompts and responses?
- —Do you support bring-your-own model-provider keys?
- —Is there an eval-guarded fallback for every optimization?
- —Can I export audit logs for finance and compliance?
- —What certifications cover the gateway infrastructure?
The best hosted gateways are designed so the answers to the first five are yes, and the sixth is documented and current. Singular, for example, is available as a fully managed API: change one base URL, keep your model keys, and configure retention so prompts and cache stay inside your boundary.
Singular does this for you.
Pruning, caching, routing, and per-request spend — on your infrastructure, in under twenty minutes.