MAI Code 2 Flash
Microsoft's low-cost coding model for routine edits, on every GitHub Copilot plan
Context window
1.05M
Input / 1M tokens
$0.05
Output / 1M tokens
$0.25
Provider
Microsoft
GitHub Copilot usage-based billing at a promotional rate until May 17, 2027: $0.05 per 1M input tokens, $0.005 cached input and $0.25 output. From May 17, 2027 the standard rate is $0.10/$0.01/$0.50. Usage draws on the AI credits included in Copilot plans before per-token billing applies. Max input 922K tokens and max output 128K. Microsoft Foundry access is a limited-access preview. · Data verified 2026-11-24
MAI Code 2 Flash (November 17, 2026) is the smaller sibling of MAI Code 2, launched by Microsoft AI at Ignite for high-volume work such as code explanations, targeted edits, routine fixes and quick iterations. It shares MAI Code 2's architecture family and training recipe, accepts text and images, and has a 1.05M-token context window with 128K max output. Microsoft says it performs comparably to GPT-6 Luna at about 65% of the cost and to Claude Haiku 5.5 at about 20%, measured at a 50% promotional price, and that a model derived from it, MAI Work Flash, serves Microsoft 365 products. It is in GitHub Copilot on all plans, including Free and Student, and in a limited-access preview in Microsoft Foundry.
How to access it
Available in GitHub Copilot on Free, Student, Pro, Pro+, Max, Business and Enterprise plans (GitHub says for eligible subscribers on annual plans) through the model picker in Visual Studio Code, Visual Studio, Copilot CLI, Copilot cloud agent, the GitHub Copilot app, github.com, GitHub Mobile, JetBrains, Xcode and Eclipse. Microsoft Foundry offers it in a limited-access preview through the OpenAI-compatible Responses API, and Microsoft says it will come to OpenRouter, Vercel and other platforms soon.
Strengths
- ✓$0.05/$0.25 per 1M tokens until May 17, 2027 ($0.10/$0.50 after)
- ✓Available on GitHub Copilot Free and Student as well as paid plans
- ✓78.3% on Terminal-Bench 2.1 and 59.9% on DeepSWE v1.1 at max effort (Microsoft-reported)
- ✓1.05M-token context window with image input
Best for developers who...
When to choose it (and when not to)
Reach for MAI Code 2 Flash when...
- →You want the cheapest capable coding model in GitHub Copilot for everyday edits
- →You are on Copilot Free or Student and want a newer Microsoft model
Look elsewhere if...
- ✕Complex, long-horizon tasks: Microsoft's model card says it is less capable than MAI Code 2 there and may need more guidance
- ✕You need general API access today (Foundry access is a limited preview)
- ✕Non-English work: Microsoft says the MAI Code 2 family is optimized for English code production only at release
How to use it
- ›Keep tasks small and specific, such as one fix or one explanation per request
- ›Switch to MAI Code 2 for multi-file changes or deep debugging
Benchmarks
| Benchmark | Score | Notes |
|---|---|---|
| DeepSWE v1.1 | 59.9% (max effort) | Microsoft-reported, model card; MSBench with GitHub Copilot CLI 1.0.102, subagents off, mean of three runs; MAI Code 2 73.2% |
| Terminal-Bench 2.1 | 78.3% (max effort) | Microsoft-reported, model card; same harness; MAI Code 2 84.6% |
| SWE Atlas | 44.8% (max effort) | Microsoft-reported, model card; MAI Code 2 43.1% |
Source: MAI Code 2 and MAI Code 2 Flash model card (Microsoft AI)
Tools powered by MAI Code 2 Flash
Compare MAI Code 2 Flash
Compare MAI Code 2 Flash with any other model
Build a comparison →All model comparisons →