Devin Fusion
Cognition’s new Devin Fusion system reduces coding costs by 35-41% by routing tasks between frontier models and cheaper 'sidekick' models.
Deep dive
- Multi-model architecture: Uses a primary 'frontier' model (like Fable 5 or GPT-5.5) for planning and a 'sidekick' model for implementation.
- Dynamic routing: Uses lightweight classifiers during task execution to switch models based on difficulty or task type.
- Context caching: Both agents maintain persistent context to avoid the high costs of cache misses associated with traditional multi-agent tools.
- Performance: Maintains high-quality coding performance while achieving 35% cost savings on the FrontierCode benchmark.
Decoder
- FrontierCode: A benchmark used to measure an AI's ability to produce high-quality, mergeable code across real-world repository tasks.
- Cache miss: In this context, it refers to the scenario where a model loses its memory of previous interactions, forcing it to re-process input, which increases latency and cost.
Original article
Engineering teams are lighting money on fire.
It's no longer sustainable to use the most expensive models on every task. But existing tools for mixing models suck. They look nice on most benchmarks but fail to write code you'd actually merge.
At Cognition, we specialize in routing across frontier models without sacrificing intelligence. Today, we're sharing our work on a new kind of multi-model harness, Devin Fusion, that is substantially better at mixing models while reducing costs and maintaining intelligence on real-world usage. We found it maintains frontier and Fable 5-level performance at 35% lower cost on FrontierCode, a new state-of-the-art coding benchmark that measures both code correctness and quality.
The Trick: Sidekick
The key idea behind our architecture is to run two parallel agents: one with a frontier model, the other with a more cost-effective "sidekick" model. Both are fully capable agents with their own toolsets and ability to gather & act on their own context.
As the task progresses, the main agent decides which tasks to give the sidekick and which tasks to do itself. Making sidekick work well in practice, however, requires deeply tuning the interaction patterns. We've found that the main agent should take minimal actions, and only read what is absolutely necessary. By default it should delegate and monitor, while making the significant decisions: the plan, the interpretation of ambiguity, the final review.
This approach fixes the primary problems with more basic model routing:
- It retains real frontier intelligence rather than "benchmark-score" intelligence. Routers often over-fit to specific benchmarks. By keeping a frontier model in the mix, the sidekick approach continues to benefit from frontier model creativity and general intelligence.
- It generalizes beyond single-prompt tasks and question-answering. Model routers often route to a single model for the entire task. Prompts often do not contain enough information about the task to properly discern difficulty. Moreover, the user might have difficult followups to simple initial prompts. Being able to move between the smart model and sidekick dynamically makes this system much more robust.
- It avoids costly cache misses when routing between models. We've previously explored a "Smart Friend" tool, and Anthropic released a similar "Advisor" tool. The core of both these ideas is to give one model a tool to query another model for helpful advice. The catch? Upon every call to the other model, the context for the task is not shared in a way that is cached, and you pay a very expensive price. In the sidekick setup, both the main model and sidekick model maintain their own persistent, cached contexts.
Sidekick scales better as models get smarter
Recent models, and Fable 5 especially, perform unusually well in these multi-agent setups. Fable delegates work more intelligently, requests context more efficiently, and plans more precisely, all of which yield a larger cost improvement with minimal impact on intelligence. This suggests that the sidekick pattern is one that will become more useful as base models get better.
Examples of Sidekick in Action
To better understand how the sidekick works, we inspected how using sidekick impacts cost and performance on a representative sample of FrontierCode tasks.
- Modernize search.js to ES6 and verify with the full make/Playwright/e2e suite: Devin wrote the diff and handed off the slow test run. The cost was in the tests, not the code. Delegating that saved 62% at no cost to quality.
- Rip out the OpenTracing integration across the Mattermost server, cleanly: Mechanical removal across many files with few real judgment calls. Mechanical work fully handed off: much cheaper at the same quality.
- Handle JSON-Schema oneOf-with-const when generating Python models: Devin reaches the same partial result either way, so the sidekick just makes it cheaper, about 38%.
- Add a team selector to the search bar (cross-team search), gated on a flag: Hard, multi-file React/Redux feature graded on its judgment calls. When the judgment is the deliverable, delegating it backfires.
- Integrate LangChain4j's WebSocket MCP transport into Quarkus, reusing upstream: Hard task, but mostly mechanical: reuse what's upstream. Hard but mechanical work still hands off cleanly, and here it even beat Devin solo.
Dynamic Mid-Session Routing
With sidekick in your arsenal, you must still make sure to choose the right models for the task. We decide on different models for the main agent or sidekick depending on task type and complexity. It can be dangerous, however, to choose a model at the start and then realize later on that a different one would be better suited. Similarly, you might also want to move the task from the sidekick back to the main agent if it is proving too challenging. To handle these cases, we use lightweight classifiers during task execution to signal when we need to switch to the main agent or use a different model entirely.
We would like to be cache-efficient when switching between models, and doing so requires some artful engineering. We accomplish this by switching the model during context compaction, which would trigger a cache miss anyway. Each time we trigger compaction, we take it as an opportunity to evaluate the situation and switch the model that's in charge, effectively getting model switching “for free”.
Results
We benchmarked our new harness with and without the ability to use Fable 5, and found exciting improvements with both configurations.
Without including Fable 5, our Devin Fusion multi-model harness gives a 35% cost improvement on FrontierCode relative to frontier models like GPT-5.5 and Opus 4.8, while maintaining performance matching the frontier.
Fable 5 proved to be exceptionally performant in this multi-model harness, achieving a 41% cost reduction, while maintaining the same performance as Fable 5 in a traditional agent harness.
The rising importance of hybrid-model harnesses
The age of using one model for all of your work is coming to an end. The rising costs of frontier intelligence are reaching prohibitive levels in engineering organizations small and large. Moreover, there is now a growing range of model options at different price and intelligence levels, and with the right prompting, many of the sub-frontier models are fully capable of doing most engineering work.
Moreover, using a multi-model harness allows you to capture the relative strengths of various frontier models. For example, at Cognition, we find some models to be particularly good at UI testing, and different models to be good at identifying complicated bugs in PRs. There is also a growing set of capable open-source models. This makes it easier to train specialized intelligence on specific domains. And as models emerge that excel at particular languages, tasks, or libraries, investing in multi-model capabilities only becomes more important.
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi