MAI Code 2: Power-User Guide to Flash, Copilot Pricing and Access

Last updated: November 18, 2026

MAI Code 2 is Microsoft AI’s new coding model for GitHub Copilot, released November 17, 2026, alongside the lighter MAI Code 2 Flash. MAI Code 2 targets debugging, multi-file changes and repository-wide work at a promotional $0.50 input and $2.50 output per million tokens. Flash costs one-tenth of that and is open to Copilot Free.

Contents

What is new in MAI Code 2

Microsoft AI calls the pair “two new coding models built for the everyday enterprise coding tasks” in its announcement. GitHub’s changelog entry describes them as the next generation of the MAI-Code family, which now moves from lightweight coding help to complex, agentic software engineering.

  • MAI Code 2 is the general-purpose model. GitHub lists deep debugging, multi-file implementation, refactoring and repository-wide reasoning as its main uses. Microsoft adds taking code to production and building user interfaces.
  • MAI Code 2 Flash is the lightweight model for high-volume work: code explanations, targeted edits, routine fixes and rapid iteration.
  • Visual coding. Microsoft says MAI Code 2 is tuned for dashboards and visualizations, and the announcement mentions vision support.

Microsoft also says MAI Code 2 is becoming a workhorse behind its own products. From Code 2 Flash it built a further optimized model, MAI Work Flash, which serves Microsoft 365 apps and Fabric IQ.

MAI Code 2 vs MAI Code 2 Flash

Prices below come from GitHub’s models and pricing reference and are per 1 million tokens. MAI-Code-1.1-Flash, the model being retired, is included for comparison.

Item MAI Code 2 MAI Code 2 Flash MAI-Code-1.1-Flash
GitHub category Powerful Lightweight Lightweight
Input / cached input / output (promotional, until May 17, 2027) $0.50 / $0.025 / $2.50 $0.05 / $0.005 / $0.25 $0.20 / $0.02 / $1.20 (standard)
Input / cached input / output from May 17, 2027 $1.00 / $0.05 / $5.00 $0.10 / $0.01 / $0.50 Retired December 18, 2026
1M-token context option Yes Yes Not listed
Configurable reasoning Yes Yes Not listed
Auto model selection Not listed Yes Yes
Copilot plans Pro, Pro+, Max, Business, Enterprise Free, Student, Pro, Pro+, Max, Business, Enterprise Pro, Pro+, Max, Business, Enterprise

Even at the later standard rate, MAI Code 2 Flash costs half as much per input token as MAI-Code-1.1-Flash, and less than half per output token. Copilot converts token use into GitHub AI Credits, where one credit equals $0.01. Code completions and next edit suggestions are not billed in AI credits.

Plans, clients and admin settings

According to the changelog, both models are billed under usage-based billing and are also available to eligible subscribers on annual plans. GitHub’s supported models page lists both as generally available. Note that Copilot Free and Copilot Student users reach models only through auto model selection, which is why MAI Code 2 Flash, and not MAI Code 2, is the model those plans can use.

You can pick either model in Visual Studio Code, Visual Studio, Copilot CLI, Copilot cloud agent, the GitHub Copilot app, github.com, GitHub Mobile on iOS and Android, JetBrains IDEs, Xcode and Eclipse. GitHub lists Visual Studio 17.14.6 as the minimum Visual Studio version for both models.

On Copilot Business and Copilot Enterprise, admins control MAI models through the model policy in Copilot settings. Under default model enablement, new models turn on automatically unless an admin has turned off the global default or disabled the model. For plan differences, see our Copilot Pro vs Pro+ explainer.

Outside Copilot, Microsoft says MAI Code 2 Flash is in limited-access preview in Microsoft Foundry. It also says it will “soon” release the model on OpenRouter, Vercel, Hermes, OpenCode and Kilo, but gives no date.

