Visual Studio 2026 BYOK now works with a new Agent preview built on the GitHub Copilot SDK harness. Developers can connect Microsoft Foundry, OpenAI, Anthropic and Ollama models, but the September update retires the previous BYOK path and warns that model capabilities are not interchangeable.
Microsoft released Visual Studio 2026 version 18.10.0 on September 8, 2026. Bring Your Own Key is a preview enabled by default across Community, Professional and Enterprise. It can be used whether or not the developer is signed in to GitHub.
Visual Studio 2026 BYOK changes the agent harness
The new Agent preview uses the same GitHub Copilot SDK-powered harness that underpins the GitHub Copilot CLI. Microsoft describes it as less chatty and more likely to finish tasks with fewer corrective turns. The useful technical change is that BYOK now enters Agent Mode through this new harness.
The earlier BYOK experience in the previous Ask and Agent modes is no longer supported. This is not a drop-in UI refresh. Teams testing a model deployment against the older flow should treat 18.10 as a migration with new orchestration behavior.
The supported provider list is broad but asymmetric
| Provider path | Published support | Deployment question |
|---|---|---|
| Microsoft Foundry | Provider connection | Which approved deployment and region? |
| OpenAI | Provider key and custom endpoint support | Direct API or governed compatible endpoint? |
| Anthropic | Provider key | Which models support the required agent tools? |
| Ollama | Local provider and custom endpoint support | Does the selected local model handle tool calls reliably? |
Microsoft explicitly says not every model supports every Agent Mode capability. Visual Studio should mark an unsupported feature rather than fail silently, but that does not make models equivalent. Tool calling, context length, image input, structured output and latency can change the result of the same repository task.
The breaking changes require two migration steps
- Move BYOK testing from the former Ask or Agent experience into the new Agent preview.
- Re-add Ollama models that were configured in Visual Studio 18.10 Insiders 1 after installing Insiders 2 or the corresponding updated build.
A migration checklist should also record the previous endpoint, model ID, prompt files, tool configuration and expected output. Without that snapshot, a team cannot tell whether changed behavior came from the model, the provider, the harness or the extension update.
Custom agents move team instructions into the repository
Visual Studio can define specialized agents with .agent.md files. Repository agents live under .github/agents/, while user-level agents are stored in the user’s GitHub agent directory by default. An agent can select tools, a model and MCP connections to external knowledge.
That creates a useful separation. Repository-scoped instructions can be reviewed with the code, while personal agents can remain outside the project. Teams should keep model-independent workflow rules in the agent file and isolate provider-specific exceptions so switching a BYOK model does not silently rewrite the process.
Enterprise MCP allowlists define the external boundary
The September release says Visual Studio respects GitHub organization allowlist policies for MCP servers. When an allowlist exists, an unauthorized server cannot be connected. That is an important control because BYOK governs the model path, while MCP governs which external services can receive context or perform actions.
- Approve model endpoints separately from MCP servers.
- Document which repository content can leave the workstation.
- Prefer scoped, read-only MCP credentials for discovery tasks.
- Log the chosen model, endpoint and tool set with every evaluation run.
The right comparison is task completion, not one prompt
A fair BYOK evaluation should use repository tasks with known acceptance tests. Ask each provider model to fix the same defect, add the same small feature, explain the same dependency and perform the same targeted review. Record completion, tests passed, unauthorized edits, tool errors, latency, token use and cost.
| Metric | Why it matters |
|---|---|
| First-pass test success | Measures whether the agent reaches a valid result without correction |
| Unrequested file changes | Detects scope drift |
| Tool-call recovery | Shows whether the model handles failed commands and partial output |
| Median and tail latency | Separates normal responsiveness from slow outliers |
| Total provider cost | Prices the entire task, not one completion |
Local Ollama support changes privacy, not every data path
A local Ollama model can reduce the code sent to a hosted inference provider. It does not automatically make the full agent local. Cloud agents, remote MCP servers, extension telemetry, package feeds and source-control services may still exchange data. A privacy review must follow the complete tool graph.
Microsoft also added the ability to start a cloud Copilot coding-agent session from Visual Studio. That workflow can open an issue and prepare a pull request on remote infrastructure. It should be evaluated as a distinct execution environment from local BYOK Agent Mode.
A safe migration sequence
- Upgrade a non-production workstation and enable the new Agent preview.
- Add one approved provider and pin a model or deployment.
- Restore custom agents and MCP servers from reviewed configuration.
- Run a fixed repository evaluation before comparing additional models.
- Check unsupported capabilities and failure messages for every provider.
- Roll out with endpoint, cost and tool-use monitoring.
Our VS Code Agent Merge guide covers another GitHub-assisted repository workflow. The GitHub Copilot model-routing analysis explains why provider and model selection should be measured at the full-task level.
The practical verdict
Visual Studio 2026 BYOK gives developers a useful choice of hosted and local model paths inside the new Agent preview. The real work is governance and migration: the old BYOK path is retired, capabilities differ, MCP has a separate trust boundary and a local model does not guarantee a fully local workflow.
Primary source
Checked September 15, 2026. Availability, providers and breaking changes come from Microsoft. Evaluation, privacy and rollout recommendations are MustHave.ai analysis.