BRK279 · Breakout
Building a model for software development from the ground up
Speakers: Yanan Cai, Yang Liu, Faith Xu
Microsoft’s player cannot open a video at a given time: once it plays, skip to the time shown.
What the session covers
Microsoft AI and GitHub Copilot product managers and a researcher describe how the MAI-Code coding models are built and co-designed with GitHub Copilot, and announce MAI-Code-2 (flagship for enterprise everyday development) and MAI-Code-2-Flash (cost-efficient, latency-sensitive tasks). The core of the session covers post-training with SFT and reinforcement learning run through real product harnesses such as Copilot CLI and VS Code, illustrated on a real Kiota bug fix, and adaptive reasoning with difficulty-based token costs. It then explains an offline evaluation framework (public and internal benchmarks, pass rate, solution length, latency, cost) and online A/B experimentation via Copilot auto model routing, including how scorecards and code survival are read. Benchmark claims place MAI-Code-2 slightly below GPT-6.1 Sol and Claude Opus 5.5 at lower cost under a 50% promotion. The Q&A adds details on sandboxed agentic benchmarks, the Copilot Fusion routing classifier and planned availability of MAI-Code-2 on Microsoft Foundry for custom tuning.
Best for: Engineers and architects who evaluate or route coding models in GitHub Copilot or their own agent harnesses and want to understand RL training, evaluation methodology and online A/B measurement.
New material starts at 05:50. After introductions and the motivational three-pillar co-design overview, the MAI-Code-2 and MAI-Code-2-Flash launch begins at 05:50, followed directly by the technical training deep dives.
Where to skip: Skip to 05:50 for the launch, then watch 07:36–32:51 as the core: RL on real harnesses at 10:40, adaptive reasoning at 13:42, offline evaluation at 16:24 and online A/B testing at 24:24. In the Q&A, 41:51 (benchmark sandboxes) and 45:18 (versioning, Foundry) are worth it; the future-direction part at 32:51 is light.
Chapters (17)
- 00:04 Recap Depth 100 · Novelty 0/3
Speaker introductions and session agenda
Faith Xu (PM, GitHub Copilot), Yanan Cai (PM for coding models, Microsoft AI) and Yang Liu (Member of Technical Staff, Microsoft AI) introduce themselves. They mention that two MAI code models were released on the day of the session. The agenda covers the journey, the training science, measurement, real-world validation, the future and a short Q&A.
- 00:58 Recap Depth 200 · Novelty 1/3
Why Microsoft builds its own coding model: three pillars of model-product co-design
Benchmarks show model capability but do not predict behaviour in agentic coding inside a product, so the model and GitHub Copilot are optimised together. Pillar one: train and evaluate inside the production agentic harness from the start of post-training. Pillar two: control trade-offs between quality, latency, token efficiency and serving cost, e.g. complementary models for automatic routing in Copilot Fusion and useful reasoning levels from low to max. Pillar three: feed production signals such as engagement, code survival and developer feedback back into training in a continuous ship-learn-improve cycle.
- 05:50 New Depth 100 · Novelty 3/3
MAI-Code family history and launch of MAI-Code-2 and MAI-Code-2-Flash with front-end examples
MAI-Code-1-Flash launched in June as the first MAI coding model in GitHub Copilot, followed in August by MAI-Code-1.1-Flash with improved quality, native vision support and better cost efficiency. MAI-Code-2 is introduced as the flagship model for enterprise everyday software development and MAI-Code-2-Flash as the more cost-efficient model for smaller everyday tasks. Recorded examples show web apps built by the model, because usage analysis showed a high share of requests concern building front-end apps or polishing UI.
- 07:36 Deep dive Depth 300 · Novelty 2/3
Training pipeline: pre-training, post-training and reasoning, action, judgment
The models build on MAI's pre-trained base model, followed by large-scale post-training with SFT and reinforcement learning. A coding agent must excel at reasoning (decompose problems, diagnose failures, revise plans), action (choose harness tools, gather evidence from tool responses, change the environment) and judgment. Judgment means respecting user intent, avoiding out-of-scope work such as writing ten extra tests, managing uncertainty and not wasting tokens on simple tasks.
- 10:40 Deep dive Depth 400 · Novelty 2/3
Reinforcement learning on a real Kiota bug fix and training through real product harnesses
Using Microsoft Kiota Python SDK PR #804 (value 0 wrongly omitted, None should be omitted), Yang shows how rollouts produce candidate patches that are scored by unit tests (reward 0 vs 1), with unit tests either synthesised or taken from the issue. Hundreds of rollouts per instance give a reward distribution that is shaped to favour correct patches and used to update the policy. Training rollouts run through a bridge to real harnesses such as Copilot CLI/SDK, VS Code, Codex, Pi and Mini-SWE, so tool calls are executed by the real harness in a loop.
- 13:42 Deep dive Depth 300 · Novelty 2/3
Adaptive reasoning: difficulty-based token costs and non-linear reasoning levels
Reasoning is trained on two levels. First, intent analysis estimates problem difficulty and applies a higher length cost to simple problems and a lower cost to hard ones, so the model learns adaptive thinking across thousands of instances. Second, reasoning effort levels are tuned non-linearly: max is barely penalised for the most robust quality, low is heavily penalised to stay fast, and medium, the most used level, is roughly linear.
- 16:24 Deep dive Depth 300 · Novelty 2/3
Offline evaluation framework: benchmarks, harness, pass rate, solution length, latency, cost
Yanan presents the offline evaluation framework, recommended also for customers evaluating models in their own harnesses. It combines public benchmarks (e.g. SWE-bench-type suites, Terminal Bench 2.1) with internal benchmarks for intent and instruction following, multi-turn behaviour and over-engineering. Further dimensions are harness and harness generalisation to MCP tools, skills and agent instructions, pass rate, solution length, reasoning level, latency (time to first token and time between tokens) and the resulting cost; offline results select candidates for online testing.
- 22:18 Deep dive Depth 200 · Novelty 2/3
Benchmark results: MAI-Code-2 vs GPT and Claude, MAI-Code-2-Flash vs smaller models
The models are stated not to be built for frontier science research or extremely long-horizon work; benchmarks were chosen to represent enterprise day-to-day work, including the private Frontier Code 1.1 benchmark measuring production-ready code. MAI-Code-2 is described as comparable to and slightly below GPT-6.1 Sol and Claude Opus 5.5, with much lower cost under a 50% promotion. MAI-Code-2-Flash targets high-volume, latency-sensitive routine fixes and is said to slightly outperform Haiku 5.5 and a model called '6 Luna' on three benchmarks at lower cost even without the promotion.
- 24:24 Deep dive Depth 300 · Novelty 2/3
Online experimentation: why aggregates mislead and A/B tests via auto model routing
Offline benchmarks show capability under controlled conditions, while live signals (engagement, user turns, code survival, latency, cancellations) show real value. Aggregate production metrics mislead because different models attract different workloads and environment factors like harness, tools and serving affect results. GitHub Copilot therefore uses auto model routing to run controlled A/B experiments: direct model comparisons with random assignment, and model pool comparisons that measure the overall experience including routing logic.
- 28:19 Deep dive Depth 300 · Novelty 2/3
Reading A/B scorecards and results of experimentation-driven hill-climbing since May
Scorecards are read across four areas: engagement, code quality (acceptance, code and commit survival), token efficiency and user experience (latency, cancellations, errors), with attention to ambiguous signals and statistical significance. Since May, A/B flights run every few weeks and only changes with demonstrated value ship; failed flights are treated as learning. Example winning flights reduced median token consumption while improving three-day engagement, doubled serving throughput with lower TTFT and time between tokens, and improved code survival while reducing errors and cancellations.
- 32:51 New Depth 200 · Novelty 1/3
Future direction: a continuous learning system for models and GitHub Copilot
Three future areas are outlined: more capable models for complex long-horizon tasks, with exploration of different model sizes and architectures; getting experimental checkpoints to developers earlier to speed up the feedback loop; and deeper co-design of model, harness, context and tools. The goal is that improvements in models and GitHub Copilot reinforce each other.
- 34:55 New Depth 100 · Novelty 2/3
Call to action: 50% discount, MAI-Code feedback repo and Enterprise Eval Program
Attendees are asked to try MAI-Code-2 and MAI-Code-2-Flash in GitHub Copilot, currently offered at a 50% discount. Feedback can be filed as issues in a GitHub repo called MAI-Code. An Enterprise (partnership) Eval Program, joined via QR code, has Microsoft work with customers to build evals for their development tasks, with data staying in the customer's tenant.
- 36:50 Q&A Depth 300 · Novelty 1/3
Q&A: how code survival is measured and limits of shadow testing
Code survival is measured by diffing the repo after e.g. 10 and 20 minutes to see whether Copilot's changes are retained, instrumented for example in VS Code, plus tracking commit survival as a proxy for code reaching production. Shadow testing is limited because it captures no user response, gives little insight for multi-turn scenarios, and in agentic coding can only observe the model until its first tool call unless everything runs in the cloud.
- 39:23 Q&A Depth 300 · Novelty 1/3
Q&A: Copilot Fusion routing classifier and the vision of decision models
Copilot Fusion today uses a classifier over prompt embeddings, plus model profiles, online metrics and rankers, to route traffic to the model with the best price-performance. As a vision not yet built, a decision model or orchestration layer could take over choices of model, size and reasoning level, so developers would no longer pick between MAI-Code-2 and MAI-Code-2-Flash manually.
- 41:51 Q&A Depth 400 · Novelty 2/3
Q&A: agentic benchmark sandbox setup, harness mismatches and language coverage
Agentic benchmarks run in container sandboxes with an image containing source code, dependencies (sometimes deliberately missing) and grader tests or rubrics, with the harness, such as the latest Copilot CLI, inside the container calling the model endpoint. Harness changes like system prompt or tool updates can cause regressions, so nightly runs catch mismatches early and model and harness are adjusted together. No language-specific training is done; Docker images for many languages and PRs/issues naturally give broad coverage.
- 45:18 Q&A Depth 300 · Novelty 2/3
Q&A: pre-training vs post-training, model versioning and Foundry custom tuning
Pre-training on web, documents and internal high-quality tokens takes several months and tens of thousands of GPUs; MAI-Code-1-Flash used a different pre-trained model than MAI-Code-2, which uses a new pre-trained model with different size and architecture. Minor versions like a possible MAI-Code-2.1 come from further post-training on the same base, while a major version would likely use a new pre-trained model. Yanan says Code 2 will also be available on Microsoft Foundry for custom tuning.
- 47:45 Q&A Depth 200 · Novelty 1/3
Q&A: sub-agent support, offloading to smaller models, and close
Sub-agent scenarios are part of the training data and an important target. The vision is for the model family to cooperate so simple parts of long-horizon tasks, such as repo exploration or bash commands, are offloaded to a smaller model while the large model reasons over the results, which is described as ongoing work. The speakers close and offer follow-up questions.
Announcements (7)
-
MAI-Code-2
Microsoft AI's flagship coding model for enterprise everyday software development in GitHub Copilot.
Speaker’s quote (at 05:50)
„today, we're introducing MAI Code 2, which is our flagship model for enterprise everyday software development“
-
MAI-Code-2-Flash
A more cost-efficient MAI coding model for smaller everyday coding tasks.
Speaker’s quote (at 05:50)
„alongside MAI Code 2 Flash, which is the more cost-efficient task for everyday coding smaller tasks“
-
Experimental model checkpoints for developers
Plan to put experimental MAI checkpoints in developers' hands earlier to feed real usage back into training.
Speaker’s quote (at 33:41)
„we want to start getting experimental checkpoints into developers' hands much earlier“
-
MAI-Code-2 50% promotional discount
A 50% discount offered to encourage trying the new MAI code models.
Speaker’s quote (at 34:55)
„We are also offering 50% discount to encourage you to try the model.“
-
MAI-Code GitHub feedback repo
A GitHub repository where users can file issues and communicate directly with the MAI team.
Speaker’s quote (at 34:55)
„there is a GitHub repo called MAI code that you can send issues to us and communicate with directly“
-
Enterprise Eval Program
A partnership program where Microsoft works with customers to build evals for their development tasks, with data staying in the customer's tenant.
Speaker’s quote (at 35:39)
„also starting an enterprise evolve program or so-called partnership evolve program, where basically if you scan a QR code and leave you information“
-
MAI-Code-2 on Microsoft Foundry for custom tuning
MAI-Code-2 is to be made available on Microsoft Foundry for customer custom tuning.
Speaker’s quote (at 47:10)
„And in fact, I think Code 2 also will be available on Foundry for those kind of custom tuning“
Demos (1)
-
Recorded examples of front-end web apps generated by the MAI-Code-2 models, aimed at developers building or polishing UI.
Steps (3)
- Show a Contoso Enterprise overview dashboard with traffic summary, activity cards and a live requests table.
- Show the Komorebi interactive illustrated neighbourhood scene with weather/time widgets and a mini-map.
- Show an interactive 3D Golden Gate Bridge scene and adjust weather, time of day, fog, wind, ocean animation and bridge traffic in the Environment panel.