Kilo Code with a local model: setup for Ollama or LM Studio
Kilo Code is an open-source (MIT) coding agent for VS Code, JetBrains and the terminal; the Kilo CLI is a fork of OpenCode. It has Ollama and LM Studio providers configured in the settings UI or kilo.json, and its docs suggest a 24 GB+ GPU or a 32 GB+ Mac for local models.
At a glance
- Type
- vscode-extension, jetbrains, cli
- Licence
- MIT
- Latest release
- 7.8.14 (extension); 7.8.12 (CLI) (2026-10-16)
- Status
- Maintained
- Local backends
- ollama, lmstudio
- Needs native tool calling
- Yes
- MCP support
- Yes
- Recommended minimum context
- 32,000 tokens
- Start-up prompt
- Not measured
- GitHub stars
- 27.6k (2026-10-19)
How to set it up with a local model
Pick your backend. Each command has its own Copy button. Where a step uses an example model, swap in the one you run; the table below lists the ones that fit your machine.
Install it in VS Code: Extensions view → search "Kilo Code" → Install.
Start Ollama with a 32k context window (or set the context slider in the Ollama app's settings).
OLLAMA_CONTEXT_LENGTH=32768 ollama serveIn a second terminal, pull Kilo's recommended model (replace it with any tool-capable model you prefer).
ollama pull qwen3-coder:30bIn the extension, open Settings → Providers and add Ollama (no API key needed).
Set "Context Window Size (num_ctx)" to at least 32k in the provider settings.
For the CLI (or a model missing from the picker), register the model in kilo.json with tool calling and its context limit.
~/.config/kilo/kilo.json{ "model": "ollama/qwen3-coder:30b", "provider": { "ollama": { "models": { "qwen3-coder:30b": { "name": "Qwen3-Coder 30B", "tool_call": true, "limit": { "context": 32768, "output": 8192 } } } } } }
Other ways to install
JetBrains: Settings → Plugins → search "Kilo Code" → Install
CLI (npm)
npm install -g @kilocode/cliCLI (macOS / Linux)
curl -fsSL https://kilo.ai/cli/install | bashCheck that it works
Select the ollama/ or lmstudio/ model in Kilo and ask it to list the files in the workspace. If you see an ollama-cloud/... model id, you are on the hosted Kilo Gateway provider rather than your local server.
ollama psWhich local models fit, by machine
Checked by this site's engine at the context Kilo Code needs, with 32 GB of system RAM for MoE offload. A Mac counts three quarters of unified memory as usable.
| Machine | Model | Quant | Context | Fit | Ollama |
|---|---|---|---|---|---|
| 12 GB GPU | Qwen 3.5 9B | Q4_K_M | 32,768 | Comfortable (7.4 GB of 12 GB) | qwen3.5:9b |
| Qwen 3.6 35B-A3B | Q4_K_M | 32,768 | With CPU offload (MoE) (22.7 GB of 12 GB) | qwen3.6:35b-a3b | |
| 16 GB GPU | Qwen 3.5 9B | Q4_K_M | 32,768 | Comfortable (7.4 GB of 16 GB) | qwen3.5:9b |
| Qwen 3.6 35B-A3B | Q4_K_M | 32,768 | With CPU offload (MoE) (22.7 GB of 16 GB) | qwen3.6:35b-a3b | |
| 24 GB GPU | Qwen3.8 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 24 GB) | qwen3.8:27b |
| Qwen 3.6 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 24 GB) | qwen3.6:27b | |
| Devstral Small 2 24B | Q4_K_M | 32,768 | Comfortable (20.7 GB of 24 GB) | devstral-small-2:24b | |
| Qwen 3.6 35B-A3B | Q4_K_M | 65,536 | Tight (23.3 GB of 24 GB) | qwen3.6:35b-a3b | |
| 32 GB GPU | Qwen3.8 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 32 GB) | qwen3.8:27b |
| Qwen 3.6 27B | Q4_K_M | 32,768 | Comfortable (19.9 GB of 32 GB) | qwen3.6:27b | |
| Devstral Small 2 24B | Q4_K_M | 32,768 | Comfortable (20.7 GB of 32 GB) | devstral-small-2:24b | |
| Qwen 3.6 35B-A3B | Q4_K_M | 65,536 | Comfortable (23.3 GB of 32 GB) | qwen3.6:35b-a3b | |
| Qwen3-Coder 30B-A3B (MoE) | Q4_K_M | 65,536 | Comfortable (25.7 GB of 32 GB) | qwen3-coder:30b | |
| Mac, 64 GB | Qwen 3.6 35B-A3B | Q8_0 | 131,072 | Comfortable (40.7 GB of 48 GB) | — |
Your exact machine: filter the matrix or check any model in the analyzer.
Common problems with local models
- Kilo's docs say you need at least 32k context for decent results; Ollama truncates prompts to a short window by default.
- Kilo's docs warn qwen3-coder:30b sometimes fails to call tools correctly; try rewording the prompt or the Enhance Prompt button, or devstral:24b as an alternative.
- Keeping conversations short and disabling MCP tools can speed up local models.
- Requests time out after 10 minutes by default; raise API Request Timeout in the extension settings for slow local models.
Other coding agents
How they rank for local models: the best agent harness for local LLMs.
- OpenCode
- Qwen Code
- Codex CLI
- Cline
- Aider
- Pi coding agent
- Claude Code
- Crush
- Goose
- OpenHands
- Zed agent
- GitHub Copilot BYOK
- Continue (discontinued)
- Roo Code (discontinued)
- Void (discontinued)