AI • Science • Technology • Future

AI Agents

SWE-Serve Reveals Critical Gap Between Local AI Tests and Real-World Serving

Diagram illustrating the gap between local AI code tests and live serving environments
Featured image: Workers put the finishing touches on the three face plates at the Wind Turbine Testing Center. Each face plate is 12 inches thick and 20 feet in diameter and weigh 74 tons. Photo courtesy of the Massachusetts Clean Energy Center. by ENERGY.GOV, Public domain, via Wikimedia Commons.

Researchers at NVIDIA have developed SWE-Serve, a benchmark that evaluates AI coding agents on real inference-serving tasks. The results reveal a significant gap between passing local tests and functioning correctly in live, production-like environments.

What Happened in the SWE-Serve Evaluation

Using 53 tasks derived from 83 merged pull requests in the SGLang open-source project, SWE-Serve assesses how well AI coding agents can modify inference-serving software. These tasks span key areas including model enablement, decoding, caching, scheduling, serving APIs, and distributed execution.

Of the 19 tasks that start a live server and test the full serving path, the same set of 627 agent-generated patches passed only 45.9% of the time when evaluated with a complete verifier. When live-serving checks were excluded, that rate rose to 69.4%. This means that 147 patches—about one in three—failed only when tested in a real, running server environment.

Key Facts from the Study

  • 19 tasks include live server startup and end-to-end serving path validation.
  • Across these tasks, patches pass 45.9% of the time with full verification, but 69.4% when live-serving checks are omitted.
  • Tasks that span multiple runtime domains (e.g., request handling, scheduling, model execution, KV-cache) have a 21.3 percentage-point lower pass rate than single-domain tasks.
  • Each of the 11 models evaluated showed the same performance gap, indicating consistency across different architectures.
  • Model performance varied widely: from 34.6% to 75.5% pass@1, with top performers like Claude Opus 5 and GPT-5.6 Sol achieving 75%.
  • Each task uses a containerized SGLang checkout from before the target change, with a hidden verifier that checks new behavior without comparing to a reference implementation.
  • The median reference solution modifies 553 lines across seven files, with a typical verifier including seven new-behavior tests and ten regression tests.

How SWE-Serve Works: A Technical Overview

SWE-Serve transforms real, merged pull requests from the SGLang repository into executable tasks. Each task provides an instruction and a baseline codebase, and the AI agent generates a patch to implement the change.

The agent’s patch is evaluated against a hidden verifier that runs on declared hardware—either a CPU or an NVIDIA H100. The evaluation is performed in isolation, with web access blocked to prevent retrieval of upstream solutions.

Tasks are categorized into six engineering families: speculative and advanced decoding, model and backend enablement, kernels and performance, serving APIs and runtime correctness, caching and runtime state, and distributed execution and scheduling. Of the 53 tasks, 41 are run on H100 hardware, while 12 use CPU-only setups.

Each task is designed to simulate real-world deployment scenarios. For example, one task requires adding support for dense and mixture-of-experts (MoE) Qwen3.5 models. The verifier checks model registration, configuration, weight loading, image and video inputs, OpenAI-compatible requests, native batched generation, and correct log probabilities during execution.

Of the 276 live-serving tests in the 19 tasks, 242 are adapted from SGLang, and 34 cover new behaviors introduced by the changes when no upstream test existed. The Gemma 4 MoE task illustrates the issue: 16 of 33 patches passed all non-live tests but failed at least one live serving test, covering model loading, expert routing, text and image serving, and batched generation with correct ordering and log probabilities.

Why This Matters for AI Development

These findings underscore a fundamental challenge in AI-generated code: local testing environments often fail to capture the full complexity of real-world deployment.

Many AI coding agents are trained and evaluated using isolated, unit-style tests that do not simulate actual serving workflows. SWE-Serve demonstrates that even if code passes syntax and unit tests, it may fail when the system actually serves requests through a live interface.

