两款模型,一次发布
2026 年 11 月 17 日,微软 AI 在 Ignite 上发布了 MAI Code 2 和 MAI Code 2 Flash。它们属于同一系列、同日发布,因此合并为一篇文章。每个模型仍有各自的模型页和 id。
| 模型 | 适用场景 | 目前可用位置 | API 价格 |
|---|---|---|---|
| MAI Code 2 | 深度调试、多文件实现、仓库级推理、UI 工作 | GitHub Copilot | 未公布 |
| MAI Code 2 Flash | 高吞吐工作:代码解释、定向修改、常规修复、快速迭代 | GitHub Copilot;Microsoft Foundry 限量预览 | 未公布 |
微软只给出相对其他模型的成本,并表示所展示的成本按 50% 促销价计算。两款模型都没有公布每 token 价格,因此 AnyRouter 显示“未公布”,而不是一个数字。
微软的说法
以下是微软公布的结果,并非 AnyRouter 的测量。微软所有模型均使用最高推理强度,自家结果在内部 MSBench 上用 GitHub Copilot CLI 运行,未使用子代理。
- MAI Code 2:在 DeepSWE 1.1、Terminal Bench 2.1、SWE-Atlas 和 FrontierCode v1.1 上,达到 GPT 6.1 Sol 98% 的表现,成本为其 40%;达到 Claude Opus 5.5 96% 的表现,成本为其 5%。
- MAI Code 2:在 258 名评审参与的前端盲测中,评审者 64% 的情况下更偏好其结果,对比对象为 GPT-6 Sol。
- MAI Code 2 Flash:在三项日常编码基准上,表现与 GPT-6 Luna 和 Claude Haiku 5.5 相当,成本分别为它们的 65% 和 20%。
- 微软自述的局限:MAI Code 2 尚未针对基础科学研究或超长周期的代理任务调优。
现在哪里能用
两款模型都已进入 GitHub Copilot。MAI Code 2 面向 Copilot Pro、Pro+、Max、Business 和 Enterprise。MAI Code 2 Flash 除这些套餐外,还面向 Free 和 Student。
微软列出 OpenRouter、Vercel、Hermes、Open Code 和 Kilo 将陆续支持。当有主机以公开调用 id 和价格提供模型后,AnyRouter 即可添加路由。
AnyRouter 上的状态
两个条目都标为即将推出。在有主机提供之前,请求任一 id 都会返回模型暂不可用的响应。可路由后,调用方式如下:
Once listed
anyr claude --model "microsoft/mai-code-2"import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"
const anyrouter = createAnyRouter()
const { text } = await generateText({
model: anyrouter("microsoft/mai-code-2-flash"),
prompt: "Explain this function in two sentences.",
})完整说法和脚注请阅读微软公告。
相关文章
- Run coding agents through one gatewayGuidesJuly 12, 2026 · Point Claude Code, Codex, OpenCode, Cursor, or any OpenAI-compatible tool at AnyRouter and get one key for every model, unified billing, per-request audit logs, and app attribution. Two environment variables, or one npx command with the anyr CLI launcher.
- Use AnyRouter with the Vercel AI SDKGuidesJuly 19, 2026 · @anyr/ai-sdk-provider wraps the AnyRouter gateway as a standard Vercel AI SDK provider. Call createAnyRouter(), pass a provider/model id, and generateText, streamText, and generateObject work unchanged, switching models is a one-string edit.
- What is AnyRouter? A plain-English guide to AI model routingGuidesAugust 5, 2026 · An AI model router lets you call many LLMs through one API. Here's what AnyRouter is, why it exists, and whether it's useful for your next project.