Microsoft announced MAI Code 2 and MAI Code 2 Flash on November 17, 2026, splitting its latest enterprise coding release between deeper repository work and high-volume routine tasks. Code 2 targets debugging, multi-file implementation and production changes. Flash focuses on explanations, targeted edits, routine fixes and rapid iteration, according to the launch announcement.
The immediate choice involves both workload and access. Developers can use either model through GitHub Copilot, but the Foundry preview covers only Flash. Microsoft also makes substantial price-performance claims against OpenAI and Anthropic models, with results tied to selected coding benchmarks.
Where Code 2 and Flash Are Available
Microsoft lists both models as available in GitHub Copilot. MAI Code 2 Flash is also offered in a limited-access preview in Microsoft Foundry. The announcement does not list the larger Code 2 model for Foundry.
| Access Path | MAI Code 2 | MAI Code 2 Flash |
|---|---|---|
| GitHub Copilot | Available | Available |
| Microsoft Foundry | Not listed in the announcement | Limited-access preview |
That distinction matters for teams choosing between a coding assistant and a model they can evaluate through a separate platform. Copilot is the announced access route for trying either model within a developer workflow. A team planning a Foundry integration has a narrower option: Flash, subject to preview access.
I would keep those evaluation plans separate. Availability inside Copilot should not be read as unrestricted Foundry access, and a limited preview is a poor foundation for a rollout that depends on immediate, broad availability. Microsoft’s model card also references product-specific service terms, including Azure supplemental preview terms.
Choose by the Scope of the Coding Task
Microsoft positions Code 2 as the larger model for work that requires understanding relationships across a repository. Flash is the smaller, lower-cost option for frequent, bounded requests.
| Workload | Microsoft’s Intended Starting Point | Practical Interpretation |
|---|---|---|
| Deep debugging | Code 2 | Investigate failures that may involve several components |
| Multi-file implementation | Code 2 | Coordinate changes across an existing codebase |
| Repository-wide reasoning | Code 2 | Trace dependencies and behavior beyond one file |
| Code explanations | Flash | Answer focused questions about existing code |
| Targeted edits and routine fixes | Flash | Make bounded changes with clear acceptance criteria |
| Rapid iteration | Flash | Handle repeated, high-volume developer requests |
These are Microsoft’s intended use cases, not measured boundaries between the models. A short edit can still require difficult reasoning if it changes authentication behavior or a shared interface. Conversely, a large batch of straightforward changes may be suitable for the routine-work model.
My starting rule would be Flash for a well-defined change, Code 2 when discovering the change is a substantial part of the job. That follows Microsoft’s positioning more closely than routing by file count alone.
For example, explaining a function or updating a known validation message looks like a Flash task. Diagnosing why a validation change breaks several services is a better candidate for Code 2. Those are suggested routing choices, not results from testing either model.
Microsoft’s announcement also sets a boundary around the launch: the models are “explicitly not yet tuned for harder problems,” including fundamental science research and very long-horizon agentic work. The model card’s description of complex, long-horizon repository tasks should be read within that narrower software-engineering focus.
Both Have a Million-Token Context, With Separate Limits
The model card, last updated November 17, gives both models the same context specifications:
- Total context length: 1,050,000 tokens.
- Input limit: 922,000 tokens.
- Output limit: 128,000 tokens.
- Supported inputs: Text and images.
- Output: Text.
Tokens are pieces of text or encoded content, not lines of code. The separate limits matter: a 1,050,000-token context does not mean a request can contain that many input tokens. The documented input ceiling is 922,000, with a separate output allowance of up to 128,000.
The shared capacity is a useful detail in the two-model tradeoff. Choosing Flash does not reduce the documented context window. It still leaves open how reliably each model can locate relevant information and reason across that context. Matching capacity is not evidence of matching repository understanding.
Both models also have integrated vision encoders. Microsoft lists screenshots, UI mockups, charts and diagrams as supported material for coding tasks. That gives the family a role in image-to-code workflows as well as text-based repository work.
Treat these as model-level specifications when planning an evaluation. The product’s exposed limits and controls still need checking before a team designs a workflow around maximum-size requests.
The Architecture Is Shared, but the Size Figures Need Care
Microsoft says both models use a decoder-only transformer with sparse mixture-of-experts layers, share an architecture family and training recipe, and differ mainly in scale. In a sparse mixture-of-experts model, selected expert components process a token, so total parameter count and active parameter count describe different things.
The model card presents the sizes in two ways:
- Code 2’s summary table: A 50B–100B parameter range, with 80B active.
- Code 2’s detailed overview: 77B active parameters, 3B embedded parameters and approximately 2.8 trillion total parameters.
- Flash’s summary table: A 5B–15B range, with 12B active.
- Flash’s detailed overview: 12B active parameters and approximately 398 billion total parameters.
Code 2’s 77B active plus 3B embedded figures may explain the 80B headline, but the summary labels 80B as active without spelling out that accounting. Flash’s 12B active figure is consistent across the two descriptions; its total size is much larger than the summary range.
The useful takeaway is that Flash activates substantially fewer parameters, which fits Microsoft’s lower-serving-cost positioning. I would avoid turning that gap into an exact speed or price multiplier. Parameter counts alone cannot account for hardware, reasoning effort, output length or deployment pricing.
What Microsoft’s Benchmark Comparisons Actually Say
Microsoft’s headline comparisons use different benchmark groups for the two models.
For MAI Code 2, Microsoft averages results across DeepSWE 1.1, Terminal Bench 2.1, SWE-Atlas and FrontierCode v1.1. On that basis, the company claims:
- 98% of GPT-6.1 Sol’s performance at 40% of its cost.
- 96% of Claude Opus 5.5’s performance at 5% of its cost.
For MAI Code 2 Flash, Microsoft reports comparable performance to GPT-6 Luna and Claude Haiku 5.5, at 65% and 20% of their respective costs, across three benchmarks aimed at day-to-day, high-volume coding tasks. These figures come from Microsoft’s announcement.
The published comparisons are vendor-reported, and the supplied evidence contains no independent measurements. Their usefulness depends on how closely the selected tasks and evaluation configurations resemble a team’s actual work.
Frequently Asked Questions
3 questions
1Is MAI Code 2 Available in Microsoft Foundry?
The announcement lists only MAI Code 2 Flash for Foundry, in limited-access preview. Both models are available in GitHub Copilot.