I Set Up opencode + Ollama + Qwen3.6 on Windows
Introduction
I wanted to see whether I could run an AI coding assistant like Claude Code on a local LLM. This time I used opencode (formerly sst/opencode), the local LLM runner Ollama, and Qwen3.6, developed by Alibaba Cloud.
What is Qwen3.6?
The latest generation of Alibaba’s Qwen (Tongyi Qianwen) series.qwen3.6:latestis a 35B-parameter model that supports coding, tool calling, and a thinking mode. It’s a big model: about 24GB in size, with a 256K-token context window.
What You Need
- Windows 10/11
- Node.js (with npm available)
- winget (the standard Windows package manager)
- Plenty of free storage (the model download needs about 24GB)
Steps
1. Install opencode
opencode can be installed globally with npm.
npm i -g opencode-ai@latest
After installation, the opencode command is available.
2. Install Ollama
Install Ollama with winget. The package ID is Ollama.Ollama.
irm https://ollama.com/install.ps1 | iex
When installation finishes, Ollama starts as a background service and its API is available at http://localhost:11434.
3. Download and Run the Model
ollama run qwen3.6:latest
Note: qwen3.6:latest is about a 24GB download. Depending on your connection, it can take a while. After the download, the Ollama shell starts and you can chat with the model right away. Once you’ve confirmed it works, you can exit with Ctrl+D.
4. Create the opencode Settings File
Create a settings file at the following path.
%USERPROFILE%\.config\opencode\opencode.json
If the folder doesn’t exist, create it.
mkdir "%USERPROFILE%\.config\opencode"
The settings file looks like this.
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama (local)",
"options": {
"baseURL": "http://127.0.0.1:11434/v1"
},
"models": {
"qwen3.6:latest": {
"name": "Qwen 3.6 (local)"
}
}
}
},
"model": "ollama/qwen3.6:latest"
}
Key points:
@ai-sdk/openai-compatiblegoes innpmbecause Ollama provides an OpenAI-compatible API.baseURLis Ollama’s default endpoint.- Ollama doesn’t need API key authentication, so there’s no need to set up
auth.json.
5. Start opencode
Run the following in your project directory.
opencode
The TUI starts, and you can use it as a coding assistant backed by Qwen3.6.
How It Went in Practice
It worked. From the opencode interface, I could give Qwen3.6 instructions and have it generate code.
The problem is VRAM.
My machine has only 2GB of VRAM. qwen3.6:latest is a 35B-parameter, 24GB model, so only a tiny part of it fits on the GPU and the rest runs on the CPU from system RAM. As a result, it was noticeably slow and hard to use for real work.
It was reasonably smart, and the quality of the coding help itself wasn’t bad. With enough VRAM, it would be perfectly usable.
VRAM Guidelines
| Model | Size | VRAM for comfortable use |
|---|---|---|
| qwen3.6:latest (35B) | 24GB | 24GB or more (e.g. 2 × RTX 4090) |
| qwen3:8b | 5.2GB | 8GB or more (e.g. RTX 3070) |
| qwen3:4b | 2.6GB | 4GB or more |
If you’d like to start with a lighter model, I recommend qwen3:4b or qwen3:8b.
Summary
- opencode + Ollama + Qwen3.6 ran without problems on Windows
- The setup fits in a single settings file, which is simple and easy to follow
qwen3.6:latestis a large 35B, 24GB model, so without plenty of VRAM it won’t reach a practical speed- This time I went back to Claude Code because of the speed, but with a capable enough GPU it could be a strong option
If you’d like to try a fully offline, free AI coding setup on a local LLM, give it a go.
Related Posts
How I Made the Local LLM on My Ryzen AI PC 7 Times Faster (llama.cpp + Vulkan + Qwen)
I rebuilt the local LLM setup on my freshly wiped Ryzen AI 9 HX 370 machine with llama.cpp and Vulkan: about 7 times faster than CPU inference. Here's how picking the newest model backfired, and measurements showing the bigger file was faster.
I Looked into Using the Host's Local LLM from WSL, and Decided Not To
I wanted to use the local LLM on my Windows host as a reviewer for development in WSL. There are two routes, and either one can be made to work. But one meant giving up safety and the other meant giving up reliability, so I passed. This is a record of that decision.
Wiping the Local LLM Setup on My Ryzen AI PC Clean
To rebuild the local LLM setup I had piled up on my AMD Ryzen AI 9 HX 370 machine with the latest approach, I'm deleting it all first. I cover taking inventory of what's left, the removal steps, and what you shouldn't delete.