LLM Cost Evaluation After Peak and Off-Peak Pricing Changes

    This article explains how to evaluate large language model costs when providers introduce peak and off-peak pricing, cache-hit and cache-miss input pricing, and different input/output rates. It covers why a low unit price does not necessarily mean low overall cost, how cache-hit input affects real spending, how to separate real-time and offline tasks, why agents are especially cost-intensive, and which engineering and scheduling practices can make usage costs more manageable.

    As LLM applications move from simple question answering into code generation, knowledge retrieval, automated execution, and multi-step intelligent agents, call volume, context length, and task duration are all growing quickly. Price is no longer just a unit rate in a console; it directly affects whether developers are willing to rely on a capability over the long term.

    Some model services have recently adopted more pronounced peak and off-peak pricing after price adjustments: calls made at different times cost different amounts, cached and uncached input are priced differently, and input and output fees also differ. For occasional users, this change may look like a small fluctuation on a bill. But for continuously running agents, automated programming workflows, or internal automation systems, the price structure itself has become part of architecture design.

    1. Why a Low Unit Price Does Not Mean Low Overall Cost

    When evaluating model services, many people first compare input and output unit prices. But the actual bill is usually determined by several factors together:

    1. The total volume of input text;
    2. Whether input content hits the cache;
    3. The length of model output;
    4. How many rounds a task requires;
    5. Whether calls happen during peak or off-peak periods;
    6. Whether there are tool calls, retrieval, retries, and context appends;
    7. Whether a task maintains a long historical context over time.

    As a result, the same “completed task” can produce costs that differ by orders of magnitude depending on implementation.

    A simplified formula for the cost of a single task is:

    1. total_cost =
    2. uncached_input_tokens × uncached_input_unit_price
    3. + cached_input_tokens × cached_input_unit_price
    4. + output_tokens × output_unit_price
    5. + retry_cost
    6. + external_tool_and_retrieval_related_cost

    If the service uses peak and off-peak pricing, different time periods must also be calculated separately:

    1. total_cost =
    2. peak_period_call_cost
    3. + shoulder_period_call_cost
    4. + off_peak_period_call_cost

    This shows that looking only at the “lowest officially announced price” does not represent the real experience. What matters is the share of each type of token under your own task structure, when actual calls are concentrated, and how many rounds of interaction a single task requires on average.

    2. Why Cache-Hit Input Affects the Final Judgment

    For intelligent agents, cache-hit input is often an important part of the cost structure.

    A typical agent task usually includes fixed system prompts, role constraints, tool descriptions, business rules, and historical context. Among these, system instructions and tool definitions may remain unchanged across multiple requests. If the service can identify this repeated content and bill it at a lower rate, the cost pressure caused by long context can be eased to some extent.

    For example, an automated development agent may carry the following content in every round of requests:

    • Fixed role and safety rules;
    • Definitions of callable tools;
    • Project directory structure;
    • Background explanation of the current task;
    • Previous rounds of conversation records;
    • The latest execution results and error logs.

    The first few items usually change little, while the latter items continue to grow. If the fixed part can be cached, overall cost may remain acceptable. But if the cache hit rate is low and every round is billed as full input, the cost of running a task for an hour may be far higher than expected.

    Therefore, “lower cached input pricing” can indeed help some model services maintain strong cost-effectiveness, but it does not mean every scenario is cheap. Whether caching is effective depends on the following factors:

    1. Whether the prompt is stable

    If the system prompt is dynamically assembled on every request, or if timestamps, random identifiers, or temporary states are placed in a fixed prefix, content that could have been reused may fail to hit the cache.

    2. Whether context is organized reasonably

    Placing frequently changing content at the front of a long text may change the overall prefix for subsequent requests. A more reasonable approach is to put stable content first, dynamic content later, and keep the structure as consistent as possible.

    3. Whether requests are continuous

    Consecutive calls for the same task usually form a more stable context structure than multiple completely independent short requests. But continuous context also keeps expanding, so summarization and trimming are needed; otherwise, savings from cache hits may be offset by overly long context.

    4. Whether retries are frequent

    Network errors, format errors, and tool execution failures can all trigger retries. If retry requests carry the full context, costs can accumulate quickly. Systems should distinguish recoverable errors from unrecoverable errors and avoid unconditional repeated calls.

    3. The Core Debate Around Peak and Off-Peak Pricing: Is the Price Direction Reasonable?

    Peak and off-peak pricing is not a problem in itself. For computing and inference resources, load does differ across time periods, and providers can use pricing to guide users toward off-peak usage, which helps smooth resource demand.

    The question is whether developers see this pricing as matching actual usage patterns.

    Many individual developers, startups, and organizations concentrate their working hours during the day. Development, testing, integration, and deployment often happen during working hours. If peak periods correspond to main production time, then peak and off-peak pricing may be perceived as an additional burden. Conversely, if low-price periods fall during users’ rest time, it is difficult for users to actually move production tasks there.

    A more reasonable peak and off-peak mechanism should meet at least three conditions:

    1. Price differences are sufficiently transparent

    Users should be able to clearly understand prices in different time periods, their scope of application, and billing for cache hits and cache misses, rather than discovering cost changes only after a bill is generated.

    2. Off-peak periods are actually usable

    If off-peak periods are cheap but have obvious queuing, rate limiting, or unstable response, they cannot truly replace peak calls. Price discounts must match availability.

    3. Users can schedule tasks

    For non-real-time tasks such as offline evaluation, batch summarization, data cleaning, and code scanning, platforms can provide delayed execution, batch processing, or scheduled dispatch capabilities so users can actively arrange tasks for low-price periods.

    From this perspective, whether peak and off-peak pricing is acceptable should not be judged only by asking “how much did the price increase?” It should also ask, “Can I move suitable tasks to low-price periods?”

    4. Real-Time and Offline Tasks Should Be Treated Differently

    Not all tasks are suitable for shifting to off-peak periods.

    Real-time interactive tasks

    Examples include online customer service, code integration, troubleshooting, and immediate developer Q&A. These tasks have high requirements for response speed and stability, and users usually cannot wait for off-peak periods. For these tasks, price increases directly affect willingness to use the service.

    Optimization directions include:

    • Shorten system prompts;
    • Limit the length of historical messages;
    • Use smaller models for simple steps;
    • Cache repeated questions locally;
    • Call high-capability models only at key points;
    • Control the length of a single output.

    Offline batch tasks

    Examples include batch classification, document summarization, test case generation, code quality scanning, and log summarization. These tasks can usually be delayed. The system can place requests into a queue and process them centrally during low-price periods.

    A simple scheduling logic is:

    1. if task.requires_realtime:
    2. execute_immediately()
    3. else:
    4. if current_time in low_price_window:
    5. execute_immediately()
    6. else:
    7. enqueue_until_low_price_window()

    If the number of tasks is large, budget control can also be added:

    1. if estimated_cost > task_budget:
    2. use_smaller_model()
    3. elif queue_delay < allowed_delay:
    4. wait_for_low_price_window()
    5. else:
    6. execute_with_current_policy()

    The key to such strategies is not blindly pursuing the lowest price, but establishing clear priorities among timeliness, quality, and cost.

    5. Why Intelligent Agents Are Especially Likely to Burn Money

    The cost of an intelligent agent is often not determined by a single request but by multiple stages adding up:

    1. The agent understands the user’s goal;
    2. It reads files or retrieves knowledge;
    3. It plans execution steps;
    4. It calls external tools;
    5. It analyzes tool results;
    6. It revises the plan and executes again;
    7. It handles exceptions and retries;
    8. It summarizes the final result.

    If every step sends the full context back to the model, a seemingly simple task may produce dozens of rounds of calls. Even if the price per round is not high, cumulative cost can rise quickly.

    Therefore, when evaluating agent cost, do not count only the number of requests. Also record:

    1. total_task_tokens
    2. average_call_rounds
    3. average_input_length
    4. average_output_length
    5. cache_hit_rate
    6. tool_call_count
    7. retry_count
    8. average_time_per_task
    9. average_cost_per_task

    It is recommended to build a call observability dashboard on the application side, recording at least the following metrics by task type:

    • Input, output, and cache-hit tokens for each task;
    • Actual unit prices in different time periods;
    • Total cost per task;
    • Additional cost caused by failed retries;
    • Quality differences under different models or strategies;
    • The relationship between user satisfaction and cost.

    Only by collecting this data can you judge whether a price increase is unacceptable or can be absorbed through engineering optimization.

    6. Several General Ways to Reduce Costs

    1. Design a stable context prefix

    Place long-lived rules, format requirements, and tool descriptions at the front, and place real-time state, temporary data, and the latest logs at the back. Avoid mixing random values, current time, and irrelevant variables into fixed content.

    2. Build a context compression mechanism

    When historical messages exceed a threshold, do not append indefinitely. You can summarize completed steps and keep only the information needed for the current task.

    The summary should retain as much as possible:

    • Confirmed facts;
    • Actions already performed;
    • Current file or data state;
    • Unresolved issues;
    • Follow-up plans;
    • Important error information.

    3. Set output limits

    Many tasks do not require the model to generate long explanations. For structured output, limit field lengths and require the model to return only necessary content. Output tokens are often easier to overlook than input tokens, but in high-frequency scenarios they can also generate noticeable costs.

    4. Use models in layers

    Simple classification, format conversion, field extraction, and initial screening can use lower-cost models; complex planning, difficult reasoning, and final review can use more capable models.

    5. Reduce ineffective tool calls

    Validate parameters before calling tools to avoid multiple failed rounds caused by path errors, missing parameters, or permission issues. For deterministic operations, prefer completing them in code rather than asking the model to judge repeatedly.

    6. Introduce budgets and circuit breakers

    Every user, task, or workflow should have a budget ceiling. When estimated cost exceeds a threshold, the system can automatically switch strategies, compress context, delay execution, or request human confirmation.

    7. What Criteria Should Be Used to Decide Whether to Accept Peak and Off-Peak Pricing?

    Individual users can judge using a month of real bills, while organizations should build a comprehensive evaluation model:

    1. comprehensive_usage_value =
    2. task_quality_weight × quality_score
    3. + response_speed_weight × speed_score
    4. + stability_weight × stability_score
    5. - cost_weight × actual_cost

    Here, “actual cost” should not use the lowest advertised price. It should use weighted average cost:

    1. weighted_average_unit_price =
    2. actual_consumption_of_each_token_type × corresponding_actual_unit_price
    3. ÷ total_token_consumption

    If the peak-period share is high, focus on peak prices. If the cache hit rate is low, do not use low-priced cached input as the main basis for judgment. If tasks are frequently retried, include failure costs in the evaluation.

    Overall, peak and off-peak pricing is not inherently unacceptable. For tasks that can be delayed, batched, and have high cache hit rates, it may help users reduce costs. But for real-time development and continuously running intelligent agents, if peak prices rise significantly and off-peak resources are unstable, the actual burden on users will indeed increase.

    Ultimately, developers should not judge based only on a single price number. They should start from task structure and build their own cost model. Only by knowing whether money is spent on cached input, dynamic input, output, retries, or tool calls can they determine whether a price increase truly affects cost-effectiveness and use architecture and scheduling optimization to turn uncontrollable call expenses into manageable engineering metrics.