Multi-Model Orchestration in Practice: Token Consumption and Cost Reduction on the Same Task

    This article examines how mainstream large language models can deliver comparable results on the same well-defined task while consuming vastly different token volumes. Based on an experiment involving information extraction and Excel-formatted output across four models, it analyzes common causes of token cost differences, including redundant output, system prompt handling, and input/output pricing tiers. It then presents a multi-model orchestration architecture with intelligent routing, task classification, prompt optimization, dynamic routing, and caching to reduce inference costs without sacrificing business quality.

    As large language models continue to move into production across industries, enterprise developers face a growing challenge: how to control LLM inference costs while maintaining business processing quality. In engineering practice, we have observed an interesting phenomenon: when handling the same clearly defined task, different mainstream LLMs often produce high-quality results that meet expectations, yet their API token consumption can differ dramatically. This article explores cost optimization and engineering practices in multi-model orchestration architectures around this phenomenon.

    I. Task Execution Quality Is Converging

    To evaluate how current mainstream LLMs handle routine structured tasks, we designed a typical experiment: the model was asked to extract key information from given unstructured text data and generate an Excel table that met a specific format specification.

    We selected four representative mainstream LLMs for the test. The results showed that all four models understood the task instructions, correctly extracted the required fields, and perfectly output table data that met the format requirements. From a results-oriented perspective, all four models received full marks on this task and fully met our requirements.

    This reveals a key point: for many routine tasks with clear boundaries and explicit rules, such as format conversion, information extraction, and simple classification, mainstream models on the market already have highly homogeneous basic processing capabilities. Basic model capability is no longer the bottleneck limiting task completion.

    II. The Hidden Bill: Token Consumption and Billing Differences

    If model capabilities all meet the bar, where does the difference appear? The answer lies in the bill.

    LLM billing is usually based on token consumption. A token can be understood as the smallest unit of text processed by a model. In the experiment above, although the table content output by the four models was logically consistent, their token consumption varied greatly because of differences in tokenizer design, output format preferences, such as whether to add extra Markdown markers or output lengthy explanatory text, and context handling mechanisms.

    In some extreme comparisons, the gap between a high-consumption model and a low-consumption model completing exactly the same task can reach 85%. This means that if enterprises blindly bind their architecture to a single high-cost model without fine-grained task classification, they will bear extremely high and unnecessary compute costs at scale.

    Common causes of this cost difference include:

    1. Redundant output: Some models tend to output long reasoning processes before giving the result, or append summarizing remarks after the result, which sharply increases output tokens.
    2. System prompt handling: Different models have different mechanisms for compressing and remembering system prompts. Long contexts continue to accumulate consumption in multi-turn conversations.
    3. Billing tiers: Different model providers have different pricing strategies for input tokens and output tokens. Output tokens are usually much more expensive than input tokens.

    III. Multi-Model Orchestration and Intelligent Routing Architecture

    Faced with the reality that capabilities are sufficient but costs vary, enterprises need to shift from single-model calls to multi-model collaborative scheduling. General model inference and scheduling services from cloud providers such as Baidu AI Cloud provide infrastructure support for this architectural shift.

    The core idea of a multi-model orchestration architecture is to use the right resource for the right job. By introducing an intelligent routing gateway, the system can dynamically select the most appropriate model to respond based on request complexity, task type, and cost budget.

    A typical intelligent routing architecture should include the following core components:

    1. Unified API gateway: Abstracts differences between underlying model APIs and provides a unified calling interface to upper-layer business applications.
    2. Task parser: Analyzes the intent of the input request and determines whether it is a simple formatting task, a complex logical reasoning task, or a creative generation task.
    3. Model routing policy engine: Based on parsing results and preset rules, such as cost-first or quality-first, decides whether to dispatch the request to a lightweight model or a high-capability model.
    4. Monitoring and logging service: Records token consumption, latency, and success rate for each call, providing data support for subsequent routing strategy optimization.

    IV. Engineering Guide to Cost Reduction and Efficiency Gains

    To achieve the optimization goal of doing the same work with 85% fewer tokens, developers need to implement the following key steps at the engineering level.

    1. Task Classification and Model Matching Strategy

    First, business scenarios need to be decoupled and tasks divided into different levels. For simple deterministic tasks such as Excel table generation and JSON formatting mentioned above, requests should be routed directly to lightweight, low-cost Flash-class models. For complex tasks such as code generation and deep logical reasoning, Pro-class models with higher specifications should be enabled.

    2. Prompt Optimization and Token Compression

    Regardless of which model is used, optimizing prompts is an effective way to reduce costs. Models should be instructed to output results directly without any explanatory text. At the same time, system prompts should be compressed as much as possible, using concise instructions instead of lengthy descriptions.

    3. Engineering Implementation of a Dynamic Routing Gateway

    In actual development, a lightweight routing layer can be written to implement model scheduling. The following illustrative Python pseudocode shows how to route based on task labels:

    1. class ModelRouter:
    2. def __init__(self):
    3. # Initialize clients and cost weights for different models
    4. self.models = {
    5. "lightweight_model": {"client": LightModelClient(), "cost_weight": 0.15},
    6. "high_capacity_model": {"client": ProModelClient(), "cost_weight": 1.0}
    7. }
    8. def route_and_execute(self, prompt, task_type="simple"):
    9. """
    10. Select a model based on task type and execute.
    11. """
    12. if task_type == "simple":
    13. # Call the lightweight model for simple tasks to significantly reduce token usage
    14. selected_model = self.models["lightweight_model"]["client"]
    15. elif task_type == "complex":
    16. # Call the high-capacity model for complex reasoning tasks
    17. selected_model = self.models["high_capacity_model"]["client"]
    18. else:
    19. # Default fallback strategy
    20. selected_model = self.models["high_capacity_model"]["client"]
    21. # Inject cost-control instruction
    22. optimized_prompt = f"{prompt}\n\n[System Instruction: Output ONLY the required data without any conversational filler.]"
    23. return selected_model.generate(optimized_prompt)

    4. Introduce Caching

    For high-frequency repeated queries or calculation results, a caching mechanism can be introduced at the gateway layer, such as Redis-based semantic caching. When a request with extremely high similarity is detected, the cached result can be returned directly, reducing token consumption to zero.

    V. Conclusion and Outlook

    As LLM technology advances rapidly, engineering capability is becoming a key measure of enterprise AI maturity. Our tests show that mainstream LLMs have converged in capability on routine tasks, and the core difference has shifted to the trade-off between cost and efficiency.

    By building a multi-model orchestration architecture and combining engineering methods such as intelligent routing, prompt optimization, and result caching, enterprises can significantly reduce API calling costs without sacrificing business quality. With mature and stable underlying compute and scheduling platforms such as Baidu AI Cloud, developers can focus more on business logic innovation and refined architecture design, truly making LLM technology a powerful engine for enterprise cost reduction and efficiency gains.