How to set up a local alternative to GitHub Copilot in VS Code

Last update: July 26, 2026
  • Implementing a private AI environment using Ollama and the Continue extension.
  • Use of specialized models such as Qwen2.5-Coder to balance chat power and autocomplete speed.
  • Comparison between the ecosystem of cloud-based solutions and data sovereignty on local servers.

Local code assistant

These days, almost everyone who programs has tried some AI tool to help them out. Solutions like GitHub Copilot or Cursor are fantastic because they suggest entire blocks of code in the blink of an eye. However, there's an important detail we can't overlook : for these tools to work, your code usually travels to external servers, which can be a serious problem if you work on confidential projects or under strict privacy agreements.

The good news is that you no longer need to sell your soul to the devil or pay monthly subscriptions to have a powerful assistant. It's now entirely feasible to set up an autocomplete and private chat system using open-source templates, a decent graphics card, and a couple of free tools. In this regard, we'll see how to create a workflow that depends on nothing but your own hardware.

Microsoft Copilot artificial intelligence
Related articles:
Microsoft Copilot and artificial intelligence in Microsoft 365

Copilot versus the sovereignty of local models

If we compare GitHub's service with a custom solution, the main difference is control. While Copilot is extremely easy to install and ready to use, it means your data leaves your local network and you pay a fee if you're not a student or don't maintain open-source projects. On the other hand, a local stack offers you complete control over the model and total privacy of your code.

However, let's not kid ourselves: setting up your own server doesn't mean everything is free. You have to factor in the initial cost of the components and the power consumption of running a GPU. We're not aiming to replicate every single feature of the Microsoft Enterprise version, but rather to cover the day-to-day needs of a developer without the data ever leaving the company's or home's infrastructure.

Technical architecture and basic requirements

The process is quite linear and logical. Basically, VS Code takes the code context and sends it to the Continue extension . Continue acts as the bridge or intermediary that communicates with Ollama , the engine responsible for running specialized programming language models on your own machine.

Lenovo Copilot PC with artificial intelligence
Related articles:
Lenovo Copilot+ PC with artificial intelligence: complete guide to desktops and laptops

To ensure this runs smoothly, you'll need Visual Studio Code installed and a server running Ollama. A modern GPU with sufficient VRAM and 10-15 GB of free disk space are highly recommended. Best of all, there's no need to register on any platform or create any suspicious accounts.

Step-by-step guide: Installation and models

To achieve optimal performance, the trick is not to use a single model for everything. Ideally, you should separate chat tasks from autocomplete tasks. For deep analysis and chat, you can use qwen2.5-coder:7b or even 14b if you have more than 12 GB of VRAM. These models are slower but much smarter.

For autocomplete, which is what pops up as you type, we need something instantaneous. That's where it comes in. qwen2.5-coder:1.5bBeing lighter, it allows suggestions to flow without lag. Once downloaded using the command ollama pullWe can verify that they are operational by running a simple ollama list In the terminal.

If your Ollama server is on a different machine than where you program, remember that by default it only listens on localhost. To fix this, you need to edit the service configuration in Ubuntu using [method/method]. sudo systemctl edit ollama and add the environment variable OLLAMA_HOST=0.0.0.0:11434After restarting the service, check the connection from your PC using curl to ensure that the firewall is not blocking the connection.

browser with artificial intelligence disabled
Related articles:
Browsers with a button to disable artificial intelligence

Continue settings in Visual Studio Code

Continue is probably the most robust extension for connecting local models. Simply search for it in the extensions marketplace, install it, and restart the editor. Once the icon appears in the sidebar, go to Local Config and edit the config.yaml file to tell it exactly where your AI server is located.

In this file, we need to define the models. For the chat, we configure the 14B model and give it a specific systemMessage to keep it direct and avoid unnecessary explanations. For autocomplete, we assign the 1.5B model. By saving the changes, VS Code now knows which model to ask each time we write a line of code.

Testing the local assistant

To ensure everything is near perfect, it's best to use a script with common errors: uninitialized variables, outdated string concatenations, or typos. By selecting the code and pressing Ctrl+L , the larger model will analyze the selection and suggest improvements. The easiest way is to use the Apply button to replace the old code with the new one without having to copy and paste manually.

As for autocomplete, simply start typing a new function. After a brief moment, you'll see the text highlighted in gray, suggesting the rest of the logic. If the suggestion is correct, simply press the Tab key. If you notice it's not responding, a quick fix is ​​to restart the extension host from the developer command palette.

experimental AI application for Android
Related articles:
Experimental AI apps for Android: a complete guide

Other alternatives and the AI ​​ecosystem

If for some reason Ollama's approach doesn't appeal to you, there are other options on the market. Amazon has its CodeWhisperer , which is very powerful, especially for Java and Python. For those looking for something more community-based, Captain Stack is an interesting tool that uses Stack Overflow results instead of a pure neural network.

We also have tools like Kite , heavily focused on Jupyter Lab, or Google's AlphaCode , designed for competitive programming. There are even simpler options like Clara Copilot. However, none offer the privacy and customization that the Continue and Ollama combo provides, running on your own GPU.

Realistic expectations and performance

It's important not to get carried away with the hype and understand that a 7B or 14B model isn't going to dethrone the cloud giants in extremely complex architectural tasks. Furthermore, indexing massive repositories can consume a significant amount of RAM initially. Ultimately, the final quality will always depend on the power of your graphics card.

If you have a 12GB RTX 3060, the experience will be very good. But if you upgrade to a 24GB RTX 4090 , the performance becomes professional-level, with near-instantaneous chat responses. In any case, for everyday development, unit testing, and documentation, this solution is more than competitive.

Having analyzed all the options, it's clear we can move from subscription services to a more hands-on environment. Whether configuring Ollama with Qwen models for complete privacy or testing tools like CodeWhisperer, AI has become the programmer's right-hand. Ultimately, what matters is finding the balance between performance, cost, and data security to make the workflow as seamless as possible.