AI VS Code Setup
How to configure VS Code extensions to use AI agents for development
This guide walks you through setting up an AI coding assistant in VS Code. You can choose between cloud-based providers or run models locally.
Extension Setup
Install an AI Extension
Several AI coding assistant extensions are available for VS Code, including Roo Code, Cline, and Continue. This guide focuses on Roo Code.
Install Roo Code from the VS Code Marketplace or search for "Roo Code" in the Extensions panel (Ctrl+Shift+X / Cmd+Shift+X).
Choose a Provider and Get an API Key
You don't need to create a Roo Code account unless you plan to use Roo Code itself as a provider.
This guide uses OpenRouter, which provides access to many models through a single API.
- Go to https://openrouter.ai/
- Create an account
- Click Get API Key
- Generate a new key and copy it
- In VS Code, open the Roo Code extension settings and paste the key into the OpenRouter API Key field
Select a Model
From the model dropdown in Roo Code settings, choose a model that fits your needs. To find free models, type :free in the search field. This filters the list to show only models available at no cost.
Local Provider Setup
If you prefer to run models locally instead of relying on a cloud provider, you can use Ollama.
Install Ollama
Download and install Ollama from https://ollama.com/download, or follow the installation instructions in the official repository.
Download a Model
Browse available models at https://ollama.com/search and pick one suitable for your needs. Install it by running the command shown on the model page:
ollama run <model-name>Replace <model-name> with the actual model identifier, for example:
ollama run gemma4:e4bConfigure Roo Code for Ollama
- Open the Roo Code extension settings in VS Code
- Add a new configuration profile
- Select Ollama from the provider list
- Choose the model you installed in the previous step from the model dropdown
Your AI assistant is now ready to use with the local Ollama instance.