Menu

1 / 3

Running Local AI (Self-hosted) Coding Assistants in VS Code with Ollama and GitHub Copilot

DEV Community·Zepher Ashe·6 months ago
#Ygoqt5uB
#architecture#verify#official#ollama#enter
Reading 0:00
15s threshold

Architecture

Step 0 - Prerequisites

Step 1 - Install Ollama

Step 2 - Pull a Model

Step 3 - Test the Model

Step 4 - Confirm API Endpoint

Step 5 - Configure VS Code

Step 6 - Select Your Model

Step 7 - Remote Access (Optional)

Step 8 - Configure Nginx Reverse Proxy (Optional)

Step 9 - Testing

Overview

GitHub Copilot now supports Bring Your Own Key (BYOK), allowing developers to connect local or self-hosted AI models directly into VS Code.

This means you can run coding assistants locally using tools like Ollama without sending prompts to external providers.

Architecture

VS Code ↓ GitHub Copilot Chat (BYOK) ↓ Ollama API ↓ Local LLM

Enter fullscreen mode

Exit fullscreen mode

Example:

VS Code → localhost:11434 → Qwen2.5-Coder

Enter fullscreen mode

Exit fullscreen mode

Step 0 - Prerequisites

Ollama v0.18.3+

VS Code 1.113+

GitHub Copilot Chat extension 0.41.0+

Step 1 - Install Ollama

Linux

Official:

sudo curl -fsSL https://ollama.com/install.sh | sh

Enter fullscreen mode

Exit fullscreen…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.