AI Infrastructure

Cline Local LLM Setup: Ollama, LM Studio and llama.cpp, Plus Roo Code and Kilo Code (2026)

How to run Cline on a model served from your own machine: the Ollama, LM Studio and OpenAI Compatible provider settings in Cline 4.1.26, the context window each one needs, which local models cope with Cline's tool calls, and what to do now that Roo Code has shut down and Kilo Code has moved to a kilo.json config. Settings read from each project's docs, changelog and source on 14 November 2026.

To run Cline on a local LLM, start Ollama or LM Studio, open Cline's settings and choose the matching API provider; for llama.cpp or vLLM, choose OpenAI Compatible and enter the server's /v1 address. Give the model at least 32K tokens of context, 64K if memory allows, and pick one trained for tool calling. Roo Code shut down in May 2026; Kilo Code and Zoo Code connect similarly.

Cline is an open-source coding agent that lives in the editor: it reads files, proposes edits and runs commands, asking for approval as it goes. What has changed is the family around it. Version 4 moved Cline onto a shared SDK, Roo Code closed, and Kilo Code was rebuilt on a different core, so most set-up advice written before mid-2026 no longer matches the settings you see.

Everything below was read on 14 November 2026 from the projects’ own documentation, changelogs and source code, against Cline 4.1.26, Zoo Code 3.96.0 and Kilo Code 7.8.27. Model choice gets one section here and a full treatment in our comparison of open-weight coding models. If you prefer a terminal agent, the same exercise exists for OpenCode and for Claude Code pointed at a local endpoint.

Cline, Roo Code and Kilo Code: where each project stands

Roo Code began as a fork of Cline, and Kilo Code is usually grouped with the two. Their paths have since split.

ProjectState on 14 November 2026Latest releaseLicenceLocal model routes in its docs
ClineActive. VS Code and JetBrains extensions, a CLI and a desktop appExtension 4.1.26, 26 October 2026Apache 2.0Ollama, LM Studio, Atomic Chat, OpenAI Compatible
Roo CodeShut down on 15 May 2026; repository archived3.54.0, 15 May 2026Apache 2.0None maintained
Zoo CodeActive continuation of Roo Code by former contributors3.96.0, 7 November 2026Apache 2.0Ollama, LM Studio, OpenAI Compatible, LiteLLM
Kilo CodeActive. VS Code, JetBrains and CLI; the CLI is a fork of OpenCode7.8.27, 5 November 2026MITOllama, LM Studio, Atomic Chat, custom OpenAI-compatible

Three consequences follow. Roo Code’s Marketplace page returned a 404 when we checked, so new installs go to Zoo Code or back to Cline. Kilo Code’s settings no longer look like Cline’s: the extension writes a kilo.json file shaped like an OpenCode config. And Cline now ships in several forms, so the same local server can sit behind the extension, the CLI and the desktop app.

How Cline connects to a local model

Cline has three routes to a model on your own hardware. All are chosen in the settings panel under API Provider.

Provider in ClineDefault addressHow context is setNotes
Ollamahttp://localhost:11434Model Context Window field, default 32,768Uses Ollama’s native /api/chat, so the value is sent as num_ctx on every request
LM Studiohttp://localhost:1234Read-only; reported by LM StudioSet the context when you load the model
OpenAI CompatibleNone; you enter itContext Window Size under Model ConfigurationFor llama.cpp, vLLM and other /v1 servers

The Ollama row matters more than it looks. Ollama’s OpenAI-compatible endpoint cannot set a context size, which is why other agents need a Modelfile or a server-wide variable. Cline’s source says it deliberately uses the native API instead, because the /v1 path would load every model with the server default regardless of what you configured.

No Cline account is needed for a local runtime. The authorisation page says no key is required for Ollama or LM Studio, only that the runtime is running.

Cline with Ollama

  1. Pull a model that supports tools. Cline Desktop’s first recommendation is Qwen3.8 27B, an 18 GB download in Ollama’s library:

    ollama pull qwen3.8:27b
  2. In Cline, open Settings, then API Configuration, and set API Provider to Ollama. The model list is read from the server; if it is empty, Cline tells you it could not reach Ollama and lets you type the name.

  3. Leave the base URL alone for a local server. Tick Use custom base URL only when Ollama runs on another machine; an optional API key field then appears for authenticated instances.

  4. Set Model Context Window. The placeholder reads Default: 32768. Ollama’s Cline page asks for at least 32K tokens, and Ollama’s general guidance for agents and coding tools is at least 64,000, so use 65,536 if the model and that context fit in memory.

  5. Check what was actually loaded while Cline works:

    ollama ps

    The CONTEXT column should match the number you entered, and PROCESSOR should read 100% GPU. A split between GPU and CPU is the most common reason for a slow session.