Suryodaya College of Engineering and Technology Nagpur popularly known as SCET is a Government Recognized institute established in 2010 by National Rural Development & Research Society . The institute is approved by AICTE New Delhi and DTE Mumbai with regular affiliation by RTM Nagpur University. The institute is located in the lush green environment over 7 acres of land at Vihirgaon, Umrer Road, Nagpur in the State of Maharashtra in India. The institute is the youngest one in the University to get accredited by NAAC. It has continued to be one of the top engineering colleges in the RTMNU from the year of establishment. Since inception, it has been imparting the education and training in the field of Engineering and Technology, making it available in the reach of every student who aspires to be a technocrat and be a part and a parcel in the development of the nation. At present, a thousand students are enrolled in various streams. One Hundred and Ten Faculty members including Academic and Co-academic staff are always striving to fulfill the quality objectives set by the institute. Currently Dr. Chandrakant Ragit and Mr. Abhishek Belkhede are the Office Bearers as the Principal and Director respectively.
Suryodaya College of Engineering and Technology Nagpur popularly known as SCET is a Government Recognized institute established in 2010 by National Rural Development & Research Society . The institute is approved by AICTE New Delhi and DTE Mumbai with regular affiliation by RTM Nagpur University. The institute is located in the lush green environment over 7 acres of land at Vihirgaon, Umrer Road, Nagpur in the State of Maharashtra in India. The institute is the youngest one in the University to get accredited by NAAC. It has continued to be one of the top engineering colleges in the RTMNU from the year of establishment. Since inception, it has been imparting the education and training in the field of Engineering and Technology, making it available in the reach of every student who aspires to be a technocrat and be a part and a parcel in the development of the nation. At present, a thousand students are enrolled in various streams. One Hundred and Ten Faculty members including Academic and Co-academic staff are always striving to fulfill the quality objectives set by the institute. Currently Dr. Chandrakant Ragit and Mr. Abhishek Belkhede are the Office Bearers as the Principal and Director respectively. by Scetngp, CC BY-SA 4.0, via Wikimedia Commons. · Source · License

This gap has serious implications for reliability, security, and performance in production systems. A patch that works in a local environment may introduce subtle bugs in request routing, memory management, or model execution that only emerge under real load.

For developers, this means that evaluation must extend beyond local execution to include full serving paths. For AI model training and deployment pipelines, it calls for more rigorous, end-to-end validation processes.

Limitations and Open Questions

The current SWE-Serve evaluation has several limitations:

  1. It does not evaluate multi-GPU, multi-node, or distributed serving setups—key components of large-scale AI deployment.
  2. It does not assess the safety, robustness, or error recovery of AI-generated code under failure conditions.
  3. It does not compare agent outputs to reference implementations, making it impossible to determine whether a patch is optimal or merely functional.
  4. Performance metrics like wall time and cost vary widely among models with similar pass rates, indicating that efficiency is not consistently captured.

Additionally, the benchmark is limited to SGLang, a specific inference-serving framework. While this provides valuable insight, it may not generalize to other AI serving stacks such as vLLM, TensorRT-LLM, or OpenAI’s API infrastructure.

What to Watch Next

As AI coding agents grow in capability, benchmarks like SWE-Serve will become essential tools for evaluating real-world performance. Future iterations may include:

  • Integration with broader inference stacks beyond SGLang.
  • Support for multi-GPU and distributed serving scenarios.
  • Performance gates based on latency, throughput, and resource consumption.
  • Expanded evaluation of safety, error handling, and edge-case behavior.

For developers and organizations deploying AI-powered systems, SWE-Serve offers a clear signal: passing local tests is not sufficient. Full serving path validation is required to ensure reliability and correctness in production.

Source: How SWE-Serve Exposes the Gap Between Local Tests and Live Serving by Jennifer Williams, Dave Farris, Jeff Farris, and Jiantao Jiao, NVIDIA Technical Blog, September 23, 2026.

For a deeper dive into AI reasoning in medical imaging, see NV-Reason-CT: Bringing Radiologist-Style Reasoning to 3D CT Scans.

Learn more about validating GPU cluster readiness before AI workloads land at Validate GPU Cluster Readiness Before AI Workloads Land.

And explore how AI can predict LLM response duration before generation starts at Token Forecaster.

Sources & further reading

Featured image: Workers put the finishing touches on the three face plates at the Wind Turbine Testing Center. Each face plate is 12 inches thick and 20 feet in diameter and weigh 74 tons. Photo courtesy of the Massachusetts Clean Energy Center. by ENERGY.GOV, Public domain, via Wikimedia Commons. Image source