MAI Code 2
Microsoft coding model launched November 17, 2026 for multi-file implementation, deep debugging, refactoring, and repository-wide reasoning, with image input and a 1.05 million-token context window.
At a glance
- Context window
- 1.05M tokens
- Max output
- 128K tokens
- Text input / output · per 1M tokens
- $0.500 / $2.50
- Knowledge cutoff
- —
Benchmark snapshot
Best result in each category
CodingDeepSWE
73.2Max (With Tools) · #17 of 73
Benchmark details
2 results · Best published score per benchmark, grouped by category
| Benchmark · setting | Score | Rank |
|---|---|---|
| Coding | ||
| DeepSWE Max (With Tools) · Repository Engineering | 73.2 | 17 / 73 |
| Terminal-Bench 2.1 Max (With Tools) · Agentic Development | 84.6 | 29 / 68 |
Rank is this model's position among every model with a published result on that leaderboard; the bar shows how far up the field that is. Orange marks first place on leaderboards with at least 5 models. Unranked leaderboards publish a composite or direction-less score.
Back to benchmark snapshot ↑API pricing
Current promotional text rates, USD per million tokens · standard list effective 2027-05-17
- Input
- $0.50
- Output
- $2.50
- Cached input
- $0.025
Blended price4:1 input:output · 90% of input tokens cached · same basis as the price ranking
$0.558/ 1M tokens
Promotions & time-of-day pricing
The prices below apply only within the stated dates and times. Standard prices are used outside these windows.
GitHub Copilot launch offer · standard · input
$1.00$0.50 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · Cache read
$0.05$0.025 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
GitHub Copilot launch offer · standard · output
$5.00$2.50 / 1,000,000 tokens50% offValid 2026-11-17 – 2027-05-16 · UTC
Specifications
- Provider
- Microsoft
- Model type
- Reasoning model
- Released
- November 17, 2026
- Total parameters
- 2.8T
- Active parameters
- 77B
- Architecture
- Mixture of experts
- Context window
- 1.05M tokens
- Max output
- 128K tokens
- Input
- Text, Image
- Output
- Text
- Weights
- Closed / API only
- Commercial use
- Proprietary
Capabilities
Model analysis
Microsoft coding model launched November 17, 2026 for multi-file implementation, deep debugging, refactoring, and repository-wide reasoning, with image input and a 1.05 million-token context window. Microsoft trained the family from scratch and ran reinforcement learning in GitHub Copilot CLI and VS Code agent harnesses.
The two models share an architecture and differ in scale
The sparse mixture-of-experts decoder has an integrated vision encoder and about 2.8 trillion total parameters, with 77 billion active and 3 billion embedding parameters. Microsoft reports roughly 50 trillion pretraining tokens and another 150 billion for context extension. The model-card summary describes 80B, while the architecture section breaks that figure into 77B active and 3B embedding parameters. Both models accept up to 922,000 input tokens and return up to 128,000 text tokens. Reasoning effort runs from low through medium, high, xhigh, and max. At launch, Microsoft optimized the family for English-language code production.
The reported pass rates depend on the test setup
Microsoft reports 73.2% / 84.6% / 43.1% on DeepSWE 1.1, Terminal-Bench 2.1, and SWE Atlas respectively. It used MSBench and GitHub Copilot CLI 1.0.102 with max reasoning and subagents disabled, averaging single-attempt pass rates over three runs per task. Microsoft combines these tests with Artificial Analysis FrontierCode 1.1 and reports 98% of GPT-6.1 Sol performance at around 40% of the cost, and 96% of Claude Opus 5.5 performance at around 5% of the cost. Its separate blind visual coding study involved 258 annotators, with Code 2 preferred in 64% of frontend app comparisons. Microsoft used launch promotional rates for its cost comparisons. In a separate advanced-autonomy evaluation, the card reports 67.27% / 60.2% / 80.9% on GAIA Validation, DeepSWE 1.1, and SWE Atlas respectively.
Microsoft reports average costs of $0.618, $0.081, and $0.228 per task on these three tests at launch rates, respectively. It also cites an Artificial Analysis FrontierCode 1.1 score of 52.0% and a $0.31 per-task cost. The announcement leaves the subset and harness unspecified.
GitHub Copilot launch pricing runs through May 2027
GitHub Copilot lists Code 2 as GA for Pro, Pro+, Max, Business, and Enterprise. Microsoft announced limited-access Foundry API preview for Flash. Copilot charges $0.50 / $0.025 / $2.50 per million input, cached-input, and output tokens respectively. From May 17, 2027 the rates are $1.00 / $0.05 / $5.00. The models are hosted, with no public weight downloads.
Microsoft separately announced a MAI Licensed Weights program for selected enterprise customers.
Sources
Last reviewed 2026-11-18
MAI Code 2 vs competitors
Comparable results only · record is MAI Code 2's wins–losses
| Benchmark | MAI Code 2This model | vs MAI Code 2 FlashRecord 2–0 | vs Inkling 2 SmallRecord 1–1 | vs SWE-2 FlashRecord 1–1 | vs DeepSeek-V4.1-Flash-1017Record 0–2 |
|---|---|---|---|---|---|
| DeepSWE | 73.2 | 59.9 | 72.1 | 60.1 | 77.0 |
| Terminal-Bench 2.1 | 84.6 | 78.3 | 85.1 | 89.2 | 91.0 |
Primary sources
- MAI Code 2 technical reportmicrosoft.ai
- MAI Code 2 online demogithub.com
Community discussion
Share the API, setup, and tradeoffs you actually tested. Rate the model once; comment as often as you like.
Used this model? Sign in with Google to rate it and share what worked, what did not, and which API or setup you tested.
No community comments yet.
