Skip to Content

Local Models With GitHub Copilot in VS 2026 and SSMS

July 22, 2026 by
| 1 Comment

*** Update 2026-11-15: The November 2026 Feature Update (18.12.0) makes it easy to add a custom LLM provider. It no longer requires https, although I gives a warning and has a checkbox that you understand the risks, which are minimal for a non-routable local network address.

For example, in GitHub Copilot select Manage Models > Add model provider > Provider Type: Custom Endpoint. Enter a configuration name, for example oMLX, the API Key, and the Endpoint URL. Once you add it all models available from the provider are added, can be selected from the chat drop-down, and they work.

It’s wonderful how easy it is now, after the tortured path required for the last several months!!!

*** Update 2026-11-24 The SSMS 22.12.1 update lets me use the custom models configured in VS 2026 as described above after I selected Tools > Options > Copilot > General > Copilot Chat > “Use new Copilot chat experience” and restarted SSMS.

*** Update 2026-09-10: This post is updated for the Sept. build of VS 2026 (18.10.0). ***

The model picker for GitHub Copilot in Visual Studio 2026 would not let me add Ollama running on another machine on my local network. It only allowed http://localhost:11434 or a URL that started with https. Even after configuring https:// to work with ollama and successfully testing that with curl in Powershell I got Status 502: (Bad Gateway) when I tried to use the model in Copilot chat.

I needed it to permit me to save and use local IP addresses or “.local” Active Directory DNS-resolved addresses. On my network Ollama (port 11434) and oMLX (port 8000) run on dedicated machines. I run Visual Studio and SSMS on other computers and need to connect to locally hosted models over the LAN.

This can be done with a work-around. Visual Studio validates to see if Ollama is installed on your development machine, which I don’t want. Here is a sample configuration you can edit:

[
{
“Name”: “ollama”,
“IsApiKeyAvailable”: false,
“Models”: [
{
“ProviderName”: “ollama”,
“IsCustom”: true,
“IsSelected”: true,
“CustomURL”: “http://[your ip address]:8000/v1”,
“Id”: “qwen3.6:35b”,
“DisplayName”: “qwen3.6:35b (Qwen3.6 35B)”,
“IsToolCallingEnabled”: true,
“IsVisionEnabled”: false,
“MaxInputTokens”: 262144,
“MaxOutputTokens”: 8192
},
{
“ProviderName”: “ollama”,
“IsCustom”: true,
“IsSelected”: true,
“CustomURL”: “http://[your ip address]:8000/v1”,
“Id”: “qwen3.8:27b”,
“DisplayName”: “qwen3.8:27b (Qwen3.8 27B)”,
“IsToolCallingEnabled”: true,
“IsVisionEnabled”: false,
“MaxInputTokens”: 262144,
“MaxOutputTokens”: 8192
}
],
“Endpoint”: 10,
“IsEnabled”: true
}
]

Save the file as: C:\Users\[YourWindowsLogin]\AppData\Local\Microsoft\VisualStudio\Copilot\BringYourOwnModel\ConfiguredBringYourOwnModel_v2.json

Close and reopen Visual Studio 2026 or SSMS 22.10.0 and the local model will be available. They both use the same configuration file.
In Visual Studio you MUST select “Agent (Preview)” or the local models will be disabled. You may have to enable “Allow custom agents to be used as sub-agents (Preview)” in the Copilot Chat settings in SSMS.

This is not a problem for VS Code, but was necessary as of mid-July, 2026, in order to use locally hosted models on a different computer on the LAN in GitHub Copilot in the VS 2026 IDE or SSMS.

There’s an entry in the Microsoft Developer Community about this here.

# AI
July 22, 2026
Tags
AI
Archive
Sign in to leave a comment