by Microsoft

MAI-Code-2 pricing, limits and verdict

Microsoft's larger MAI coding model, sold through GitHub Copilot rather than a public API.

Best for
Everyday enterprise coding
Not for
Calling the model by API
  • Preview
  • Proprietary

Should you use MAI-Code-2?

Microsoft reports 73.2% on DeepSWE 1.1 and 84.6% on Terminal-Bench 2.1, both run on its own platform at max reasoning effort. It suits teams already in GitHub Copilot, but it has no public API, weights or per-token price, so anyone outside Copilot should look at MAI Code 2 Flash or another model.

Best for

  • Everyday enterprise coding Microsoft's launch post says the model is in every Copilot client and was built for the everyday coding tasks the company sees in GitHub Copilot.
  • Front-end work from screenshots and mockups The model card lists image-to-code, and Microsoft reports a 64% developer preference over GPT-6 Sol in blind frontend tests.

Not for

  • Calling the model by API Microsoft lists only the Flash model in Foundry, in limited-access preview.
  • Very long-horizon agentic work Microsoft says the model is not yet tuned for it.
  • Self-hosting Microsoft does not distribute the weights.

Can you use MAI-Code-2?

  • GitHub Copilot: yes (Selectable in the model picker of supported Copilot clients such as Copilot CLI and VS Code). Plan inclusion and any premium-request multiplier are not stated in the launch post.
  • Microsoft Foundry: no (Only MAI Code 2 Flash is offered, in limited-access preview). MAI Code 2 itself is not listed for Foundry.
  • Free plan: no.

MAI-Code-2 pricing

Pricing model
included in GitHub Copilot plans; no per-token price published
Free tier
No

Microsoft published no per-token price for MAI Code 2 in its launch post or model card of 17 November 2026. The model is offered in GitHub Copilot, and its cost comparisons against other models assume a half-price promotion, so the standard price would be higher. Check GitHub Copilot's plan page for what your plan includes.

What MAI-Code-2 can do

MAI Code 2 is Microsoft's larger agentic coding model, released on 17 November 2026 alongside MAI Code 2 Flash. It is a sparse Mixture-of-Experts transformer with about 2.8 trillion total parameters and 77 billion active, accepts text and image input, and has a 1.05 million token context window.

What goes in and what comes out

Reads

  • text
  • image
  • tool-calls

Writes

  • text
  • tool-calls

Capabilities

  • Function callingSupported
  • Tool useSupported
  • VisionSupported
  • Audio inputNot supported
  • Audio outputNot supported
  • Video inputNot supported
Reasoning modes
low, medium, high, xhigh, max

Key features

  • Sparse mixture-of-experts

    Trained from scratch by Microsoft, with a vision encoder built into the same network.

  • Long input and output

    A 1,050,000-token window, 922,000 of it input, with up to 128,000 tokens out.

  • Configurable reasoning effort

    Low, medium, high, xhigh and max trade latency and cost against quality.

  • Image-to-code

    Screenshots, UI mockups and charts can be used as input for coding tasks.

  • Trained in Copilot tooling

    Reinforcement learning ran inside the GitHub Copilot CLI and VS Code agent setups.

MAI-Code-2 benchmarks

Standout result

84.6%

Terminal-Bench 2.1 pass rate at max reasoning effort

Source: Microsoft model card, read 2 December 2026

Benchmark scores

  • Terminal-Bench 2.1 vendor-reported · 02 Dec 202684.6%Multi-step tasks completed in a real command line, % solved.

A benchmark is an exam, not the job. Scores transfer unevenly between tasks, so weigh the one closest to your workload and read every figure with its source.

Strengths and limits

Strengths

  • Microsoft's own run on MSBench gives 84.6% on Terminal-Bench 2.1 and 73.2% on DeepSWE 1.1, per its model card.
  • Microsoft's launch post lists it in every GitHub Copilot client.
  • Reinforcement learning ran in the Copilot CLI and VS Code setups, so test conditions match production use, per the model card.
  • Context of 1,050,000 tokens and up to 128,000 tokens of output, per the model card.
  • Takes screenshots, mockups and charts as input for coding tasks, per the model card.

Limits

  • No public API for this model, no weights and no per-token price, per Microsoft's launch post and model card.
  • Every score is Microsoft-run, and the cost comparisons use a promotional price, per the launch post footnotes.
  • The model card places its alignment on par with an older GPT-5.6 Sol and below GPT-6.

MAI-Code-2 alternatives