Ollama truncates the prompt to num_ctx on the server and does not raise an error, so a window that is too small shows up as an agent that forgets its instructions rather than as a failure message. Under the model options, Cline also exposes a request timeout that defaults to 300,000 ms; raise it if a large model takes longer than five minutes to load and answer the first request.

For the terminal, Ollama documents a launcher that sets Cline CLI’s provider, endpoint and model in one step, and offers to install the CLI through npm if it is missing:

ollama launch cline --model qwen3.8:27b

Cline with LM Studio

  1. Download a model in LM Studio and load it with the context you want. From the command line:

    lms load qwen/qwen3.8-27b --context-length 65536
  2. Start the server from the Developer tab, or with:

    lms server start
  3. In Cline, set API Provider to LM Studio and pick the model. The base URL defaults to http://localhost:1234. The API key field is only for servers where you enabled Require Authentication in LM Studio.

The Context Window box in this provider is greyed out. Its tooltip explains that the value is returned by the connected endpoint, so the only place to change it is LM Studio. That has a side effect worth knowing: if LM Studio loads a model on demand because a request arrived for it, it uses the context length saved for that model in LM Studio, which may be much smaller than you intended. Load the model yourself first.

LM Studio lists the same models under different names from Ollama. Cline’s docs map qwen3.8:27b to qwen/qwen3.8-27b, devstral-small-2:24b to mistralai/devstral-small-2-2512 and gpt-oss:20b to openai/gpt-oss-20b.

Cline with llama.cpp or another OpenAI-compatible server

There is no llama.cpp entry in the provider list. Use OpenAI Compatible, which covers llama-server, vLLM and any other server with a /v1/chat/completions route.

Start the server with an explicit port, an alias and a context size. Current builds of llama-server listen on port 9931 by default, not 8080, and enable the Jinja chat template that tool calling relies on; our llama.cpp server walkthrough covers the other flags:

llama-server -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M \
  --alias qwen3.8-27b --host 127.0.0.1 --port 8080 -c 65536

Then fill in the provider:

  • Base URL: http://127.0.0.1:8080/v1. Since Cline 4.1.25 the URL is used exactly as entered, so include /v1 yourself; earlier versions added it silently.
  • API Key: leave it empty unless you started the server with --api-key.
  • Model ID: the alias, qwen3.8-27b.
  • Model Configuration: set Context Window Size to the -c value and, if you wish, Max Output Tokens.

Do not skip the last step. For an unknown model Cline assumes a 128,000-token window. If the server holds 65,536, Cline will keep sending history long after the server has run out of room, and its automatic compaction will start too late. Cline 4.1.21 added a recovery for one symptom of this: when a local server cuts a long reply short because the context is full, Cline now compacts the conversation and retries once.

For a GPU server shared by several developers, the trade-offs between runtimes are in our vLLM, Ollama and llama.cpp comparison.

Roo Code local LLM setup: what to use now

Roo Code cannot be recommended for a new install. Its README carries a notice that the extension was shut down on 15 May 2026 and names two successors: Zoo Code, a fork started by the Roo Code community, and Cline.

Zoo Code is the closer match if you liked Roo’s modes. Its README says the team is made up of earlier Roo contributors, and its migration guide moves your settings in two steps: export the settings file from Roo Code, then choose Import Settings in Zoo Code. The exported file can contain API keys, so treat it as a secret.

Zoo Code’s local providers behave differently from Cline’s in two ways:

  • Ollama context comes from the model, not from a setting. Zoo reads num_ctx from the Ollama model and has no context field of its own. Create a variant with the window you want, then select that name in Zoo:

    FROM qwen3.8:27b
    PARAMETER num_ctx 32768
    ollama create qwen38-32k -f Modelfile
  • Tool calling is native only. Zoo’s docs state that native tool calling is the only supported protocol, with no XML fallback, and that a model without it cannot be used.

LM Studio in Zoo Code needs the provider set to LM Studio, the model identifier, and a base URL only if you moved the server from http://localhost:1234.

Kilo Code local LLM setup

Kilo Code’s README now describes the Kilo CLI as a fork of OpenCode, and the VS Code extension stores its providers in the same kilo.json file. In the extension, open Settings, go to Providers and add Ollama or LM Studio; no key is needed. For llama.cpp or vLLM, scroll down to Custom provider, choose the OpenAI Compatible API and enter the base URL, after which Kilo fetches the model list from the server.

The file form is useful when you want the limits written down. This follows the custom model example in Kilo’s Ollama page:

{
  "model": "ollama/qwen3-coder:30b",
  "provider": {
    "ollama": {
      "models": {
        "qwen3-coder:30b": {
          "name": "Qwen3-Coder 30B (local)",
          "tool_call": true,
          "limit": {
            "context": 32768,
            "output": 8192
          }
        }
      }
    }
  }
}

