Using a powerful frontier model for upfront planning and final review while delegating core execution to a cheaper open model yields frontier-level quality at a fraction of the cost.
Cole Medin advocates for a specific design pattern in automated AI workflows: placing a cheaper open model in the middle of a process, flanked at the start and end by a powerful frontier model.
In multi-step automation systems, relying on top-tier models for every step quickly becomes expensive and slow. The sandwich approach splits the labor based on model strengths:
As Medin put it:
"If you want to save on tokens, make your workflows faster, experiment with open models, use them for the workhorse that always writes the code, but then you just sandwich that with the planning and reviewing that uses a frontier model"
This technique is for people building multi-step or multi-agent automation systems. While someone using a single chat prompt in a web browser does not need to manage model routing, anyone building automated pipelines, software tools, or multi-agent systems can apply this setup. Medin specifically highlights tasks where the middle step generates code, making this relevant primarily to developers and technical users building automated pipelines.
The main advantage is output reliability without top-tier API costs at every stage. Frontier models charge higher prices per token and often take longer to generate responses. Open models are significantly cheaper per call and can process routine steps quickly. Delegating repetitive execution steps to an open model allows builders to maintain high output quality across complex jobs without paying premium rates for the entire sequence.
This strategy is not just a theoretical proposal; it is shipping and usable in production pipelines today.
However, the approach introduces trade-offs that single-model providers rarely emphasize: