The Direct Answer

LLM gateway performance metrics are the measurements that show whether a routing layer is delivering acceptable service quality, speed, reliability, and cost under production traffic. The most useful dashboard normally tracks end-to-end latency, time to first token, tokens per second, request success rate, error rate, availability, throughput, queue time, token usage, and cost per successful request. These should be segmented by model, tenant, route, prompt length, output length, status code, and time period because a single blended average can hide serious failures. Latency is not purely a provider property: network distance, gateway processing, queueing, input size, output length, retries, streaming behavior, and regional placement all affect the result.

Also worth reading: How Should Teams Load-Test an LLM Gateway Before Production in 2026? · How Do You Plan LLM Gateway Capacity for Reliable Production Traffic? · How Do You Choose the Right LLM Gateway Evaluation Metrics in 2026?

For an interactive application, begin with p50, p95, and p99 time to first token, followed by total generation latency and output throughput. For asynchronous batch workloads, completion time and cost per completed job may matter more than time to first token. For customer-support automation, quality and task completion should sit beside infrastructure metrics; a fast response that produces an incorrect or unsafe answer is not successful. No universal threshold fits every model or prompt, so performance targets should be derived from product requirements, tested baselines, and explicit service-level objectives.

Latency, Streaming, and Throughput

Latency is usually the first concern users notice, but it needs to be divided into components rather than reported as one opaque duration. Time to first token measures how quickly the user sees the beginning of an answer, while inter-token latency describes pauses between subsequent tokens. Total request latency covers the entire operation and therefore rises with output length. A gateway should also expose gateway overhead separately from model-provider time, ideally by recording timestamps before routing and after the response stream closes.

A practical initial target for a premium interactive application might be p95 time to first token below 1.5 seconds, p95 inter-token latency below roughly 150 milliseconds per token, and p99 total latency within an agreed bound for the selected model. Those are planning targets, not universal standards. A reasoning model, a long-context request, or a geographically distant endpoint may not meet them, while a short classification request may exceed them without creating a meaningful user problem. Report percentiles over completed requests and include request counts beside them, because a p99 based on 20 observations is not comparable to a p99 based on 200,000.

Throughput can be measured as requests per second, concurrent requests, input tokens per second, output tokens per second, or completed jobs per minute. Output tokens per second is particularly useful for streaming generation, but it can be misleading if the metric includes idle queue time. Capacity tests should use realistic distributions of prompt lengths, output limits, conversation histories, streaming versus non-streaming modes, and concurrency. Results from a 100-request benchmark with short prompts should not be used to predict a production platform carrying long support conversations.

Reliability, Errors, and Availability

Reliability metrics determine whether the gateway is merely fast during favorable conditions or dependable when providers, networks, and applications fail. Track request success rate, provider error rate, gateway-generated 4xx and 5xx responses, timeout rate, retry rate, circuit-breaker activations, and availability by route. Define success carefully: a 200 response is not necessarily a successful generation if the body contains a provider error, malformed tool call, truncated stream, or policy rejection.

Availability should be calculated from the service-level indicator that users experience, not from the gateway process alone. If the gateway has 99.99% availability but the selected model endpoint is unavailable, the end-to-end service is not available. The same distinction applies to streaming responses, where a connection may open successfully and fail halfway through generation. Record partial completions and stream interruptions separately from failures that occur before any output is produced.

For many production systems, 99.9% availability corresponds to no more than about 8.77 hours of unavailability in a 365-day year, while 99.99% allows roughly 52.6 minutes. Those figures are mathematical ceilings, not automatic achievements. Retries, failover, regional routing, and provider diversity can improve resilience, but automatic retries can also multiply costs and latency unless they use bounded exponential backoff, respect retryable error classes, and avoid duplicating non-idempotent operations.

Cost, Token Usage, and Efficiency

LLM gateway cost extends beyond the provider's published token price. It includes uncached input tokens, cached input tokens where applicable, output tokens, reasoning or hidden computation charges where a provider applies them, retries, tool calls, embedding or reranking requests, observability storage, and gateway compute. Average cost per request is easy to calculate but incomplete because a 300-token classification call and a 20,000-token document analysis have very different economics. Cost per successful request is more useful when the gateway can determine whether the result was accepted, completed, or required a fallback.

Track input, output, cached, and total token counts separately, then join them to latency, status, tenant, model, and outcome. A 15% reduction in average token price is not a 15% reduction in total operating cost if retry volume rises from 2% to 12%. It is also misleading to compare providers without normalizing tokenization, reasoning behavior, and billing units. Run a controlled workload suite against each candidate and report both technical results and invoice-level cost estimates.

Caching can reduce repeated input charges and latency, but cache hit rate must be weighed against privacy, freshness, and tenant isolation. A shared cache that returns one customer's sensitive prompt to another is a worse outcome than an expensive miss. As a starting operating range, many teams investigate cache optimization when hit rates remain below 20% on workloads with repeated context, while highly repetitive applications may justify engineering work above 50%. Exact breakpoints depend on the traffic pattern and provider pricing.

Quality and Routing Metrics

Performance becomes commercially meaningful only when the generated result satisfies its purpose. Pair infrastructure measurements with evaluation scores, tool-call validity, citation correctness, refusal rate, schema adherence, and human or customer feedback. For a support product, track resolution rate, escalation rate, duplicate-contact rate, and response acceptance. For a coding agent, track patch pass rate, tests passed, rollback rate, and task completion rather than treating token speed as evidence of productivity.

Routing metrics should show how often each model is selected, how often a fallback occurs, and how quality, latency, and cost change after a route switch. Comparing models only through generic benchmarks can miss differences in domain performance, prompt adherence, and output length. Maintain a controlled A/B or shadow test for at least one representative traffic cycle; for many teams, that means one to four weeks, with more time when traffic is seasonal or low volume. Stop an experiment early only when predetermined safety or quality criteria are violated, not merely because an early cost graph looks favorable.

The gateway should preserve model, route, prompt-template, policy, and experiment identifiers in observability records. Without that metadata, teams can see that latency increased but cannot determine whether the cause was a larger prompt, a particular model, a new retry policy, or a provider incident. The objective is not maximal instrumentation; it is enough segmentation to connect a metric change to a specific operational decision.

Gateway Options Compared

An LLM gateway can be a lightweight internal router, a cloud-managed service, a general API gateway augmented for AI traffic, or a specialized AI gateway. Each option addresses different parts of the problem, and the fastest option is not always the cheapest or safest. The table below compares common architectural choices rather than endorsing a particular vendor.

FeatureLightweight internal routerCloud or managed gatewayGeneral API gateway with AI extensionsSpecialized open-source AI gateway
Initial engineering effortLow to moderateLowModerate to highModerate to high
Control over routing and policyHigh, within engineering scopeProvider-dependentHigh for standard API controlsHigh for AI-specific controls
Operational ownershipYour teamUsually sharedYour platform teamYour platform team
Best fitSmall, stable workloadsTeams seeking speed of adoptionOrganizations already standardized on API gatewaysRegulated or high-volume AI platforms
Main limitationLimited managed resilience at small scaleLess portability and customizationAI behavior may require custom componentsMore upgrade, security, and capacity work
General API gateways remain useful for authentication, rate limiting, quotas, and traffic governance. They do not automatically understand token economics, streaming interruptions, model-specific errors, semantic caching, or provider-specific fallback behavior. Specialized AI gateways can add those capabilities, but an Envoy-based gateway, a proprietary cloud gateway, and an LLM comparison tool solve different problems. Assess gateway overhead against the workload: shaving 20 milliseconds from a 12-second generation may have little value, while shaving 200 milliseconds from time to first token can materially improve an interactive experience.

A Practical Measurement Program

Start by writing a workload profile before selecting metrics. Record typical and p95 input length, expected output length, concurrency, streaming behavior, geographic distribution, latency tolerance, quality floor, and monthly volume. Then define service-level indicators for each workflow, such as interactive chat, asynchronous extraction, and batch generation. Separate indicators where one route is optimized for latency, another for quality, and another for cost.

Instrument at least four points: client ingress, gateway decision, provider request, and final response completion. Include request IDs, model, provider, route reason, experiment assignment, token counts, status, retry count, and timestamps. Redact prompt content by default or apply strict access controls, because observability systems can become sensitive data stores. Set a retention period based on debugging needs and regulatory requirements, and verify sampling behavior during incidents.

Run a baseline before changing architecture. Test cold and warm cache paths, single-request and concurrent workloads, provider failure scenarios, and at least one long-context workload. Compare p50, p95, and p99 values rather than averages alone, and calculate the incremental gateway overhead relative to direct provider access. Review the results with product, support, finance, security, and platform stakeholders, because quality, cost, and reliability often have different owners.

Common Mistakes and When to Act

The most common mistake is optimizing a global average. Averages can look healthy while a small percentage of customers experiences severe delays, and they can also be distorted by extremely long requests. Another error is comparing models using the same prompt but different maximum output settings, decoding modes, context limits, or retry behavior. Tool-enabled applications also need separate tests because tool calls add latency and can fail independently of text generation.

Do not treat a higher request rate as proof of higher capacity. A gateway may report hundreds of accepted requests per second while provider queues grow and time to first token deteriorates. Alert on trends and burn rates, not just static thresholds: for example, warn when p95 time to first token doubles for 10 minutes and page when sustained failures exceed 5% for 5 minutes. Thresholds should reflect user impact and traffic volume, so a fixed percentage may be appropriate for a large system but meaningless during a quiet period.

Act on latency when customers interact with the response, especially when pauses occur before the first visible token or during streaming. Act on error rates when failures affect transactions, support resolution, or agent workflows. Act on cost when spend grows faster than value-producing volume, routing is fragmented, or retry and fallback behavior is uncontrolled. If quality is already below its required threshold, a faster or cheaper model is not an improvement merely because its performance metrics are favorable.

A Practical Decision Framework

Choose a gateway by matching architecture to the workload and organizational capacity. A lightweight router may be enough for a single team with modest traffic and limited compliance requirements. A managed service can shorten implementation time, while an API gateway or specialized open-source gateway offers more control for organizations operating many models, tenants, policies, or regions. The decision should include total cost of ownership: engineering time, on-call burden, observability, security, upgrades, provider portability, and incident response.

Set a 30-day initial target for establishing a baseline and identifying the largest three contributors to poor experience. Within 60 to 90 days, teams can usually decide whether routing, caching, batching, regional placement, or provider changes materially improve results. That timeline is a planning assumption, not a guarantee; regulated environments and complex model evaluations may require longer. Re-run the benchmark whenever providers alter models, pricing, limits, or traffic mix.

The definitive answer is therefore not one number but a governed measurement system. Track latency percentiles, streaming behavior, throughput, reliability, cost, and outcome quality by route and workload. Use specific numbers as operating inputs rather than universal standards: 99.9% or 99.99% availability, p95 and p99 latency, cache hit rates, retry rates, and cost per successful request should all be tied to explicit service objectives. The best gateway is the one whose performance, failure modes, and tradeoffs remain visible when the workload changes.