LLMOps is the discipline of running large language models in production: routing every request to the right model, containing token costs, surviving provider outages, and proving — with traces, logs, and controlled experiments — that the system still behaves the way it did yesterday. The theme spans the full operational stack, from the gateway a request enters to the audit trail it leaves behind. This page maps that stack: what to read first, what each layer is for, and where the layers get confused with each other.
The model call is the easy part; production LLM systems fail in the layers around it — routing, retries, cost control, and observability.
An LLM app can degrade with no deploy and no exception: a provider swaps a model, a prompt regresses, spend drifts. Only instrumentation catches it.
Cost, latency, and quality are one coupled trade-off — the same routing or caching decision moves all three at once.
This theme has three tiers: two foundations, four core control layers, four production-hardening topics. Read them in that order.
Why LLMOps matters for engineers shipping AI features
A prototype that calls one model endpoint is a weekend project; the same feature in production is a distributed system with a nondeterministic dependency you don’t control, billed by the token. Providers rate-limit you, deprecate models under you, and fail in ways your existing retry logic makes worse. For a developer, LLMOps reframes “AI in production” into familiar engineering territory — traffic management, resilience patterns, cost budgets, and telemetry — with one crucial difference: the failure you must catch most often is not an error but a silent change in output quality.
Production LLMs fail silently; telemetry has to catch quality, not errors.
Start here: observability and the gateway, the foundations of LLMOps
Two concepts carry everything else in this theme, and they mirror a pattern every backend engineer already knows: instrument what you run, and put a control point in front of what you don’t.
With these two in place — a gateway you control and traces you can query — every layer in the next tier has somewhere to live and a way to be measured.
The core LLMOps control loop: routing, cost, resilience, versioning
This tier is where the day-to-day production decisions live, and each of its four layers plugs into the foundations: the gateway enforces them, observability verifies them.
Run these four and you have a system that routes sensibly, spends predictably, survives outages, and knows what version of itself is running. What it doesn’t yet have is proof — that it holds under load, that changes actually improve it, and that its records would satisfy an auditor. That is the next tier.
Advanced LLMOps: load testing, experimentation, and audit-grade logging
This tier separates a system that works from a system you can defend — to an SRE, a compliance officer, or your own postmortem.
The last topic operates inside the request itself. Context window management decides what fits into the model’s token budget — conversation summaries, sliding windows, priority-based packing — and it is where latency, cost, and quality collide in a single decision. The token limits that shape every LLM interaction explains the constraint, and how real products handle context limits shows how teams resolve it now that 10M-token windows compete with compression.
How the LLMOps traffic layers differ
The three traffic-control concepts in this theme — gateway, routing, fallback — get used interchangeably, and the confusion produces real architecture mistakes. They answer different questions:
LLM gateway
Model routing
Fallback and retry
Question it answers
Where do all requests pass through
Which model should serve this request
What happens when the call fails
When it acts
Every request, always
Per request, before the call
Only on failure or timeout
Optimises for
Control, auth, unified logging
Cost, latency, quality fit
Availability
Failure it prevents
Key sprawl, unmanaged providers
Overpaying frontier models for trivial queries
One provider outage taking your feature down
Three more pairs blur just as often:
Observability vs logging and auditing. Observability serves engineers debugging behavior — traces, latency, regressions. Logging and auditing serves records that outlive the incident — compliance, cost attribution, redaction. Same raw events, different consumers, different retention rules.
Load testing vs A/B testing. Both are experiments, but load testing varies traffic against one configuration, while an A/B test varies configuration under real traffic. One proves capacity, the other proves improvement — neither substitutes for the other.
Model registry vs gateway config. The gateway knows which endpoint receives traffic right now; the registry knows which artifact and version that endpoint serves and how it got promoted. Teams that keep only gateway config lose the rollback trail.
Common questions
Q: Where should I start with LLMOps as a backend developer?
A: Instrument before you optimize: without traces you cannot see which layer needs work. Start with span-based tracing for prompt chains, then put a gateway in front of your providers — the rest of the stack plugs into those two.
Q: Do I need a full gateway, or is a retry library enough?
A: A retry library saves a single service from transient errors; a gateway pays off once multiple apps, providers, or teams share LLM traffic and need one place for auth, limits, and failover. The LiteLLM and Portkey deployment guide shows what a gateway adds beyond retries.
Q: Should I cut costs with model routing or with caching?
A: They attack different waste: routing stops you overpaying for simple queries, caching stops you paying twice for repeated context. Route first if traffic is varied, cache first if prompts repeat. Model tiering vs prompt caching gives the decision rules.
Q: Why did output quality drop when nothing was deployed?
A: Usually a change you didn’t make: a provider updated a model, a fallback silently switched routes, or accumulated context crossed a truncation threshold. Silent model switching and opaque fallbacks covers the accountability gap; regression alerts on your traces are how you catch it early.
Q: What do I need in place before running LLM A/B tests?
A: Stable observability, cost attribution per variant, and an evaluation method you trust — statistical power over LLM outputs is far harder to reach than over click-through rates. How controlled experiments evaluate prompt and model variants lists the prerequisites.
Q: How do I plan capacity for an LLM feature before launch?
A: Load test with token-aware metrics, not requests per second — streaming makes TTFT and tokens-per-second the numbers users actually feel. Load testing architecture: key components and metrics covers what to measure and which bottlenecks appear only under concurrency.
Developer orientation
Coming from software engineering? Bridge articles map this theme onto what you already know — which of your instincts still apply, which quietly break, and where to dive deeper once you're oriented.
LLM observability applies distributed tracing to AI chains. Five span types (LLM, Task, Workflow, Tool, Agent) give each step a measurable, queryable identity.
LLM gateways add 2–240ms overhead. Latency is rarely the bottleneck — single points of failure and security vulnerabilities are the real engineering tradeoffs.
LLM gateways govern AI traffic via four components: rate limiting (RPM/TPM/budget), scoped virtual keys, semantic caching, and per-request observability.
LLM observability needs baselines before the first trace. No tool prevents hallucinations or non-deterministic output — only detects them after the fact.
Model routing is a decision layer between your app and multiple LLMs that directs each request to the optimal model by cost, latency, or task complexity.
LLM cost management controls token-based API costs at production scale. Output tokens cost 2–6× more than input; doubling context quadruples attention compute.
Model routing rests on three prerequisites: token cost asymmetry, P99 latency SLOs by workload, and circuit breaker fallback logic for provider failures.
LLM load testing measures TTFT, TPS, and p99 latency under concurrent load. KV-cache GPU memory—not CPU threads—is the bottleneck REST API benchmarks miss.
LLM logging captures prompts, tokens, latency, and costs per call. OTel GenAI trace hierarchies let teams reconstruct what a production system did — and why.
Production LLMs use sliding windows, KV caching, and summarization to manage context. GPU memory — not token limits — defines the real ceiling in 2026.
LLM logging at scale pits capture fidelity against PII risk and cost. Tail sampling, PII redaction, and immutable audit logs are the tradeoffs teams navigate.
Operating an LLM in production looks like running any other service until the answers rot with the dashboard still green. Map which ops instincts transfer and where they break.
LiteLLM (MIT) and Portkey (Apache 2.0) are the top LLM gateways in 2026. Learn fallback routing, semantic caching, and the self-host vs managed decision.
Add trace-level visibility to your LLM app with Langfuse 4.12.0 or LangSmith. SDK wiring, agent debugging, and the self-hosting decision tree in one guide.
LLM cost management uses two levers: model tiering and prompt caching. Route to cheaper models for simple tasks; cache shared prefixes when they repeat.
MLflow 3.14, W&B Registry, SageMaker, and DVC compared for 2026. MLflow stages are deprecated. Maps each tool to team size, stack, and deployment pattern.
Set up a reproducible ML model registry with MLflow 3.14 and DVC 3.67. Stages are deprecated — use model aliases and environment-based promotion instead.
Three levers cut LLM API bills in 2026: model routing via LiteLLM, batch APIs at 50% discount, and prompt caching with 90% savings on repeated context.
LLM-as-judge reaches >80% human-rater agreement at far lower cost. Build a bias-resistant scorer for prompt quality, latency, and cost in LLM A/B tests.
Build a production LLM A/B testing pipeline with Braintrust, Langfuse, and Promptfoo — version prompts, split traffic, and score variants before shipping.
Structured LLM logging in 2026: architect a pipeline with Langfuse v3, MLflow 3.14, and OTel gen_ai.* that covers cost attribution and GDPR compliance.
DAN tracks how this domain is evolving — which models, techniques, and benchmarks are reshaping 2026.
LLM observability in 2026: ClickHouse acquired Langfuse, Traceloop merged into ServiceNow. Compare Langfuse, LangSmith, and Arize Phoenix for production monitoring.
llmperf was archived December 2025. GuideLLM v0.6.1 and AIPerf v0.10.0 replace it, while production multi-modal latency runs far above vendor benchmarks.
LangSmith, AgentOps, and Arize Phoenix lead LLM logging in 2026. OTel GenAI conventions are pushing all three toward unified compliance-grade agent tracing.
LLM A/B testing moved from manual prompt tweaks to automated optimization in 2026. Prompt changes are now the leading source of LLM regressions in production.
Two major LLM gateways were acquired in 2026. When all AI traffic flows through a third party, data sovereignty, liability, and supply chain risk follow.
LLM gateways expose silent model switches to developers — not to users. The accountability gap is structural; no current regulation requires closing it.
LLM cost cuts route lower-budget users to weaker models — and emerging research links model tiering to measurable access inequality and bias amplification.
Automated model promotion in ML registries creates accountability gaps — no named human owns the deployment decision. Governance frameworks demand that change.
Black-box AI routing substitutes cheaper models by default, without disclosure. EU AI Act Article 50 requires only AI-use disclosure, not model identity.
Shared LLM APIs have no explicit load testing policy. Every load test consumes shared infrastructure, energy, and water — costs invisible to the tester.
LLM audit logs are behavioral records, not telemetry. GDPR employee consent for monitoring is invalid under EDPB — who the log serves is a design choice.
Undisclosed LLM A/B tests optimize for winning metrics. When a winning variant causes harm at scale, no law specifically assigns accountability as of mid-2026.