Multi-Model Orchestration: How Tiered Scheduling Solves Coding Cost Problems

    As AI coding platforms increasingly offer multiple models side by side, many teams fall into an expensive loop of planning with a strong reasoning model, executing with a lightweight model, and bouncing failures back for replanning. This article explains why that pattern drives up cost, then presents a practical tiered orchestration approach that separates planning, dispatch and acceptance, and stateless execution to make token usage predictable and output quality more consistent.

    As AI coding tools enter a phase where multiple models coexist, a single platform often provides a model optimized for deep reasoning, one tuned for balanced performance, and a lightweight model built for fast responses. Many teams start with an “infinite ammo” loop: a strong reasoning model handles planning, a lightweight model executes the task repeatedly, and any problems are sent back to the planning model. The original experience material is sharply critical of this pattern. Building on that critique, this article abstracts a more general engineering conclusion and lays out a practical tiered collaboration method.

    1. Root Causes: Context Bloat and Capability Mismatch

    The cost overrun in the infinite-loop pattern is not fundamentally about the number of calls. It is about context being hauled back and forth. Every round of rework stuffs the repository structure, prior conversation, and failure logs back into the model. Token consumption grows roughly linearly with the number of rounds, or even faster, while the share of useful information keeps shrinking. Long contexts also dilute attention, making it easier for the model to fixate on the wrong details.

    The second problem is capability mismatch: the strongest reasoning model is used to read long tasks and long histories, while a weaker model produces most of the code. This spends the most expensive compute on “reading” and hands the “writing” that needs the most quality to a role that is not good at it. The result is a nice plan and a distorted implementation, which still requires manual-style review by the strong model, so costs rebound.

    2. A Tiered Collaboration Pattern: Planning, Dispatch and Acceptance, Execution

    A more sensible structure layers roles by “thinking density”:

    • Planning layer: a strong reasoning model works in high-intensity mode on the web to produce the approach, interface contracts, acceptance criteria, and task list. The output must be structured and machine-decidable.
    • Dispatch and acceptance layer: a balanced model acts as middle management, splitting tasks, assigning them, comparing outputs against acceptance criteria, and deciding whether to pass or reject.
    • Execution layer: a lightweight, fast model completes a single small task with no history, seeing only the task card and relevant file snippets.

    A sample task card structure looks like this:

    1. task_id: T-17
    2. goal: Add pagination parameters to the order query API
    3. scope: [src/api/order.py, tests/test_order.py]
    4. constraints:
    5. - Keep existing function signatures compatible
    6. - Do not add third-party dependencies
    7. acceptance:
    8. - All unit tests pass
    9. - Default and upper-bound pagination values are explicitly validated
    10. context_refs: [file snippet summaries, interface contract v1.2]
    11. forbidden: [modifying database schemas, touching the payment module]

    The key is front-loading acceptance criteria. Only when acceptance conditions are machine-decidable can the dispatch layer automate the loop, instead of throwing the entire history back to the strong model for human-style review.

    3. Why the Execution Layer Must Stay Stateless

    Stateless execution is not missing information; it is deliberate information trimming. It brings three benefits. First, cost is predictable: a single call only pays for the task card and necessary snippets in tokens. Second, behavior is reproducible: rerunning the same task card yields little variation, which makes problems easier to locate. Third, it reduces contamination and keeps the model from being led astray by earlier failed attempts and repeating the same wrong path.

    A supporting practice is to make “implicit context” explicit as repository knowledge: directory conventions, naming rules, error code tables, and build and test commands are all written as short, retrievable documents that the dispatch layer injects on demand.

    1. Execution loop (pseudocode)
    2. for task in planner.tasks:
    3. card = dispatcher.materialize(task) # inject snippets and convention summaries
    4. patch = executor.run(card) # stateless execution
    5. report = verifier.run(card.acceptance)# automated acceptance
    6. if not report.passed:
    7. dispatcher.rework(card, report) # bounded rework, at most N times

    Rework must have an upper limit and escalate step by step: if the lightweight model fails twice, switch to the balanced model or reduce task granularity to avoid falling into an infinite loop.

    4. Engineering Essentials of the Dispatch Layer

    The dispatch layer is where the gains of the whole approach come from, and it needs four capabilities: task splitting (cutting work into independently verifiable chunks along file boundaries and dependencies), context assembly (providing only relevant snippets and convention summaries), result verification (preferring deterministic means such as compilation, static checks, and unit tests), and state management (tracking task status and rework counts).

    In scenarios involving UI operations or image recognition, the execution layer should return structured “observation-action” results, and the dispatch layer decides whether the goal was met, rather than letting the execution model claim completion on its own.

    5. Balancing Cost and Quality

    The token consumption of this pattern is usually higher than the lower bound of a pure infinite loop, but significantly lower than repeatedly having the strong model read the entire repository and all history, because the strong model only steps in for planning and difficult escalations. On quality, small and clear task cards let the lightweight model perform consistently, and the overall output is closer to the acceptance criteria.

    If you use general cloud capabilities to run this flow, you can use a container platform to run execution and verification tasks, a message queue for task distribution, object storage to save artifacts and reports, and logging services with monitoring and alerts to observe rework rates and cost curves, turning “model selection” from a matter of experience into measurable engineering metrics.