ModelLabContextIn / out per 1MReads and writes
MAI-Code-2 This pageMicrosoft1.1M--text, image → text
GPT-6.1 SolPick MAI Code 2 if you live in GitHub Copilot and Microsoft's 98% of GPT-6.1 Sol's four-benchmark average is enough; pick GPT-6.1 Sol if you need an API or independent results.OpenAI1.1M$2 / $10text, image → text
Claude Opus 5.5Pick MAI Code 2 for Copilot-native work where Microsoft's 96% of Opus 5.5's four-benchmark average is enough; pick Claude Opus 5.5 for the hardest long-horizon tasks.Anthropic1M$4 / $20text, image, pdf → text
Devstral Small 2Mistral's open-weights 24B coding model with a 256K context window, built for agentic software engineering and released in December 2025.Mistral AI256K--text, image → text

MAI-Code-2 specs

Context window
1.1M tokens
Max output
128K tokens
Architecture
Sparse Mixture-of-Experts, decoder-only, with an integrated vision encoder
Mixture of experts
Yes
Parameters
About 2.8T total, 77B active (card overview); the summary table lists 50B-100B with 80B active

Training data

Pre-trained from scratch on roughly 50 trillion tokens on top of MAI-Base-2, with about 150 billion tokens of long-context extension, then supervised fine-tuning and reinforcement learning on agentic software-engineering environments run in the GitHub Copilot CLI and VS Code setups.

Known quirks

Show 4 known quirks
  • Long sessions can drift

    Per the card, long agentic sessions can loop on tool calls, ignore instructions or end before checking results.

    Workaround: Break work into checkpoints and have the agent run the test suite before moving on.

  • More effort is not always better

    The card says higher reasoning effort raises latency and token use and does not always improve results.

    Workaround: Use low or medium effort for routine edits and keep max for hard bugs.

  • Foundry has only Flash

    The card names Foundry as a channel for the Flash model alone.

    Workaround: Use Copilot for the larger model, or Flash on Foundry if you need an API.

  • Quality can slip near the context limit

    The card says quality may degrade as context approaches its maximum length.

    Workaround: Trim or summarise the working set before filling the full window.

MAI-Code-2 facts

Deployment
Azure
Released
17 Nov 2026
Current version
mai-code-2
Knowledge cutoff
01 Aug 2026
Family
MAI-Code
Variant
Code
Licence
Microsoft product and service terms (Enterprise AI Services Code of Conduct, Foundry terms, Azure preview terms) · Proprietary

Content restrictions

  • Use is governed by the Microsoft Enterprise AI Services Code of Conduct and the terms of the product where it is deployed.

Safety controls

Red teaming
Evaluated against agentic-safety, CBRN and cyber risk benchmarks described in the model card; both models are served with platform safety classifiers including cybersecurity and biosecurity classifiers.
Content filter API
Yes

Version history

  • mai-code-2 · 17 Nov 2026

    Released with MAI Code 2 Flash; offered in GitHub Copilot.

  • mai-code-1.1-flash · 11 Aug 2026

    Earlier Flash model with 5B active parameters.

What changed

  • Release MAI Code 2 and MAI Code 2 Flash source

Questions about MAI-Code-2

What does MAI Code 2 cost?

Neither the launch post nor the model card of 17 November 2026 gives a per-token price for MAI Code 2. The model is offered inside GitHub Copilot, so what you pay depends on your Copilot plan. Microsoft's cost comparisons with GPT-6.1 Sol and Claude Opus 5.5 use a promotional rate, so they understate what the standard price would be.

Can I call MAI Code 2 by API or download it?

Not as of 2 December 2026. Microsoft lists MAI Code 2 in GitHub Copilot clients only, puts the Flash model alone in limited-access preview on Microsoft Foundry, and says weights are not distributed. It has named OpenRouter, Vercel, Hermes, OpenCode and Kilo as later channels, without dates.

How big is the MAI Code 2 context window?

The model card gives a 1,050,000-token context window, with a 922,000-token input limit and up to 128,000 tokens of output. Input can be text and images, output is text, and reasoning effort can be set to low, medium, high, xhigh or max.

How good is MAI Code 2 at coding, and who measured it?

Microsoft's model card puts DeepSWE 1.1 at 73.2% and Terminal-Bench 2.1 at 84.6%. Microsoft ran both itself on its MSBench platform at max reasoning effort with no subagents, and BenchLM shows Microsoft as the party that ran them. No independent board had published results when Hokai looked.

What are the known limits of MAI Code 2?

Microsoft's card warns that long agentic sessions can repeat tool calls or stop before verifying work, that quality may degrade near the context limit, and that performance outside English and in less common languages was not extensively evaluated. The launch post adds that it is not yet tuned for fundamental science research or very long-horizon agentic work.

