Boost VS Code with Ollama and Continue: Local AI Coding

Updated on Sep 03,2025

Table of Contents

In today's fast-paced development landscape, having access to intelligent coding assistance is no longer a luxury but a necessity. This blog post will explore how to leverage local AI coding assistance within VS Code using Ollama and Continue. By harnessing the power of free, open-source models, you can achieve results that rival or even surpass those obtained from Copilot subscriptions, all while maintaining complete control over your codebase and data.

Key Points

Discover how to install and configure Ollama for local AI model management.

Learn to integrate the Continue extension with VS Code for seamless AI coding assistance.

Explore the EvalPlus Leaderboard and identify high-performing, open-source AI models.

Compare free AI coding tools with subscription-based services like GitHub Copilot.

Understand how to customize Continue with custom commands for tailored coding workflows.

Getting Started with Local AI Coding

Introducing Ollama: Your Local AI Model Manager

To begin your journey into the world of local AI coding, the first step is to install Ollama. This powerful tool acts as a local model manager, allowing you to download and run various open-source AI models directly on your machine. Ollama supports macOS, Linux, and Windows (as a preview), making it accessible to a wide range of developers.

Downloading and installing Ollama is straightforward: visit the Ollama website and download the appropriate version for your operating system. For Windows users, note that the Windows version is currently in preview, so you may need to restart your machine after installation for it to be recognized at the command line. To verify the installation, open a terminal and type ollama --help. This should display a list of available commands, confirming that Ollama is correctly set up.

Once Ollama is installed, you can start exploring different AI models. Navigate to the Ollama website, where you can search for various models. Consider factors like model size and performance when selecting a model, as these can impact the speed and accuracy of your coding assistance. For example, CodeQwen is a powerful model at just 4.2 GB, providing a good balance between size and performance. Once you've found a model that meets your needs, you can download it using the command line.

Remember that while larger models may offer better accuracy, they also require more computational resources. Smaller models, on the other hand, are more resource-efficient and can still provide valuable coding assistance. Choose the model that best fits your hardware capabilities and project requirements. To run an AI, type in “ollama run codegwen”

Continue: Seamless AI Integration into VS Code

Now it's time to integrate the Continue extension into VS Code. This extension acts as an open-source AI autocompletion tool, bridging the gap between your code editor and the local AI models managed by Ollama. Continue supports VS Code and JetBrains, offering a seamless AI coding experience within your preferred IDE.

Installing Continue is as simple as searching for it in the VS Code extensions marketplace and clicking install. Once installed, you'll see a splash screen with a few recommendations.

To configure Continue to use Ollama and your preferred AI model, you need to modify the config.json file. The Continue configuration is under the setting tab. After selecting Continue, you need to modify the configuration to have the CodeQwen. You might be able to choose CodeQwen as an Auto detect.

With Ollama and Continue configured, you're now ready to experience the power of local AI coding assistance in VS Code. You can now generate code, complete code snippets, and ask questions directly within your IDE, all powered by the local AI models running on your machine.

Comparing AI Models: the EvalPlus Leaderboard

To make informed decisions about which AI models to use, it's essential to have access to reliable performance benchmarks. That's where the EvalPlus Leaderboard comes in. This valuable resource compares the performance of various open-source and paid AI models on coding tasks, providing insights into their strengths and weaknesses.

By consulting the EvalPlus Leaderboard, you can identify models that excel in specific coding areas, such as code generation or bug detection. This allows you to choose models that are best suited for your particular project needs. Remember that the leaderboard is constantly updated as new models are released, so it's worth checking back periodically for the latest information.

It's worth noting that some open-source models can achieve performance levels that are comparable to or even better than those of paid models like GitHub Copilot. This opens up opportunities for developers to access high-quality coding assistance without incurring subscription fees. For example, CodeQwen is a very close in ratings to other AI. It is also only 4.2 GB.

Customizing and Enhancing Your AI Coding Workflow

Custom Commands for Tailored Coding Assistance

The Continue extension offers a powerful feature that allows you to define custom commands, tailoring the AI's assistance to your specific needs. By creating custom commands, you can automate repetitive tasks, enforce coding standards, and generate code snippets that are specific to your project's requirements.

To define a custom command, you need to modify the config.json file and add a new entry to the customCommands section. Each custom command consists of a name, a prompt, and a description. The name is what you’ll type in the chat, The Prompt defines the instructions you want the AI to execute, and the description provides a brief explanation of what the command does. To implement this, add what you want the function to do in the Description.

Step-by-Step: Setting Up Your Local AI Coding Environment

Step 1: Installing Ollama

First, head over to ollama.com

and download the latest version for your operating system (macOS, Linux, or Windows preview). Once the download is complete, follow the installation instructions provided on the website.

Step 2: Verifying Ollama Installation