User-wide settings live in ~/.config/kilo/kilo.json and a project can carry its own kilo.json. Use ollama/<model> for a local server; Kilo’s docs warn that ollama-cloud/... is a hosted route that never touches localhost. For LM Studio the provider key is lmstudio, with options.baseURL set to http://localhost:1234/v1 if you need to change it, and the model key must match the identifier LM Studio serves.

Kilo’s Ollama page asks for at least 32K tokens of context and says to set the context window size in the provider settings. Its config example points at Ollama’s /v1 address, which cannot carry a context size, so set the server default as well and confirm the result with ollama ps:

OLLAMA_CONTEXT_LENGTH=65536 ollama serve

Two limits apply. Kilo’s inline autocomplete does not use your local model: its docs say completions go through the Kilo Gateway to Codestral. And Kilo is frank about expectations, noting that local models are more likely to get stuck in loops or misuse tools, and that requests time out after ten minutes by default.

Context window and the compact prompt

Three numbers have to agree: what the server loaded, what the extension believes, and what the model can do.

SourceGuidance
Ollama defaults4K context below 24 GiB of VRAM, 32K from 24 to 48 GiB, 256K at 48 GiB or more
Ollama, for agents and coding toolsAt least 64,000 tokens
Ollama’s Cline and Roo Code pagesAt least 32K
Cline 4.1.26, Ollama provider32,768 unless you change it
Cline Desktop’s recommended models64K for most; 32K for Devstral Small 2 and Qwen3 8B
Kilo CodeAt least 32K

Context costs memory in addition to the weights. The VRAM calculator works out whether a given model and window fit, and our guide to models by VRAM tier starts from the card you own.

Does Cline still have a compact prompt?

Cline’s local models page still tells you to enable Use Compact Prompt under Settings, Features. The option was added for LM Studio and Ollama as a shorter system prompt for windows of 8K or less. In the 4.1.26 source, however, the setting is marked as removed, with a comment that the compact prompt is no longer supported, and the Features panel lists Auto Compact where it used to sit. If you cannot find the switch, that is the reason.

What remains is Auto Compact, which summarises the conversation when it nears the limit, plus the advice on the same docs page: keep tasks focused and start a new task when the context grows large. Auto Compact skips models whose context limit Cline does not know, which is one more reason to fill in the context field.

Which local models work with Cline

Cline hands the model a set of tools, such as read_files, search_codebase, run_commands and an editing tool, and every step of a task is a tool call. A model that writes good code but formats calls unreliably will stall. The settings panel carries its own warning that Cline uses complex prompts and less capable models may not work as expected.

Cline Desktop ships a list of models it recommends for agentic coding, each with the context it uses and an estimate of memory for model plus context:

ModelDownloadMemory neededContextCline’s note
Qwen3.8 27B18 GB≈ 23 GB64KBest all-round choice
Laguna XS 2.120 GB≈ 24 GB64KLong sessions; quick for its size
Qwen3.6 35B A3B24 GB≈ 26 GB64KSpeed over depth
Devstral Small 215 GB≈ 21 GB32KExploring code, multi-file edits
gpt-oss 20B14 GB≈ 16 GB64K16 to 24 GB machines
Qwen3-Coder-Next52 GB≈ 56 GB64K64 GB or more
Qwen3 8B5.2 GB≈ 10 GB32K8 to 16 GB machines, simple edits

These are Cline’s figures, not ours. Kilo’s own pick is qwen3-coder:30b, with the caveat that it sometimes fails to call tools correctly. For a wider view, see our notes on local models for tool calling.

Common failures and fixes

SymptomLikely causeFix
The agent forgets the task or repeats a stepContext smaller than the prompt; Ollama truncates silentlyRaise Model Context Window; check ollama ps
Model fails to load, out of memoryWeights plus context exceed memoryLower the context, pick a smaller build, unload other models
First reply takes minutes or times outCold load of a large model, or CPU offloadPreload the model; raise the request timeout; check the PROCESSOR column
terminated: BodyTimeoutError after five minutesA bug in versions before 4.1.25Update Cline
Connection errors with OpenAI CompatibleBase URL missing /v1, or wrong portEnter the full URL; remember llama-server defaults to 9931
Tool calls never happenModel or chat template without tool supportChoose a tool-capable model; on llama-server keep Jinja on, or supply --chat-template-file
LM Studio error pointing at its developer logsContext length set too low or too high in LM StudioAdjust the context length there

Privacy and telemetry settings