About MAI-Code-2

MAI Code 2 is the larger of two coding models that Microsoft released on 17 November 2026, the other being MAI Code 2 Flash. Microsoft's launch post describes it as built for everyday enterprise coding tasks such as taking code to production, deep debugging, multi-file implementation, repository-wide reasoning and user interfaces, and says it is explicitly not yet tuned for harder problems like fundamental science research and very long-horizon agentic work. It follows MAI-Code-1.1-Flash, which had 5B active parameters.

Read the full background

The model card, last updated on 17 November 2026, describes a decoder-only sparse Mixture-of-Experts transformer with an integrated vision encoder, trained from scratch by Microsoft on top of MAI-Base-2. The overview gives about 2.8 trillion total parameters with 77 billion active and 3 billion embedded, pre-trained on roughly 50 trillion tokens; the summary table at the top of the same card lists a range of 50B-100B with 80B active, so the card is not consistent with itself on this point. Training ran from August to November 2026 and the pre-training data cut-off is August 2026.

It accepts text and image input, with a 922,000-token input limit, returns text up to 128,000 tokens and has a 1,050,000-token context window. Reasoning effort is configurable at low, medium, high, xhigh and max. The card lists image-to-code from screenshots, mockups and charts among its main uses, together with multi-file edits, debugging, refactoring, test-driven verification and terminal work with shell, file and search tools.

Microsoft's results are its own runs. On MSBench with the GitHub Copilot CLI, subagents off and max reasoning effort, the model card gives MAI Code 2 a pass rate of 84.6% for Terminal-Bench 2.1 and 73.2% for DeepSWE 1.1. Averaged over four coding benchmarks, the launch post says it reaches 98% of the performance of GPT-6.1 Sol at 40% of the cost, and 96% of Claude Opus 5.5 at 5% of the cost; the footnote says those costs are shown at MAI Code 2's 50% promotional price. In blind frontend evaluations by 258 annotators, developers preferred its output to GPT-6 Sol's 64% of the time.

Access is narrow. MAI Code 2 and Flash are available in every GitHub Copilot client, while only the Flash model is in limited-access preview in Microsoft Foundry. Microsoft says the models will come to OpenRouter, Vercel, Hermes, OpenCode and Kilo, gives no date, and does not distribute weights; the models run on Azure GPU infrastructure. The launch post and card publish no per-token price.

Who should look elsewhere: teams that need an API today, weights they can host, or the strongest score on very long agentic tasks. The card itself says long agentic sessions can repeat tool calls, drift from instructions or stop before verifying their work, and rates its alignment as similar to GPT-5.6 Sol but below GPT-6. For self-hosting, Amazon Ergo has open weights, and Microsoft's Flash sibling covers Foundry.

The cost and performance comparisons are vendor-reported, include Microsoft-run tests on a Microsoft platform, and use a promotional price, so read them as an upper bound until an independent board runs the model. BenchLM, read on 2 December 2026, marks its published rows as tied to a source and shows Microsoft as the party that ran each, while its reasoning and multimodal categories for this model are not measured.

Our call: use MAI Code 2 if you already work in GitHub Copilot and want to try a Microsoft-built coding model on everyday tasks. If you need an API, weights or independent results, choose MAI Code 2 Flash on Foundry, GPT-6.1 Sol, Claude Opus 5.5 or an open-weights model, and revisit this one once an independent board lists it.

Sources and guides

More AI Models on Hokai

  • MAI-Code-1.1-FlashMicrosoft released MAI-Code-1.1-Flash in August 2026 as a small-tier coding model for GitHub Copilot, adding native vision input and a large context window.
  • Gemini 3.5 Flash CyberGemini 3.5 Flash Cyber (Google DeepMind, 2026) is a gated fine-tune of Gemini 3.5 Flash for finding and patching vulnerabilities inside CodeMender.
  • Mellum2.1Mellum2.1 is JetBrains' open mixture-of-experts model, post-trained with reinforcement learning to work inside code repositories as an agent.
  • GLM-5.3GLM-5.3 is Z.ai's text-only flagship for agentic coding and security work, with a 1M-token context, a live API and open weights.
  • Gemini 3.8 Flash CyberGemini 3.8 Flash Cyber (Google DeepMind, Sept 2026) reports 86.2% on CyberGym and is limited to vetted Fairwind Program defenders; Gemini 4 Argon now sits above it.
  • Kimi K2.7-CodeOpen-weight 1T/32B-active MoE coding model from Moonshot AI, released June 2026 under a Modified MIT license and built for long-horizon agentic coding.