After installation, verify that Ollama is working correctly by opening your terminal or command prompt and typing ollama --help. This command should display a list of available Ollama commands, confirming that the installation was successful. If the command is not recognized, try restarting your computer, especially on Windows, as this may be necessary for the system to recognize the new installation.

Step 3: Installing the Continue Extension in VS Code

Open Visual Studio Code. Go to the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of the window, or by pressing Ctrl+Shift+X (Cmd+Shift+X on macOS). In the Extensions view, search for Continue. Find the Continue extension and click the Install button to add it to your VS Code installation.

Step 4: Configuring Continue with Ollama

Locate and open the Continue configuration file config.json. Open the command palette with Ctrl+Shift+P (Cmd+Shift+P on macOS) and type Continue: Open Config. Modify it, to have CodeQwen for both the title and Model.

Comparing Costs: Free vs. Paid AI Coding Assistants

GitHub Copilot Pricing

GitHub Copilot offers different pricing tiers depending on individual or business use. As of 2025, these are the typical pricing structures:

  • Copilot Individual: $10 USD per month or $100 USD per year

  • Copilot Business: $19 USD per user/month

  • Copilot Enterprise: $39 USD per user/month

Continue and Open Source Models: Free Alternative

Continue, paired with open-source models like CodeQwen, offers a completely free alternative to GitHub Copilot. There are no subscription fees, and you have full control over the AI models and data used in your coding environment. This makes it a highly cost-effective solution for both individual developers and organizations.

Advantages and Disadvantages

👍 Pros

Free and Open Source: Eliminates subscription costs and fosters community-driven development.

Data Privacy: Keeps your codebase and data within your local environment, reducing privacy concerns.

Customization: Allows fine-grained control over AI models and coding workflows.

Offline Functionality: Enables coding assistance even without an internet connection.

👎 Cons

Setup Complexity: Requires initial setup and configuration, which may be more complex than subscription-based services.

Hardware Requirements: Demands sufficient computational resources (CPU and memory) to run AI models locally.

Model Management: Requires manually updating and managing AI models.

Community Support: Relies on community-driven support, which may not be as comprehensive as dedicated support for paid services.

Key Features

Core Features: Ollama and Continue

  • Local Model Management: Provides tools to download, manage, and run AI models locally.
  • Seamless Integration: integrates effortlessly with VS Code.
  • Custom Commands: Offers custom commands to tailor coding assistance, automate repetitive tasks, and enforce coding standards.
  • Cost-Effective: Open source models eliminate the high subscription fees of alternatives. It is a perfect solution for those on a budget

Unlocking Your Potential: Use Cases for Local AI Coding

Use Cases: Ollama and Continue

  • Code Generation: Quickly generate code snippets or entire functions based on natural language instructions, accelerating development time.
  • Code Completion: Receive intelligent suggestions and autocompletions as you type, minimizing errors and improving code quality.
  • Refactoring Assistance: Streamline the Code Refactoring process by identifying areas for improvement and suggesting optimal code structures.
  • Bug Detection: Detect potential bugs and vulnerabilities in your code early, minimizing the risk of costly errors in production.
  • Documentation Generation: Automatically generate code documentation, saving time and ensuring your codebase is well-documented.
  • Code Explanation: Get step-by-step explanations of existing code, aiding in understanding and maintaining complex codebases.

Frequently Asked Questions

Is Ollama free to use?
Yes, Ollama itself is free and open-source. However, some of the AI models you can run with Ollama may have their own licensing terms or costs. It's important to review the licensing terms of any AI model you choose to use.
What are the system requirements for running Ollama?
Ollama's system requirements depend on the size and complexity of the AI models you want to run. Generally, a machine with a decent CPU and at least 8GB of RAM should be sufficient for smaller models. For larger models, you may need 16GB or more of RAM and a dedicated GPU for optimal performance.
Can I use Ollama and Continue for commercial projects?
Yes, you can use Ollama and Continue for commercial projects, subject to the licensing terms of the AI models you use. Be sure to review the licensing terms carefully to ensure compliance.
Can I use Ollama and Continue offline?
Yes, one of the key benefits of Ollama and Continue is that they allow you to code with AI assistance even without an internet connection. Once you've downloaded the AI models you need, you can run them locally and use Continue to interact with them offline.

Related Questions

What are the advantages of running AI models locally compared to using cloud-based services?
Running AI models locally offers several advantages over cloud-based services, including: Data Privacy: Your code and data remain within your local environment, reducing privacy concerns and compliance requirements. Offline Functionality: You can continue to use AI assistance even without an internet connection. Customization: You have full control over the AI models and coding workflows, allowing you to tailor them to your specific needs. Cost Savings: Eliminates subscription costs associated with cloud-based AI services.
What kind of tasks is Continue best for?
Continue is designed for coding tasks and general development-related requests. Because the AI model is directly connected with your code environment, the tool can provide intelligent code and perform edits directly within your project.

Most people like