LLM Rate Limits Explained: Technical Analysis and Client-Side Practices

    This article breaks down how large language model (LLM) service rate limiting works and what client applications can do about it. Using a recent incident where a major chat service began rejecting requests for "insufficient compute" as a sample of supply-demand imbalance, it explains why limits typically tighten across three dimensions at once: session lifetime, single-input length, and daily quotas. It then connects each limit to the underlying cost of prefill, decode, and KV Cache usage, outlines four architectural impacts on applications, and presents practical responses: externalizing session state, compressing context with rolling summaries and retrieval, chunking long inputs with a Map-Reduce flow, managing a local quota budget with backoff retries, and building observability with graceful degradation. It closes with capacity planning and cost guidance for keeping LLM-dependent systems stable under compute constraints.

    1. The Signal: Rate Limits Are Three-Dimensional Resource Constraints, Not a Single Switch

    Recently, multiple users reported that a major LLM chat service began showing pop-up messages in both its mobile app and web client, citing “insufficient compute.” From an engineering perspective, this is not a feature being retired. It is the server side activating admission control under load pressure. Abstracting the raw reports, three dimensions are being tightened simultaneously:

    1. Session lifetime constraint: Long conversations that have existed for more than 7 days with no active interaction for an extended period are no longer supported.
    2. Single-input length constraint: The per-request text limit has been reduced to roughly 40,000 characters.
    3. Periodic quota constraint: A daily conversation cap is enforced, after which users are told the quota has been reached.

    As of the original reporting, no unified limit rules had been published and no recovery timeline had been given. This combination of opaque rules plus dynamically adjusted thresholds is exactly the kind of uncertainty engineering teams need to defend against.

    This article does not evaluate or recommend any specific product. It treats the incident as a common industry sample of compute supply-demand imbalance and discusses general-purpose LLM rate limiting mechanisms and client-side responses.

    2. Why These Three Dimensions: How the Compute Ledger Works

    LLM inference cost is driven mainly by two phases: prefill and decode. Prefill scales roughly linearly with the number of input tokens, while decode depends on output length and concurrent batch size. In long conversations, the KV Cache accumulates across turns, creating a dual burden on GPU memory and bandwidth. This explains the design intent behind the three dimensions:

    • Capping single-input length directly reduces peak compute and memory usage per prefill, preventing a few oversized requests from dragging down an entire inference batch.
    • Limiting session lifetime reclaims cache and state resources held by long-idle sessions, preventing “zombie sessions” from occupying resources in a continuously billed manner.
    • Limiting daily quota performs quota partitioning of scarce compute across time and users, achieving relatively fair scheduling.

    The server-side admission logic can be expressed in pseudocode:

    1. def admit(session, request, user_quota):
    2. if session.age_days > 7 and session.idle_hours > 24:
    3. return Reject("STALE_SESSION")
    4. if count_tokens(request.text) > 40000:
    5. return Reject("INPUT_TOO_LONG")
    6. if user_quota.used_today >= user_quota.daily_limit:
    7. return Reject("QUOTA_EXCEEDED")
    8. return Allow()

    The three checks are joined by logical AND: failing any one results in rejection. This is why users see different messages in different scenarios.

    3. Four Impacts on Application Architecture

    1. Long-lived session state becomes a liability: Stuffing the full history back into the context on every turn stops working once session lifetime is capped.
    2. Long-document pipelines break: Scenarios that feed long text in a single shot must shift to chunking and retrieval.
    3. Quota becomes a new capacity dimension: Capacity planning expands from “QPS + latency” to “QPS + latency + daily quota.”
    4. Error semantics need remapping: Rate limiting is not a failure but an expected backpressure signal, and should be handled separately from 5xx errors.

    4. Engineering Responses

    4.1 Externalize State: Do Not Depend on Session Longevity

    Persist session facts in your own storage (object storage, a relational database, or a cache service), leaving the model side responsible only for “stateless inference.” Even if the platform reclaims long conversations, business context can still be rebuilt.

    1. {
    2. "session_id": "s-10086",
    3. "created_at": "2025-11-01T08:00:00Z",
    4. "last_active_at": "2025-11-16T09:12:00Z",
    5. "summary": "User is debugging inference timeouts, confirmed to be related to batch size",
    6. "facts": ["Using 4 accelerator cards", "SLA target 800ms"]
    7. }

    4.2 Context Compression: Rolling Summary Plus Retrieval

    Replace “full history” with “summary plus key snippets.” Update the summary incrementally after each turn, send the raw history to a vector store, and recall the Top-K snippets on demand. Sketch:

    1. def build_context(session, query, k=4):
    2. parts = [session.summary]
    3. parts += retrieve(session.id, query, top_k=k) # vector retrieval recall
    4. parts.append(query)
    5. text = "\n".join(parts)
    6. return truncate_by_token(text, limit=12000) # reserve output budget

    The key point is to reserve budget for output: the input limit is not the usable input. Compute it as min(input limit, total window - expected output).

    4.3 Input Chunking and Two-Stage Processing

    To handle the roughly 40,000-character input cap, use a Map-Reduce style flow: first extract key points per chunk (Map), then aggregate them into a conclusion (Reduce). Prefer natural semantic boundaries (paragraphs, headings, code blocks) for chunk edges to avoid breaking meaning through truncation.

    4.4 Quota Budgeting and Backoff Retries

    Maintain a local quota ledger on the client, combined with exponential backoff and jitter, to avoid a retry storm after hitting the cap:

    1. import random, time
    2. def call_with_budget(fn, budget, max_retry=5):
    3. for i in range(max_retry):
    4. if budget.remaining() <= 0:
    5. budget.wait_until_reset() # wait for the quota window to refresh
    6. try:
    7. return fn()
    8. except RateLimited:
    9. time.sleep(min(2 ** i, 30) * (0.5 + random.random()))
    10. raise BudgetExhausted()

    Also recommended: merge and deduplicate requests locally, cache results for frequent similar questions, and schedule batch jobs during off-peak windows of the quota cycle.

    4.5 Observability and Degradation

    Bring rate-limit error codes into the monitoring and alerting system, and track metrics such as “quota utilization,” “truncation trigger rate,” and “summary update failure rate.” When quota is exhausted, degrade to retrieval-based answers or templated replies to keep the pipeline from breaking.

    5. Capacity Planning and Cost Perspective

    Rate limits essentially turn elastic compute into planned resources. Teams should establish three baselines: average token cost per request, daily active sessions, and peak concurrency. Use these to back-calculate the required quota, and keep 20%–30% headroom for bursts. If the business demands high stability, combine multi-model routing with self-hosted inference as a fallback, placing critical paths on controllable resources.

    6. Conclusion

    Tighter rate limit rules are a reminder for developers to treat “model availability” as an external dependency that must be budgeted, monitored, and degraded gracefully. Externalizing context, compressing input, governing quota, and building observability are the four fundamentals for staying stable under compute constraints. When the rules will be relaxed is not up to the application side, but the resilience of the architecture is up to us.