How to start using MAI Code 2

  1. Update your editor and Copilot extension. In Visual Studio, use version 17.14.6 or later.
  2. If you are on Copilot Business or Enterprise and do not see the models, ask an admin to check the model policy in Copilot settings.
  3. Open the model picker in your client and choose MAI Code 2 for multi-file or debugging work, or MAI Code 2 Flash for quick edits and explanations.
  4. For a large codebase in VS Code or Copilot CLI, choose the extended 1 million token context. Leave it on the default size for routine tasks, since larger context uses more AI credits.
  5. Set the reasoning level where your client supports it (VS Code, Copilot CLI and Copilot cloud agent). GitHub recommends regular reasoning by default and higher levels for complex tasks only.
  6. To avoid surprise charges on an individual plan, create a Bundled AI credits budget set to $0 and turn on Stop usage when budget limit is reached.

If you rely on MAI-Code-1.1-Flash in scripts or agent configurations, switch before December 18, 2026. The deprecation notice names the latest MAI Code Flash model as the replacement. Our Copilot model deprecation guide covers the other retirements this season.

What the benchmarks say

All figures in this section are reported by Microsoft and were run at maximum reasoning effort, mostly on its internal MSBench platform with Copilot CLI.

  • Averaged over DeepSWE 1.1, Terminal Bench 2.1, SWE-Atlas and FrontierCode v1.1, Microsoft says MAI Code 2 delivers 98% of GPT 6.1 Sol’s performance at 40% of the cost, and 96% of Claude Opus 5.5’s performance at 5% of the cost.
  • In blind frontend evaluations with 258 annotators, reviewers preferred MAI Code 2’s results over GPT-6 Sol 64% of the time.
  • Across three coding benchmarks for routine tasks, Microsoft says MAI Code 2 Flash performs comparably to GPT-6 Luna and Claude Haiku 5.5 at 65% and 20% of their cost.

The cost comparisons use the 50% promotional prices for both MAI models, so the gap narrows after May 17, 2027. If you are weighing alternatives, see our GPT-6.2 Astra and Sol guide and our Claude Haiku 5.5 guide.

Limitations to know

  • Not built for the hardest work yet. Microsoft says the models are “explicitly not yet tuned” for problems such as fundamental science research and very long-horizon agentic work.
  • Behavior can change. GitHub notes that MAI models are continuously improving and that performance may change as new checkpoints are released.
  • Promotional pricing ends. Budget for the doubled rates from May 17, 2027.
  • 1M context is limited to two clients. It works in VS Code and Copilot CLI only.

To test the models against your own repository before switching, see our GitHub Copilot Evals guide.

Frequently asked questions

When was MAI Code 2 released?

Microsoft AI announced MAI Code 2 and MAI Code 2 Flash on November 17, 2026, during Ignite. Both models became available in GitHub Copilot the same day.

How much does MAI Code 2 cost in GitHub Copilot?

Until May 17, 2027, MAI Code 2 costs $0.50 per million input tokens, $0.025 per million cached input tokens and $2.50 per million output tokens. After that date the rates double to $1.00, $0.05 and $5.00.

Is MAI Code 2 Flash available on Copilot Free?

Yes. GitHub lists MAI Code 2 Flash for Copilot Free and Copilot Student as well as paid plans. GitHub’s docs note that Free and Student users reach models through auto model selection only, and MAI Code 2 Flash is on the auto selection list.

Does MAI Code 2 support a 1 million token context window?

Yes. GitHub lists both MAI Code 2 and MAI Code 2 Flash with a 1 million token context option and configurable reasoning. The larger context is available in Visual Studio Code and Copilot CLI only, and it uses more AI credits.

What happens to MAI-Code-1.1-Flash?

GitHub will deprecate MAI-Code-1.1-Flash across all Copilot experiences on December 18, 2026. The suggested alternative is the latest MAI Code Flash model, which is MAI Code 2 Flash.

Sources

Image: MAI Code 2 and MAI Code 2 Flash announcement image from Microsoft AI, used for editorial purposes.

Related answers

Leave a Comment