Back Home

代理工具

Small Models Take Over Debugging and Testing, Cutting Main-Model Costs by About Two-Thirds in Study

Delegent lets an expensive model continue planning and editing code while assigning tool-intensive work to a self-hosted small model. The authors’ tests show API cost savings, at the price of extra hardware and longer wait times.

engineerchange · CC BY 2.0 · Image source
zh-Hant

Developers who already have a GPU and often have coding agents repeatedly investigate bugs now have another way to reduce API bills. Delegent keeps a frontier model in charge of decisions, while assigning code inspection, issue reproduction, and test runs to a self-hosted small model. The authors report that, on a sample of 50 DeepSWE coding tasks, main-model costs fell by about 67% while the number of completed tasks remained at 29. This is the authors’ own evaluation, not a guarantee that success rates will stay unchanged across all tasks. Research paper

University of Waterloo researchers Lingwei Gu and Jimmy Lin submitted the paper on November 24, 2026, and linked directly to the public code repository. The repository includes installation instructions and an Apache 2.0 license, making the research implementation available. Submission record, code repository

The small model gathers information; the main model edits

Delegent is an agent execution framework built around Claude Code: the main model plans, delegates, and evaluates reports, while the small model investigates in its own tool loop and returns only a report. This means the main model does not have to ingest the full output from every tool step. Delegation instructions also tell it to hand off investigation and verification while keeping code changes for itself. How it works

Users do not need to train a separate model, but they do need an API for the main model and a small model served through vLLM. vLLM is model inference serving software; the small model can run locally or on another reachable machine. Claude Code must also be installed for coding tasks. Deployment requirements

The cost savings have specific comparison conditions

The main experiment used GPT-6.1-Sol with high reasoning enabled, paired with Qwen3.8-27B-FP8, a 27-billion-parameter model using 8-bit floating-point precision. On DeepSWE, average main-model cost per task fell from $2.11 to about $0.70. Both sides included prompt-cache discounts, which reduce charges for reusing previous inputs. Test results

For the baseline, the researchers disabled delegation and delegation instructions in the same framework, sending all model calls to the frontier model, including calls that Claude Code would normally route to a smaller auxiliary model. So the 67% figure is a saving relative to this research configuration and cannot be directly applied to everyone’s existing bill. Experimental setup

The search test used a specified corpus: across 694 questions, both setups answered 663 correctly, while main-model costs fell by 59%. Results still varied across individual datasets. These findings cannot be directly translated to performance on live web research. Search results

Lower API bills, longer wait times

The percentages above cover main-model costs only; they do not include the hardware and electricity needed to self-host a model. The authors separately estimated that, using small-model API rates, total DeepSWE costs would be about 38% of the baseline. For search, they did not provide the same full-cost estimate because per-run usage records were unavailable. Cost details

The authors describe the 27B FP8 model as a configuration that can run on a workstation GPU and say a 2B model can fit on a laptop. This does not guarantee general laptop performance. The study measured latency using several shared GPUs; median completion time for short coding tasks roughly doubled. Actual speed also depends on hardware and workload. Hardware and latency limitations

Based on these results, developers with an available GPU who can accept slower background work have more reason to consider this division of labor. Those who need frequent real-time back-and-forth should weigh the API savings against the added wait time.

Sources

  1. Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance
  2. Delegent: A Multi-Agent Harness That Reduces Cost without Sacrificing Performance
  3. GitHub - castorini/delegent: E2E lossless model routing harness for cost-effective coding & search
  4. delegent/REPRODUCING.md at main · castorini/delegent · GitHub