When LLMs Become Slow or Unreliable: Distinguishing Service Outages from Capability Drift

    This article provides a systematic framework for diagnosing issues in large language model (LLM) services, distinguishing between service availability problems and capability drift. It covers infrastructure troubleshooting steps, monitoring metrics, evaluation methods using fixed regression test sets, multi-model routing strategies, and a practical trade-off analysis between code and language capabilities.

    When a large language model service malfunctions, users tend to observe similar symptoms even though the underlying causes may differ. To resolve issues effectively, it’s critical to separate two categories of problems.

    1. Two Distinct Problem Categories

    Service Availability vs. Capability Drift

    Service availability issues manifest as request timeouts, HTTP 429 or 5xx responses, and interrupted streaming output. These are typically mitigated with monitoring, retries, and circuit breakers.

    Capability drift, on the other hand, appears as a decline in output quality for the same type of task—such as lower code pass rates or stiffer, less natural copywriting. This requires a dedicated test suite to confirm.

    The first step in diagnosis is gathering evidence. Service outages usually show a clear distribution of status codes and latency changes, affect multiple users concurrently, and may be listed on the provider’s status page. Capability drift produces no error codes and normal latency—only your own test set reveals a quality decline.

    For every investigation, record:

    • Request / trace IDs
    • Status code distribution
    • Time-to-first-token and total latency
    • Provider status page information

    This data is essential for determining whether the issue lies with the provider, your gateway, or the client.

    Web UI vs. API Calls

    Troubleshooting should also distinguish between web-based interfaces and API calls. Web UI slowness may stem from frontend rendering, request queueing, or account rate limits—internal call chains are hidden from users. API calls traverse your own gateway, message queues, and provider rate limiting policies, where each layer can become a bottleneck.

    Tracking Model Updates

    Providers generally do not disclose training details for each model update. External developers can only observe version numbers, API behavior, and their own test results. The most reliable signal for capability change is historical performance on a fixed test set—not subjective user reports.


    2. Infrastructure Troubleshooting Checklist

    When diagnosing service anomalies, work through the following steps from the easiest to verify to the most complex.

    Step 1: Identify Error Types

    • 429: Rate limiting or quota exhaustion.
    • 5xx: Server-side errors.
    • Client-side timeout: Your timeout setting is shorter than the model’s actual generation time. Long-context generation is time-consuming; gateway default timeouts are often too short, a common source of false positives.

    Step 2: Inspect Your Own Side

    Verify connection pool sizes, DNS resolution, proxy configuration, and gateway timeouts. Retry logic without exponential backoff and a maximum attempt limit can amplify traffic during an outage and trigger a retry storm.

    Step 3: Examine the Queue

    If a message queue sits upstream, monitor queue length and consumption lag. During traffic spikes, requests accumulate and user-facing latency rises even when the model itself is healthy.

    Step 4: Check Concurrency and Scaling

    Scaling takes time. If traffic surges within seconds but provisioning requires minutes, requests will queue or fail in the interim. Set a maximum concurrency limit per upstream model; excess requests should queue or degrade gracefully rather than overwhelming a single service.

    Step 5: Implement Circuit Breaking

    When the error rate for a model exceeds a threshold within a sliding window, the circuit breaker opens. Requests then route to a fallback model or return cached results. After a cooldown period, inject a small number of probe requests; upon success, close the circuit.

    Step 6: Guarantee Idempotency

    If the generation result triggers a database write or downstream side effect, include an idempotency key in retries. Without one, the same request can create multiple records.

    Metric Description
    p50 / p95 / p99 time-to-first-token Latency to the first output token
    p50 / p95 / p99 total latency End-to-end request latency
    Error rate by status code Group by upstream model and code
    Timeout rate Proportion of requests exceeding limits
    Queue length Pending requests in the buffer
    In-flight requests Concurrent requests in progress
    Token throughput Tokens generated per minute
    Cost per request Unit economics per request

    Group metrics by upstream model and status code. Use both 1-minute and 5-minute windows. The following thresholds are starting points—adjust to your own traffic baseline:

    • Alert when the 5-minute error rate exceeds 2%.
    • Alert when p95 latency exceeds twice the baseline for the same time window over the last 7 days.

    3. Evaluating Capability Drift

    A single run is insufficient to assess quality, since the same model and prompt can produce different outputs each time. A reliable approach is to build a fixed regression test set and run it before and after every model version change. Run each sample multiple times per evaluation and compare the distribution of results, not individual outputs.

    1. Code Generation
    Provide function specifications and unit tests. Measure pass rate as the metric. Pass rates are automatically determinable and ideal for regression comparison.

    2. Logical Reasoning
    Use questions with unique correct answers—math word problems, rule-based judgment, structured information extraction. Score by exact correctness: numbers, options, or JSON fields must be precisely comparable by a program.

    3. Instruction Following and Language Style
    Require fixed output lengths, specific JSON structures, or style-specific copywriting. Format constraints can be validated with rule-based scripts. Tone quality can be evaluated via double-blind human scoring or a fixed reviewer model—note the reviewer model’s version.

    Evaluation Procedure

    • Fix temperature and top_p at 0 (or the provider’s minimum). Record the model version, run date, and prompt version.
    • Run each sample 5–10 times and record pass counts and average scores.
    • Use at least 50 samples per category.
    • Compare pass-rate differences between two runs and calculate confidence intervals. If the 95% confidence interval includes zero, the change may be random variance.
    • Only treat it as a regression if the drop exceeds a pre-set threshold (e.g., 5 percentage points) and the confidence interval excludes zero. Set the threshold when establishing the baseline—do not adjust it retroactively.

    Test Set Management

    Manage the test set in template form. Each sample should record:

    • Task category
    • Input
    • Evaluation method
    • Sample count
    • Pass threshold
    • Version number and run date

    This ensures results can be aligned across different time periods.


    4. Multi-Model Routing and Degradation

    Relying on a single model exposes you to direct impact from any outage. Multi-model routing aims to keep the system functional when one model fails while controlling cost.

    Step 1: Classify Requests by Task

    Separate requests into high-quality and standard needs. Code generation, complex reasoning, and long-document analysis typically require the primary model. Summarization, classification, and light rewriting can be handled by smaller, cheaper models. Store classification rules in configuration and tune them based on test results.

    Step 2: Configure Primary and Fallback Models

    Assign at least one fallback model per task category. Prefer fallback models from a different provider to avoid shared failure points. Both models must produce identical output schemas—otherwise downstream parsing breaks after a switch.

    Step 3: Set Circuit Breaker Thresholds

    Track error rate and timeout rate in a sliding window. When the threshold is exceeded, the breaker opens and requests route to the fallback model.

    Step 4: Choose Degradation Actions

    In priority order:

    1. Serve from cache if a hit exists.
    2. Enter a bounded queue and inform the user of the estimated wait.
    3. Switch to a smaller model and clearly label the source of the result in the UI.
    4. Return an explicit failure message.

    Degradation actions need business-side sign-off. Never let the system quietly produce obviously inferior output.

    Step 5: Probe and Roll Back

    While the circuit is open, inject small probe requests periodically. Once the probe success rate stays above a target for a sustained period, gradually shift traffic back to the primary model—e.g., start with 5%, observe for 10 minutes, then ramp up to 100%. Continue monitoring capability test results from Section 3 throughout the recovery, as the primary model may be available but still underperforming.


    5. Weighing Code vs. Language Capabilities

    A common challenge is choosing between models strong in code generation versus those strong in language tasks. The evidence bases and applicability conditions differ; they cannot be combined into a single score.

    Dimension Code Capability Language Capability
    Typical tasks Function generation, test fixing, code review Copywriting, summarization, style transfer
    Primary evidence Unit test pass rate Human or reviewer model scoring
    Judgment stability High; results are automatically reproducible Medium; scorer variance exists
    Suitable conditions Well-defined requirements with executable tests Clear stylistic requirements
    Unsuitable conditions Vague requirements with no writeable tests No explicit scoring criteria

    Key takeaways:

    • High code pass rate does not imply strong performance on Chinese copywriting.
    • High language scores do not guarantee correct handling of complex edge cases.
    • If your workload includes both task types, test them separately, set independent thresholds, and then decide routing rules. A composite score cannot indicate which model each request type should route to.

    Before switching models, gather data on both capabilities from your own test set, and record the version and conditions of each evaluation. With sufficient data, your judgment will be more reliable than any single evaluation metric.