Using AI Models In VS Code

AI is all the rage, if I dont learn how to do prompt engineering, somebody who can will replace me in the future.

This post covers an alternative way to get powerful AI features in VS Code and is based on tutorial from Code With Nathan, thanks for the great content Nathan!

Setup - Tools & Extensions

  • Download and install LLM Manager Ollama
  • Install models with these commands
1
2
ollama pull deepseek-r1:7b      ~ chat mode
ollama pull qwen2.5-coder:1.5b ~ code completion

Agent Mode (Cline extension)

These steps will provide Agent mode in VS Code:

  • Install extension Cline
  • Sign up for an account using Google or Github, this will provide some free Cline credits but we will instead use Openrouter
  • Create a https://openrouter.ai/ account
  • Create an API key (top right), I called mine Cline VS Code, copy the key
  • Back in VS Code -> Cline -> Settings -> Provider -> OpenRouter -> Model type deepseek/deepseek-r1:free

Chat & Code Completion (Continue extension)

These steps will provide Chat & Code Completion modes in VS Code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
name: Local Assistant
version: 1.0.0
schema: v1
models:
- name: deepseek r1
provider: ollama
model: deepseek-r1:7b
- name: qwen 2.5 coder:1.5b
provider: ollama
model: qwen-2.5-coder:1.5b
roles:
- autocomplete
context:
- provider: code
- provider: docs
- provider: diff
- provider: terminal
- provider: problems
- provider: folder
- provider: codebase