What is MAI Code 2?

MAI Code 2 is Microsoft's paid agentic coding model for everyday enterprise software work, available in GitHub Copilot. The official model card, last updated 17 November 2026, lists a 1,050,000-token context window, text and image inputs, and text output. The same card does not publish a dollar-per-token list price, so this profile does not invent one.

What MAI Code 2 is for

Microsoft presents MAI Code 2 as a coding model for everyday enterprise tasks, and says it excels at taking code to production, deep debugging, multi-file implementation, repo-wide reasoning, and UI, including changes that code maintainers would merge. The official 17 November 2026 model card describes it as the larger frontier model in the MAI Code 2 family, built for complex, long-horizon software engineering in real repositories. MAI Code 2 Flash is the smaller, faster sibling for high-volume explanations, targeted edits, routine fixes, and rapid iteration.

The official card says both models were pre-trained and post-trained by Microsoft from scratch, as decoder-only transformers with sparse mixture-of-experts layers and an integrated vision encoder. They accept text and image inputs and produce text. Microsoft also says MAI Code 2 is tuned for dashboards, visualizations, and visual coding, and reports that in a blind frontend evaluation, developers preferred its results over GPT-6 Sol 64% of the time. That preference figure is Microsoft's published evaluation.

The same announcement is explicit about a limit: the models are not yet tuned for harder problems such as fundamental science research and very long-horizon agentic work.

A first path to try it

If you already use GitHub Copilot, the official starting point is the model picker on a supported client, such as Copilot CLI or Visual Studio Code, on Windows, macOS, or Linux. The official model card says you select MAI Code 2 or MAI Code 2 Flash there. The announcement says both models are available in GitHub Copilot.

If you need an API path, the official card and announcement describe Microsoft Foundry access for MAI Code 2 Flash only, as a limited-access preview, through an OpenAI-compatible Responses API with standard Azure authentication, quotas, and content controls. The sources checked today do not describe a general Foundry API path for MAI Code 2 itself.

This is a suggested official path, not a recorded test. After a first task, check whether the official picker actually served MAI Code 2, whether the change would pass your existing tests, and what the Copilot usage meter shows. Microsoft says listings on OpenRouter, Vercel, Hermes, OpenCode, and Kilo are coming soon, which is not the same as current availability.

Pricing, access, and limits

The official announcement and the MAI Code 2 model card, last updated 17 November 2026 and re-checked on 20 November 2026, do not list dollar-per-token API prices. This profile therefore does not invent a Standard input or output rate. Microsoft's published cost comparisons, including 98% of GPT-6.1 Sol performance at 40% of the cost and 96% of Claude Opus 5.5 performance at 5% of the cost, are officially footnoted as using MAI Code 2's 50% promotional price, with all models run at max reasoning effort.

Official access documented today is GitHub Copilot for both models, and limited-access Microsoft Foundry preview for Code 2 Flash. The official card says model weights are not distributed, and that the models are served on Microsoft Azure GPU infrastructure. Context length is 1,050,000 tokens, with 922,000 max input tokens and 128,000 max output tokens. Training dates are listed as August 2026 to November 2026, and a limitation section says knowledge is limited to data available before the pre-training cut-off in August 2026.

On parameters, report the card as written: the summary table says MAI Code 2 is 50B-100B (80B active), and the overview says 77 billion active, 3 billion embedded, and approximately 2.8 trillion total parameters. Those official figures do not match, and this profile does not reconcile them. Confirm current access and any later price list on Microsoft's pages before you budget a large run.

What stands out

  • Official availability in GitHub Copilot, where users select MAI Code 2 or MAI Code 2 Flash in the model picker on supported clients such as Copilot CLI and Visual Studio Code, on Windows, macOS, and Linux
  • Official context length of 1,050,000 tokens, with a 922,000-token input limit and a 128,000-token output limit, and official support for text and image inputs with text output
  • Official sibling MAI Code 2 Flash, described for high-volume explanations, targeted edits, and routine fixes, with limited-access preview API access in Microsoft Foundry
  • Microsoft reports that, averaged over DeepSWE 1.1, Terminal Bench 2.1, SWE-Atlas, and FrontierCode v1.1, MAI Code 2 reaches 98% of GPT-6.1 Sol performance at 40% of the cost, and 96% of Claude Opus 5.5 performance at 5% of the cost, with the official 50% promotional-price footnote

Before you choose

  • The official model card and announcement checked on 20 November 2026 do not list dollar-per-token API prices; Microsoft's cost comparisons use a 50% promotional price
  • The official model card summary table lists MAI Code 2 as 50B-100B (80B active), while the overview in the same card says 77 billion active, 3 billion embedded, and approximately 2.8 trillion total parameters; this profile reports both figures and does not choose between them
  • Microsoft says the models are not yet tuned for harder problems such as fundamental science research and very long-horizon agentic work
  • This profile is not a hands-on test of GitHub Copilot or Microsoft Foundry

Sources & further reading

Based on the official documentation below. Features and access can change; check the provider before making a decision.

  1. Microsoft: MAI Code 2 and Code 2 Flash, dated 17 November 2026, rendered 20 November 2026 (opens in a new tab)
  2. Official MAI Code 2 and MAI Code 2 Flash model card PDF, last updated 17 November 2026, retrieved 20 November 2026 (opens in a new tab)
  3. Official Microsoft Ignite 2026 models announcement, rendered 20 November 2026 (opens in a new tab)
Something out of date or incorrect?Report a correction

Was this page useful?

Help us make our coverage more useful. This is feedback on the page, not a rating of the tool.

Share this page

Related reading