tk3.biz
Back to Blog

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:latest is 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-compatible goes in npm because Ollama provides an OpenAI-compatible API.
  • baseURL is 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

ModelSizeVRAM for comfortable use
qwen3.6:latest (35B)24GB24GB or more (e.g. 2 × RTX 4090)
qwen3:8b5.2GB8GB or more (e.g. RTX 3070)
qwen3:4b2.6GB4GB 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:latest is 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