Given the current climate on how much its costing to use Cloud Based LLM’s I thought I would give using a local LLM a try with VS Code
I decided to use Ollama with the model qwen3.5:27b. Ollama allows you to run local models freely available online. You run these local models on your own hardware. Ollama also exposes an API which you can then use on your local network and in this case a laptop on my network running VSCode with the GitHub CoPilot plugin connecting to a server machine I had setup with Ollama.
Setting up Ollama
Setting up Ollama is pretty simple. Download it from the following link and follow the installation instructions.
First thing to do when Ollama launches is to hit the settings button

In settings, ensure you select expose Ollama to the network. This is vital for the GitHub Co-Pilot extension to be able to connect to it.
Also increase your Context length. The higher you can make this the better it is, however there is a cost and that is VRAM followed by normal RAM. I have Ollama setup on a larger machine with an RTX 3080 with 10GIG of VRAM. Its pretty slow but it gets there eventually

After you have done the above you can then download your model. In my case as I mentioned previously it was qwen3.5:27b. I struggled with smaller models working properly in Agent mode in GitHub CoPilot Chat which seemed to confuse models and they ended up pushing out random JSON into the chat window.
You can download a model from the following screen. If its not there type in the name and then hit the download button next to it to download the model.

Now that you have your model you can now proceed to hooking it up to VS Code
Connecting GitHub CoPilot Chat to Ollama
Below you can see I am using a local model with GitHub CoPilot Chat

You can choose to collect to Ollama from VS Code like this from the GitHub Co-pilot chat plugin.

Click on the current model and then click on the settings cog.

In the dialogue that appears you can then click on Add Models and then on Ollama. In the dialogue box that appears enter a name for your Ollama connection

You will then see the following

If like me you have Ollama running on a different machine (You may do this because Ollama will eat through RAM when it starts running out of VRAM). Then this will be the machine name you have Ollama on instead of localhost so for example http://myollamaserver:11434 .If Ollama is running on the same machine as VS Code then keep this as localhost.
You should now see all the models running on your Ollama Server

You can close this window, in the chat you can now select one of your local models which will be under Other Models

Talking to the model and asking it who it is was slow. This is because of the amount of VRAM I have on my Ollama machine. The following took nearly 2 minutes.

Using 14b was faster

In my next article I was demo how I used qwen3.5:27b. to vibe code a GCSE science quiz app. It was slow, but I was able to leave it to do the job.