Mid-Tier LLM Selection Guide: Practical Approaches to Cost, Latency, and Routing
This article provides a practical guide for selecting mid-tier Large Language Models (LLMs), focusing on cost calculation, latency evaluation, and multi-agent routing. It outlines a three-tier model system, explains how to calculate expected costs by factoring in failure rates and cache discounts, and details the metrics and conditions for evaluating latency and throughput to ensure optimal performance for your specific tasks.
1. Three-Tier Model System and the Role of Mid-Tier Models
Most LLM services are currently divided into three tiers. Flagship models handle the most challenging reasoning and planning. Lightweight models handle high-frequency, simple requests. Mid-tier models sit in between and typically handle the highest volume of tasks, making their selection the most critical factor affecting the overall bill.
To determine if a mid-tier model is suitable, evaluate it from three perspectives:
- Sufficient capability: Code completion, document summarization, structured extraction, and moderately complex multi-step reasoning usually do not require the full power of flagship models.
- Quality baseline: Lightweight models are more prone to errors with long contexts, multi-turn tool calls, and complex instructions. The rework cost after a failure may exceed the token savings.
- Throughput for long tasks: Mid-tier models generally have strong continuous output capabilities, making them suitable for batch generation and long-running tasks.
All three points must be validated with your own data. Vendor marketing should only be a starting point.
During selection, you can score each item in the checklist below (1 to 5 points). Any item scoring below 3 needs to be addressed first:
| Check Item | Question to Answer |
|---|---|
| Sufficient Capability | Can the mid-tier model pass the acceptance test cases for the task? |
| Quality Baseline | Is the first-pass yield meeting the target? |
| Throughput Fit | Can batch tasks be completed within the time window? |
| Expected Cost | Is the per-task cost (including rework) lower than alternative solutions? |
| Cache Hit Rate | Does the request have a stable common prefix? |
| Latency SLA | Does P95 latency meet business requirements? |
2. How to Calculate Cost: Price is Relative
Whether a mid-tier model’s price is high or low depends on what you compare it against. The table below shows illustrative numbers in USD per million tokens and does not represent any vendor’s real-time pricing. Always refer to official websites for actual pricing.
| Tier | Input / Output (Illustrative) | Comparison to Mid-Tier Price |
|---|---|---|
| Flagship Model | 4 / 20 | Mid-tier is 25% cheaper |
| Mid-Tier Model | 3 / 15 | Baseline |
| Lightweight Model | 1.5 / 7.5 | Lightweight is 50% cheaper; mid-tier unit price is 2x |
From this, we can draw two conclusions:
- When replacing a flagship model for routine tasks, the mid-tier model’s unit price is 25% lower, directly saving this portion of costs.
- When replacing a lightweight model for similar tasks, the mid-tier unit price is double. To be more cost-effective, it must win back costs through total consumption and rework reduction.
Input and output tokens are priced separately, so both volumes must be tracked independently. Unit price does not equal cost. A more practical method is calculating the expected cost per task:
Expected Cost = Input Token Price × Input Usage + Output Token Price × Output Usage + Failure Rate × Rework Cost
The failure rate equals 1 minus the first-pass yield.
Rework cost should be calculated based on actual conditions. Manual fixes are calculated by hours multiplied by the hourly rate; automatic retries by the number of retries multiplied by the cost per retry; downstream blocking requires estimating the loss caused by delays. First-pass yield must be tested using your own task set and cannot be borrowed directly from vendors or third parties.
Here is an illustrative example. A task takes 10k input tokens and 2k output tokens, with manual rework cost assessed at $0.20 upon failure.
- Mid-tier model: Per-call cost = 0.03 + 0.03 = $0.06, first-pass yield 95%. Expected cost = 0.06 + 0.05 × 0.20 = $0.07.
- Lightweight model: Per-call cost = 0.015 + 0.015 = $0.03, first-pass yield 60%. Expected cost = 0.03 + 0.40 × 0.20 = $0.11.
In this example, the mid-tier model is more expensive per call but has a lower expected cost. The conclusion depends entirely on the first-pass yield and rework cost. Different numbers may yield the opposite conclusion, so you must calculate using your own data.
Cached input discounts will also change the conclusion. Many vendors offer discounts for input prefixes that hit the cache. Using an illustrative rate, cached hits are charged at 10% of the original price. Assuming 80% of the input hits the cache, the mid-tier model’s input cost in the previous example drops from $0.03 to 0.03 × (0.2 + 0.8 × 0.1) = $0.0084, and the expected cost drops to about $0.048. If the lightweight model also supports caching, its input cost will drop proportionally, requiring a recalculation of the comparison.
Cache hits usually require the prefix content of the request to be exactly the same as previous ones—meaning system prompts, tool definitions, and fixed examples must be placed at the beginning of the request in an unchanging order. Most vendors also have a minimum cacheable length; shorter prefixes will not hit the cache. Cache entries have a Time-to-Live (TTL) and require rewriting after timeout. Some vendors charge separately for cache writing or storage, and write costs may be higher than standard input. These conditions vary by vendor, so discount numbers cannot be directly compared horizontally across different providers; you must calculate according to their respective documentation.
3. How to Evaluate Latency and Throughput
Vendor-stated speeds are for reference only. Evaluation must be measured on your own tasks using a consistent metric.
It is recommended to record the following metrics:
- Time to First Token (TTFT): The time from sending a request to receiving the first output token. Interactive scenarios are most sensitive to this.
- P50 and P95 Total Latency: The median reflects common cases, while P95 reflects the tail performance of slow requests. Looking only at averages will mask tail issues.
- Output Throughput (tokens/s): Output token count divided by generation time. Generation time equals total time minus TTFT.
- Concurrency Limit: Whether throughput drops linearly under target concurrency, and if rate limiting occurs.
- Timeout and Error Rates: The proportion of requests that time out or error out. Errors include rate limits, server-side errors, and invalid output formats.
When measuring, fix the following conditions:
- Use the same input length distribution and output length limits as production to avoid measuring inflated numbers with short texts.
- Sample at least 200 requests per task type. With too few samples, P95 results are unreliable.
- Test the two models at similar times, covering both peaks and valleys on weekdays.
- Record the measurement environment, including network location, region, client version, and retry strategy.
- Use the exact same set of requests and evaluation set for both models to ensure the results are comparable.
Acceptance thresholds are determined by the business. For example, interactive Q&A might require a P95 TTFT under 2 seconds and a timeout rate under 1%. Offline batch tasks are more concerned with overall throughput and cost, allowing for relaxed single-request latency requirements. Thresholds should be written down before testing to avoid adjusting the standards after the results are in.
4. Multi-Agent Routing and Escalation Rules
Using a single model to handle all tasks is either too expensive or results in unstable quality. A more common practice is to route requests to different tiers based on task difficulty, cost, and latency requirements, and to set up escalation rules. When issues arise, the task is handed over to a stronger model.
Example routing strategy:
| Task Type | Default Model | Latency Requirement | Description |
|—-|—-|—-|—-|
