Dual-Tier Professional Large Language Models: Model Selection, Budgeting, and Agent Cost Control
This article provides a practical framework for implementing a dual-tier architecture for professional large language models, separating models into flagship and daily tiers. It covers executable routing rules, budget control methods, quality validation metrics, and cost accounting—including unit cost per qualified task. A Python-style budget control workflow for multi-step agent tasks, along with API pricing verification methods and engineering rollout steps, are also included.
Professional large language models (LLMs) are increasingly being divided into two tiers: a flagship tier for complex, high-stakes tasks, and a daily tier for routine, high-frequency operations. The viability of this approach depends on three factors: whether routing rules are executable, whether budgets are controllable, and whether outcomes are verifiable. This article offers concrete practices for each.
Why a Dual-Tier Architecture Emerged
A single model often faces a dilemma. If it is powerful enough for complex tasks, its cost per simple request becomes unnecessarily high. If its price is reduced, performance on complex tasks becomes inconsistent. A dual-tier architecture addresses this by routing tasks to one of two tiers: the flagship tier handles complex projects and high-risk tasks, while the daily tier processes routine tasks and intermediate steps within agent workflows.
Both tiers must share the same API, logging format, and evaluation dataset. Otherwise, a team would need to maintain two separate pipelines, and the operational overhead could exceed the savings gained from tiering.
Tier Selection: Routing Thresholds
Routing rules should be written as checkable conditions rather than left to ad-hoc judgment. The table below provides a set of starting thresholds that teams can adjust based on their task samples.
| Criterion | Route to Daily Tier | Route to Flagship Tier |
|---|---|---|
| Number of sub-steps | 3 or fewer | 4 or more, or requires cross-file reasoning |
| Input token count | 8,000 or fewer | Exceeds 8,000, or requires integrating multiple documents |
| Tool call count | 2 or fewer | 3 or more |
| Risk level | Low (e.g., internal drafts, format conversion) | High (e.g., financial conclusions, scientific inferences, external output) |
| Output size | Short structured results | Long documents, multiple tables |
Two rules apply during execution. First, if any single criterion meets the flagship condition, the task routes to the flagship tier. Second, steps with a high risk level are never downgraded; regardless of remaining budget, they stay on the flagship tier and undergo human review.
When the budget is insufficient, split the task into smaller sub-tasks and assign lower-risk sub-tasks to the daily tier. If costs still exceed the budget, pause the task and request human confirmation before allocating additional funds.
Flagship Tier Workflow
Financial analysis and scientific inference are high-risk scenarios that cannot rely on generated text alone. A reviewable workflow typically includes the following steps.
Financial analysis, five steps:
- Extract metrics from source materials and annotate the source page or paragraph.
- List the assumptions underpinning the analysis.
- Compute results, preserving intermediate values at each step.
- Generate chart descriptions and explicitly flag uncertainties.
- Formation of a conclusion is allowed only after human review.
Acceptance criteria for scientific inference:
- Reproduction error against known experimental results stays within the pre-agreed range.
- Every inference step includes a citation to the location of the original data.
- Unexplained anomalies must be listed; they cannot be omitted.
Quality Thresholds and Cost Metrics for the Daily Tier
Quality requirements for the daily tier should be defined upfront. The following thresholds can serve as a starting point:
- Randomly sample 5% to 10% of task outputs each week.
- Set the task-level failure rate limit at 5%.
- Maintain an accuracy rate of at least 95% for critical fields.
When comparing costs across tiers, avoid looking only at the price per single call. A more meaningful metric is the unit cost per qualified task, calculated as:
Unit cost per qualified task = (Total call fees + Retry fees + Human review costs) ÷ Number of tasks that passed acceptance
Once retry and human review costs are included, the actual advantage or disadvantage of the daily tier becomes visible. A model with a lower per-call price can end up with a higher unit cost if its failure rate is high.
Budget Control for Agent Workflows
Multi-step agent tasks require defining a budget before execution and recording actual usage at each step. The following pseudo-code uses Python style; decompose, call_model, validate, and actual_cost need to be implemented by the team.
# Input contract# task: task description string# budget_cny: budget limit per task, in CNY, starting example value 0.5# step fields:# name: str# requires_long_horizon: bool# risk_level: str, values LOW / MEDIUM / HIGH# est_input_tokens: int, estimated number of input tokens# est_output_tokens: int, estimated number of output tokens# tool_calls: int, expected number of tool calls# cache_hit_ratio: float, values 0 to 1# Definition: proportion of input tokens that hit the cache, i.e., cached tokens ÷ input tokens# price_table: dict, per-tier unit prices for input / cached_input / output# Unit: CNY per million tokens, values must be verified against the official pricing pageFLAGSHIP = "flagship"DAILY = "daily"MAX_RETRY = 2def select_model(step):if step.risk_level == "HIGH" or step.requires_long_horizon:return FLAGSHIPif step.tool_calls >= 3 or step.est_input_tokens > 8000:return FLAGSHIPreturn DAILYdef estimate_cost(step, model, price_table):p = price_table[model]cached = step.est_input_tokens * step.cache_hit_ratiofresh = step.est_input_tokens - cachedtotal = fresh * p["input"] + cached * p["cached_input"] + step.est_output_tokens * p["output"]return total / 1_000_000def run_step(step, model):for attempt in range(MAX_RETRY + 1):result = call_model(model, step)if validate(step, result):return result, attemptreturn None, MAX_RETRY + 1def run_with_budget(task, budget_cny, price_table):spent = 0.0outputs = []for step in decompose(task):model = select_model(step)cost = estimate_cost(step, model, price_table)if spent + cost > budget_cny and model == FLAGSHIP and step.risk_level != "HIGH":model = DAILYcost = estimate_cost(step, model, price_table)if spent + cost > budget_cny:raise BudgetExceeded(spent, budget_cny)result, attempts = run_step(step, model)spent += actual_cost(result, attempts, price_table) # Billed on actual usage returned, including retriesif result is None:raise StepFailed(step.name) # Escalate to human handling, no silent skippingoutputs.append(result)return outputs
This code embodies three design principles. First, cost estimation uses the cache hit ratio, so caching effects are directly reflected in the budget. Second, high-risk steps are never downgraded; if the budget is exceeded, execution stops. Third, final billing is based on actual usage rather than estimates alone.
API Pricing and Cache Verification
This article does not provide specific price figures or discount rates. Prices change, and secondhand figures online can become stale. Teams should verify against the vendor’s official pricing page and record the following fields.
| Item | Content to Record |
|---|---|
| Input price | Unit price per million tokens, currency, pricing page URL |
| Cached input price | Same as above; also confirm whether cache writes are billed separately |
| Output price | Same as above |
| Effective date | Date stated on the page or in the announcement |
| Billing basis | Whether reasoning tokens are counted; whether billing is per request or per token |
To verify cache hits, send two consecutive requests with the same prefix and check whether the cached token field in the returned usage information increases. Field names depend on the API documentation. After verification, group tasks by template to calculate the cache hit ratio, i.e., cached tokens divided by input tokens.
Output token control also requires data. Teams should track the median output token count per task type and set limits on the number of fields in structured outputs to prevent the model from generating redundant explanatory text.
Observability Metrics and Engineering Implementation
Enterprises can build a unified inference gateway to centralize routing, caching, rate limiting, logging, evaluation, and alerting. The gateway can be assembled from common components: object storage for evaluation samples, a logging service for call traces, and monitoring and alerting for cost anomalies.
Record at least the following metrics for each task:
- Tier used
- Input and output token counts
- Cache hit rate
- Tool call count
- Retry count
- Acceptance rate
- Unit cost per qualified task
A three-step rollout path is recommended. First, build an offline evaluation set with no fewer than 100 business samples and compare the two tiers on pass rate, latency, and unit cost per qualified task. Second, validate routing rules with gray traffic. Third, scale up gradually by task type. High-risk scenarios always retain human review and record source citations for traceability.
Conclusion
- Model selection threshold: Tasks with a high risk level are permanently assigned to the flagship tier. Other tasks start on the daily tier; if the pass rate in offline evaluation falls below the threshold, upgrade them to the flagship tier.
- Budget items: Set a budget limit for each task and record actual usage at every step. When the budget is exceeded, split the task or halt execution. High-risk steps are never silently downgraded.
- Observability indices: Use unit cost per qualified task and cache hit rate as primary metrics. If the pass rate drops continuously beyond the threshold, roll back to the previous routing rules.
