Local Models With GitHub Copilot in the VS 2026 IDE

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 and oMLX 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 easily done with a work-around. Select Ollama as the provider in the model picker, change “http://” to “https://” with the LAN IP address and “:11434/v1” (or “:8000/v1” for oMLX) and save; for example, use “https://192.168.0.25:11434/v1”. That will NOT work to use the LLM (due to status 502) and the URL may be invalid, but saving the model picker creates a configuration file, which can be edited with any text editor.

The file is: C:\Users<WindowsLogin>\AppData\Local\Microsoft\VisualStudio\Copilot\BringYourOwnModel\ConfiguredBringYourOwnModel_v1.json
Open it, change “https://” back to “http://” with the editor and save it. That URL must be valid, but does not require SSL.

Close and reopen Visual Studio 2026 or SSMS 22.8 and the local model will be available. They both use the same configuration file.

This is not a problem for VS Code, but is 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.

Leave a Reply