If you are trying to run local AI coding models on a laptop with limited memory (like 4GB of VRAM), your system will likely freeze, crash, or run painfully slow.
The ultimate solution is a cloud-hybrid approach: you use Visual Studio Code and an open-source extension framework to handle your files and interface locally, while offloading 100% of the AI brain processing to Google’s massive cloud servers. This setup uses 0% of your VRAM, keeps your PC cool, and is 100% free.
π οΈ The Core Setup Strategy
Instead of using third-party proxy tools or routing layers, this setup connects VS Code directly to Google AI Studio.
Because the extension handles the local workspace actions and Google handles the processing, your 4GB graphics card does zero heavy lifting.
Step 1: Open Your Local Workspace
Before configuring your AI engine, you must give VS Code a codebase folder to read and edit.
- Launch Visual Studio Code.
- Click the top menu and select File > Open Folderβ¦.
- Choose your active development project directory and load it.
Step 2: Install the AI Coding Assistant Extension
- Go to the Extensions tab on the left sidebar (or press
Ctrl + Shift + X). - Search for Continue and click Install.
- A dedicated AI assistant icon will appear on your far-left activity bar.
Step 3: Configure the Native Google Connection
- Click the new AI extension icon in your sidebar to open the chat panel.
- Click the Gear (Settings) Icon at the bottom right of the panel.
- This will open your global
config.jsonconfiguration file right in your text editor.
Delete everything inside that file and paste this exact working block:
{
"models": [
{
"title": "Gemini 2.5 Flash",
"provider": "gemini",
"model": "gemini-2.5-flash",
"apiKey": "YOUR_GOOGLE_AI_STUDIO_API_KEY_HERE"
}
],
"slashCommands": [
{
"name": "edit",
"description": "Edit selected code"
}
]
}
π‘ Security Warning: Do not publish your real API key publicly! When pasting this into your file, visit Google AI Studio, grab your free personal developer token, and swap it into the
"apiKey"string above.
Step 4: Save and Initialize
- Press
Ctrl + Sto save yourconfig.jsonmodifications. - Press
Ctrl + Shift + Pto open the VS Code Command Palette. - Type
Developer: Reload Windowand hit Enter to apply the network configurations.
π§ Visual Data Flow: How it Works Under the Hood
When you press Ctrl + I or interact with the agent, the data completely bypasses any local VRAM restrictions by using this exact pipeline:
β
βΌ (You press Ctrl + I or type in the sidebar chat)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. VS CODE EXTENSION READING CONFIG β
β β’ Reads your file on screen. β
β β’ Looks inside the active config block. β
β β’ Sees: "provider": "gemini" β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ (Prepares the internet request)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2. THE BACKGROUND NETWORK EXTENSION β
β β’ Bypasses Anthropic completely. β
β β’ Looks up Google's hardcoded URL endpoint in its source code. β
β β’ Attaches your key: "AQ.Ab8RN6KtkL..." β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ (Travels over the internet)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 3. GOOGLE CLOUD SERVERS (Outside your PC) β
β β’ Receives your code context and instructions. β
β β’ Validates your free token. β
β β’ Uses Google's massive server processors to compute the math. β
ββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ (Streams back down to your laptop)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 4. VS CODE OUTPUT RENDER β
β β’ Your local laptop GPU (4GB VRAM) does 0% of the heavy math. β
β β’ VS Code intercepts the incoming stream. β
β β’ The extension types the updated code directly into your file.β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
π How to Generate Code with the Agent
- Sidebar Chat: Use the chat box to explain logic, ask structural architecture questions, or write boilerplate blocks.
- Inline Auto-Editing: Highlight any segment of code inside a file, press
Ctrl + I, type a directive (e.g.,"Convert this to an arrow function"), and watch the extension modify your file live on screen!