Chinese
Uncategorized

MAI Code 2 Arrives in GitHub Copilot: How I Would Route Coding Work

GitHub Copilot added MAI Code 2 and Flash. The practical change is task routing, not another model picker.

Jacky Wang 4 min read 50 views

I hit the familiar coding-agent problem this week: a repository task looked small in the issue tracker, but the useful work ranged from renaming a log field to tracing a bug across workers, database code, and deployment files. Using one model for every step is convenient, but it is also a poor operating policy. GitHub’s November 17 Copilot release of MAI Code 2 and MAI Code 2 Flash makes task routing worth discussing.

GitHub describes MAI Code 2 as a general-purpose coding model for multi-file implementation, deep debugging, refactoring, and repository-level reasoning. MAI Code 2 Flash is positioned for code explanations, targeted edits, routine fixes, and rapid iteration. Both are available through several Copilot surfaces, including VS Code, Visual Studio, Copilot CLI, the cloud agent, github.com, JetBrains, Xcode, and Eclipse. The useful fact is not that there are two more names in a picker. The useful fact is that the product now gives teams a clearer language for separating cheap, fast work from expensive reasoning work. See the official changelog.

I would route work by risk

For a SaaS repository, I would send the low-risk queue to Flash: explain a function, add a test around existing behavior, rename a field, fix a lint warning, or make a narrow validation change. These tasks benefit from short feedback loops. The model does not need to understand the whole system, and a small diff is easier for a developer to inspect.

I would reserve MAI Code 2 for repository-wide changes, concurrency bugs, schema migrations, or refactors where the correct answer depends on several packages and configuration files. This is close to the split in GitHub’s own descriptions, and it is more actionable than saying one model is simply “better.” My rough workflow would be:

small edit -> MAI Code 2 Flash -> focused test -> review
cross-module change -> MAI Code 2 -> wider tests -> human review

The final step matters. A coding agent can produce a coherent patch while still misunderstanding a business rule, a production permission, or the way a migration is deployed. In my Kubernetes projects, a useful patch is not the same thing as permission to touch a cluster. I would keep repository writing, test execution, and production credentials as separate boundaries.

Model policy is part of engineering policy

GitHub says the models use usage-based billing and are available according to subscription tier. For a team, that creates a small policy problem. Who may enable a model? Which task types default to Flash? Which directories always require a human review? Copilot Business and Enterprise administrators can manage access through model policy, and GitHub notes that new models may be enabled by default unless an administrator changes the setting. That is enough reason to write the rule down instead of relying on everyone’s memory. The supported-models documentation is the place I would check before changing a team default.

The rule does not have to be complicated:

agent:
  quick_tasks: [explain, test, rename, lint-fix]
  deep_tasks: [refactor, concurrency, schema-change]
  require_review_for: [infra, auth, billing, migrations]

That is an internal convention, not a Copilot configuration format. Its value is auditability. When an agent makes a bad change, the team can ask whether the problem was model capability, missing context, or excessive permission.

What I would test first

I would not make MAI Code 2 the universal default on day one. I would take a service with a useful test suite, select a small set of real maintenance tasks, and record diff size, test results, rework, and review time. If Flash handles most mechanical work reliably, the larger model can stay available for tasks that actually need repository-level reasoning. The Copilot CLI guide is a practical starting point for a terminal-based trial.

My prediction is that model choice will become a routing rule inside development systems. The teams that benefit most will not be the ones that let an agent run everywhere. They will be the ones that make escalation, review, and stopping conditions boringly explicit.

I would also make context preparation part of the task. Flash should receive the relevant files, the interface contract, and a failing test, not an entire repository by default. A deeper task needs explicit exclusions, migration order, and acceptance commands. More context is not automatically better; vague boundaries encourage an agent to treat cleanup as part of the request.

Before merging, I would inspect four things: changed files, new dependencies, what the tests actually cover, and whether configuration or secret paths were touched. For billing, identity, or cluster manifests, I would write the acceptance conditions before starting the agent. That adds a little friction, but it keeps model freedom inside a boundary the team can explain.

发表评论