最后更新:11/22/2026最后核验:2026-11-22
MAI Code 2 Flash 是什么
MAI Code 2 Flash 是微软提供的托管式编程模型,通过 GitHub Copilot 使用,并非独立的代码编辑器或网站。GitHub 将其定位为轻量、高性价比的选择,适用于代码解释、定向修改、常规问题修复和快速迭代。能否使用取决于你的 Copilot 套餐,具体支持的功能也因使用入口而异。
核心功能
- 日常 AI 编程辅助:专为解释代码、局部修改、处理常见问题和迭代开发而设计。
- 覆盖多种 Copilot 使用入口:GitHub 文档将该模型标记为正式可用(GA),并列出对 GitHub.com、Copilot CLI、Visual Studio Code、Visual Studio、Eclipse、Xcode 和 JetBrains IDE 的支持。
- 更多访问方式:GitHub 更新日志还列出了 Copilot 云端智能体(Copilot cloud agent)、Copilot 应用,以及 iOS 和 Android 版 GitHub Mobile。
- 部分入口支持长上下文:仅在 Visual Studio Code 和 Copilot CLI 中提供 100 万 token 上下文窗口。
- 可调推理级别:在 Visual Studio Code、Copilot CLI 和 Copilot 云端智能体中,可调整模型的推理级别。
- 按 AI 积分计费:模型交互按 token 费率消耗 GitHub AI Credits,优先使用套餐内含的每月积分额度,超出后再收取额外费用。
- 云端托管:无需配备运行本地模型的硬件,微软也不分发该模型的权重。
最适合
希望在现有 Copilot 工作流中理解陌生代码的开发者。需要定向修改代码、不想切换到独立 AI 编程应用的用户。需要处理常规修复和反复迭代开发任务的开发者。希望为日常、高频编程任务评估轻量级模型的团队。需要在 Visual Studio Code 或 Copilot CLI 中使用 100 万 token 上下文窗口的开发者。希望在受支持的 Copilot 入口中调整推理级别的用户。
定价
MAI Code 2 Flash 通过 GitHub Copilot 提供;根据所提供的资料,Copilot 采用免费增值模式,即提供免费与付费套餐。模型交互按 token 费率消耗 GitHub AI Credits,每 1 积分相当于 0.01 美元。各 Copilot 套餐内含的每月 AI 积分额度不同,使用时先扣除内含额度,超出后再计费。付费套餐中的代码补全和下一步编辑建议不扣除积分。现有资料未列出套餐价格、该模型的具体 token 费率,也未明确哪些套餐可使用该模型,因此无法据此估算通常的月度使用成本。
优缺点
优点
- 集成于 Copilot,可在多种编辑器和开发入口中使用。
- 聚焦代码解释、定向修改和常规修复等常见编程任务。
- 在 Visual Studio Code 和 Copilot CLI 中提供 100 万 token 上下文窗口。
- 在部分使用入口中支持调整推理级别。
- 无需本地硬件来部署和运行模型。
缺点
- 不能作为独立 IDE 或独立 AI 编程网站使用。
- 100 万 token 上下文窗口仅限 Visual Studio Code 和 Copilot CLI。
- 只有指定的受支持入口提供推理级别设置。
- 需要监控积分消耗及超额 token 费用;现有资料不足以估算使用成本。
- 不分发模型权重,因此无法本地部署。
- 现有资料未提供基准测试结果或实测准确率,无法据此判断其处理复杂编程任务的表现。
替代工具
Cursor
如果你更偏好以编辑器为核心的 AI 编程体验,而不是在 GitHub Copilot 中选择模型,可以考虑 Cursor。
Claude Code
适合希望评估终端开发工作流,以及通过智能体辅助修改代码的用户。
Windsurf
以 AI 为核心的开发环境,适合希望在 Copilot 生态之外探索一体化编程辅助的用户。
Amazon Q Developer
适合需要代码解释、编程辅助,或涉及 AWS 开发工作流的用户。
常见问题
详情
平台
网页版iOSAndroid
功能特性
- GitHub describes it as a lightweight, cost-efficient coding model for code explanations, targeted edits, routine fixes and rapid iteration
- GitHub Docs marks it GA and lists it for GitHub.com, Copilot CLI, Visual Studio Code, Visual Studio, Eclipse, Xcode and JetBrains IDEs; the changelog also lists Copilot cloud agent, the Copilot app and GitHub Mobile iOS/Android
- The 1 million token context window is available in Visual Studio Code and Copilot CLI only, and configurable reasoning levels are available in Visual Studio Code, Copilot CLI and Copilot cloud agent
- Interactions consume GitHub AI Credits at per-token rates (1 credit = $0.01 USD), with included monthly allowances varying by plan; code completions and next edit suggestions are not charged in credits on paid plans
- Microsoft calls it a hosted model for routine, high-volume work: no local hardware is required and model weights are not distributed
支持语言
en
已知限制
- It is a model inside GitHub Copilot, not a standalone IDE, website or downloadable product; Microsoft official page points to Try in GitHub Copilot and the official model card states weights are not distributed
- The Copilot changelog lists Flash for Free, Student, Pro, Pro+, Max, Business and Enterprise, but GitHub Docs says Free and Student users access models through auto model selection only; manual selection on those plans was not verified
- Usage consumes GitHub AI Credits: Pro includes 1,500 credits/month, Pro+ 7,000 and Max 20,000, and unused credits do not carry over; Free and Student have allowances but no numeric public figure was found on the verified pages, so there is no unlimited free use
- Usage beyond included plan credits is billed in AI credits at promotional per-token rates until 2027-05-17 ($0.05 per 1M input tokens, $0.005 cached input, $0.25 output; $0.10/$0.01/$0.50 afterwards)
- Availability is limited by plan, client/feature and organization administrator policies; minimum IDE versions are marked tentative with most Flash entries still TBD, and Microsoft says the models are not yet tuned for fundamental science research or very long-horizon agentic work, with the model card stating the release is optimized for English code production only
- No MAI Code 2 Flash specific country or region list was found on the verified first-party pages; only general Copilot trade-control policy was located, so global availability should not be assumed








