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.

  1. Install it in VS Code: Extensions view → search "Kilo Code" → Install.

  2. Start Ollama with a 32k context window (or set the context slider in the Ollama app's settings).

    OLLAMA_CONTEXT_LENGTH=32768 ollama serve
  3. In a second terminal, pull Kilo's recommended model (replace it with any tool-capable model you prefer).

    ollama pull qwen3-coder:30b
  4. In the extension, open Settings → Providers and add Ollama (no API key needed).

  5. Set "Context Window Size (num_ctx)" to at least 32k in the provider settings.

  6. 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/cli

CLI (macOS / Linux)

curl -fsSL https://kilo.ai/cli/install | bash

Check 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 ps

Which 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.

MachineModelQuantContextFitOllama
12 GB GPUQwen 3.5 9BQ4_K_M32,768Comfortable (7.4 GB of 12 GB)qwen3.5:9b
Qwen 3.6 35B-A3BQ4_K_M32,768With CPU offload (MoE) (22.7 GB of 12 GB)qwen3.6:35b-a3b
16 GB GPUQwen 3.5 9BQ4_K_M32,768Comfortable (7.4 GB of 16 GB)qwen3.5:9b
Qwen 3.6 35B-A3BQ4_K_M32,768With CPU offload (MoE) (22.7 GB of 16 GB)qwen3.6:35b-a3b
24 GB GPUQwen3.8 27BQ4_K_M32,768Comfortable (19.9 GB of 24 GB)qwen3.8:27b
Qwen 3.6 27BQ4_K_M32,768Comfortable (19.9 GB of 24 GB)qwen3.6:27b
Devstral Small 2 24BQ4_K_M32,768Comfortable (20.7 GB of 24 GB)devstral-small-2:24b
Qwen 3.6 35B-A3BQ4_K_M65,536Tight (23.3 GB of 24 GB)qwen3.6:35b-a3b
32 GB GPUQwen3.8 27BQ4_K_M32,768Comfortable (19.9 GB of 32 GB)qwen3.8:27b
Qwen 3.6 27BQ4_K_M32,768Comfortable (19.9 GB of 32 GB)qwen3.6:27b
Devstral Small 2 24BQ4_K_M32,768Comfortable (20.7 GB of 32 GB)devstral-small-2:24b
Qwen 3.6 35B-A3BQ4_K_M65,536Comfortable (23.3 GB of 32 GB)qwen3.6:35b-a3b
Qwen3-Coder 30B-A3B (MoE)Q4_K_M65,536Comfortable (25.7 GB of 32 GB)qwen3-coder:30b
Mac, 64 GBQwen 3.6 35B-A3BQ8_0131,072Comfortable (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.

Sources (5), checked 2026-10-20