A local provider keeps inference on your machine. The extensions still have features that talk to the network.

  • Cline telemetry is on by default in the extensions, the desktop app and the CLI. Clear Allow error and usage reporting under Settings, General. For the CLI, set telemetryOptOut to true in ~/.cline/data/settings/global-settings.json. In VS Code, Cline also stops sending usage events while the editor’s own telemetry is off.
  • What Cline says it records: features used, errors, token counts, timings, and model and provider names. Its docs say code, file contents and prompts are excluded unless you use the Cline or ClinePass providers.
  • Zoo Code collects usage and error data through PostHog, on by default, including the VS Code machine ID. Its privacy policy says this does not include code or prompts. Choose Disabled in its settings, or turn off VS Code’s telemetry, which it follows.
  • Kilo Code telemetry is on by default and can be switched off with "experimental": { "openTelemetry": false } in kilo.json.
  • Approvals: since version 4.0.0 Cline leaves command auto-approval off for new configurations. Keep it that way with a small local model, which is more likely to produce a wrong command.
  • .clineignore is not a safeguard. Cline’s deprecations page says the file never prevented access, because the agent can still reach files through shell commands, and that it is being removed.

None of these switches is isolation. If the agent runs commands on a machine with credentials, see our guide to sandboxing agents that execute code. And if you only need chat and completions in the editor, not an autonomous agent, our VS Code local model guide covers the lighter options.

How VDF AI fits

VDF AI does not run, host, resell or integrate with Cline, Roo Code, Zoo Code or Kilo Code. A local model behind one of these extensions keeps one developer’s prompts on one machine. It does not give a team a shared answer to who hosts the model, which models and tools are approved, or where the record of an agent’s edits is kept; each of those lives in a settings panel on each laptop.

VDF Code is VDF AI’s governed coding assistant for organisations that need those decisions made centrally. Its product page describes extensions for VS Code, JetBrains IDEs, Neovim and Visual Studio, and deployment in a VPC, a data centre or a fully air-gapped site. For the model layer, VDF AI Router puts local open-weight models and approved external endpoints behind one API with allow and deny lists, and its air-gap mode restricts routing to local models.

Sources

Project repositories, documentation pages and model listings, each opened on 14 November 2026.


Moving from one developer’s local agent to a governed set-up for a whole team? See how VDF Code runs on infrastructure you control, or talk to us.

Frequently asked questions

How do I use Cline with a local model?

Start a local model server, open Cline's settings and pick the matching API provider. Cline has dedicated providers for Ollama, on port 11434, and LM Studio, on port 1234, and an OpenAI Compatible provider for llama.cpp, vLLM or anything else with a /v1 endpoint. No API key is needed for a local runtime. Then set the context window to at least 32K tokens, choose a model that supports tool calling and keep each task focused, because small windows fill quickly.

How do I connect Cline to Ollama?

Pull a tool-capable model with ollama pull, then in Cline's settings set API Provider to Ollama and choose the model from the list. The base URL defaults to localhost on port 11434. Set the Model Context Window field, which defaults to 32,768 tokens in Cline 4.1.26; Cline sends that value to Ollama's native API with every request, so you do not need a Modelfile. For the Cline CLI, ollama launch cline does the same wiring from the terminal.

Does Cline work with LM Studio?

Yes. Start LM Studio's server from the Developer tab or with lms server start, select LM Studio as the API provider in Cline and choose the loaded model. The base URL defaults to localhost on port 1234, and an API key is needed only if you switched on Require Authentication in LM Studio. Cline shows the context window as read-only because LM Studio reports it, so set it when you load the model, for example with lms load and the --context-length flag.

Is Roo Code still available for local models?

No. The Roo Code repository states that the extension was shut down on 15 May 2026, the repository is archived and its last release is 3.54.0 from the same day. The README points users to Zoo Code, a continuation started by former Roo contributors, and to Cline. Zoo Code keeps the Ollama, LM Studio and OpenAI Compatible providers and can import a settings file exported from Roo Code, so an existing local setup carries over.

How do I use Kilo Code with Ollama or LM Studio?

Open Settings, go to the Providers tab and add Ollama or LM Studio; no API key is needed. Kilo Code now stores this in a kilo.json file that the VS Code extension shares with the Kilo CLI, where models are written as ollama/model-name or lmstudio/model-name. Kilo's docs ask for at least 32K tokens of context and recommend qwen3-coder:30b, while warning that local models are more likely to loop or mishandle tools than hosted ones.

Does Cline send my code anywhere when I use a local model?

Model requests go to the server you configured. Cline's own telemetry is on by default and records events such as features used, errors, token counts and model names, but its docs say it does not include code, file contents or prompts unless you use the Cline or ClinePass providers. Turn it off under Settings, General, by clearing Allow error and usage reporting. With telemetry off, Cline still contacts its servers to sign you in and to check feature flags.

Filed under
Clinelocal LLMOllamaLM StudioKilo CodeAI coding assistants
On-Prem AI

Plan your on-prem AI deployment

Book an architecture call and we will scope a private, on-prem AI deployment for your environment — integrations, hardware, and governance included.

Keep reading