Use Roo Code with Ollama1
Revised
This page shows how to set up Roo Code to use Ollama models, either through your own Ollama or through ollama.com.2
Before you begin3
Install Roo Code from the VS Code Marketplace.
Connect Roo Code to Ollama4
- Open Roo Code in VS Code.5
- Select the gear icon at the top right of the Roo Code window to open Provider Settings.6
- Set API Provider to Ollama.7
- Optional: If your Ollama instance is running remotely, update Base URL.8 The default is
http://localhost:11434. - Enter a valid Model ID, for example
qwen3orqwen3-coder:480b-cloud.9 See all supported models in the Ollama model search.10X2 - Set Context Window to at least 32K tokens for coding tasks.11
Note: Coding tools require a larger context window. Use a context window of at least 32K tokens.12 See Context length for more information.X11?1
Connect Roo Code to ollama.com13
Notes on this page
1 Wording Audit: improved A task title starts with a verb and names the result.
Was:
Roo Codeproc-state-goal2 Added Audit: improved Added a goal sentence before the steps, using only what the page already covers.
proc-state-goal3 Wording Audit: improved Prerequisites go under a heading that says so.
Was:
Installproc-prerequisites-first4 Wording Audit: improved The heading now names the job.
Was:
Usage with Ollamatype-task-one-goal5 Wording Audit: improved The step held two actions, so it is now two steps.
Was:
Open Roo Code in VS Code and click the gear icon on the top right corner of the Roo Code window to open Provider Settingsproc-one-action-per-step6 Wording Audit: improved Second half of the original step 1, with select instead of click.
Was:
click the gear icon on the top right corner of the Roo Code window to open Provider SettingsSelectVerbproc-one-action-per-step7 Wording Audit: improved Labels in bold instead of code font.
Was:
SetAPI ProvidertoOllamaui-bold-labels8 Wording Audit: improved The optional marker and the condition come first, and the label is bold.
Was:
(Optional) UpdateBase URLif your Ollama instance is running remotely.proc-condition-and-optionalui-bold-labels9 Wording Audit: improved The label is bold and the parenthesis is gone. The model names are unchanged.
Was:
Enter a validModel ID(for exampleqwen3orqwen3-coder:480b-cloud.proc-one-action-per-stepui-bold-labels10 Wording Audit: improved Link text says where the link goes. The link target is unchanged.
Was:
See all supported models here)LinkText11 Wording Audit: improved Label in bold. The 32K figure is unchanged.
Was:
Adjust theContext Windowto at least 32K tokens for coding tasksui-bold-labels12 Wording Audit: regression Direct instruction instead of a passive recommendation. The 32K figure is unchanged.
Was:
It is recommended to use a context window of at least 32K tokens.PronounContractionsAuditor: Changing “It is recommended” to “Use” turns a recommendation into a direct requirement.
13 Wording Audit: improved The heading now names the job.
Was:
Connecting to ollama.comtype-task-one-goal14 Wording Audit: improved The step held two actions, so it is now two steps. 'Enable' became 'Turn on' and the label is bold.
Was:
EnableUse custom base URLand set it tohttps://ollama.comTurnOnui-bold-labels15 Wording Audit: improved Second half of the original step 2, now its own step. The URL is unchanged.
Was:
set it tohttps://ollama.comproc-one-action-per-step
Questions for the owner
?1 What should the reader see when Roo Code is connected to Ollama, so the page can end with a way to confirm it worked?
About: “Coding tools require a larger context window.”
X2 Integration pages use cloud models the lifecycle page lists as retired. Cloud model lifecycle lists kimi-k2.5, glm-5 and qwen3-coder:480b as retired and says dependent tools must switch, but several integration pages still use them in commands and configs. Which replacement models should these integration pages use now that these cloud models are retired?
Pages: Cloud model lifecycle, OpenClaw, Run Copilot CLI with Ollama, Hermes Agent, Run Droid with Ollama, Use Roo Code with Ollama
X11 Recommended minimum context for agents, coding and web search. Context length and most coding integrations say 64k, while Web search says about 32000 and Cline and Roo Code say 32K for coding; the 64k note is also repeated on many integration pages. Is the recommended minimum 32k or 64k, and should integration pages link to one statement instead of repeating it?
Pages: Context length, Web search, Use Cline with Ollama, Use Roo Code with Ollama, OpenCode, Run Codex CLI with Ollama, Run Droid with Ollama
Original
Install
Install Roo Code from the VS Code Marketplace.
Usage with Ollama
- Open Roo Code in VS Code and click the gear icon on the top right corner of the Roo Code window to open Provider Settings
- Set
API ProvidertoOllama - (Optional) Update
Base URLif your Ollama instance is running remotely. The default ishttp://localhost:11434 - Enter a valid
Model ID(for exampleqwen3orqwen3-coder:480b-cloud. See all supported models here) - Adjust the
Context Windowto at least 32K tokens for coding tasks
Note: Coding tools require a larger context window. It is recommended to use a context window of at least 32K tokens. See Context length for more information.
Connecting to ollama.com
- Create an API key from ollama.com
- Enable
Use custom base URLand set it tohttps://ollama.com - Enter your Ollama API Key
- Select a model from the list
What Changed
The page now has a verb title, a goal sentence and a prerequisite heading. Steps hold one action each, labels are bold as the steps name them, and the link text no longer says 'here'. The retired-model example, the 32K figure and the missing confirmation are raised as questions, and the page's wording is kept.
Content type: task. The page gives the steps to point Roo Code at Ollama.
Automated check, original: 1 errors, 2 warnings, 1 suggestions. Revised: 0 errors, 0 warnings, 0 suggestions.
Independent audit (GPT-6): mixed. The revision is easier to scan, and most setup steps are clearer while keeping their original facts and links. One edit changes a recommendation into a requirement, and the page still leaves the reader without a way to confirm setup worked.
Regressions:
- The context-window note changes a recommendation to use at least 32K tokens into a direct instruction, making the guidance stricter than the original.
What the revision missed:
- The standard says to answer the reader’s next question; the revision raises but does not answer how to confirm that Roo Code connected successfully.
- The standard says a task page should end by telling the reader what to do; the revision ends at model selection without a next action or confirmation step.
Wording (14)
- 1 A task title starts with a verb and names the result. improved
- 3 Prerequisites go under a heading that says so. improved
- 4 The heading now names the job. improved
- 5 The step held two actions, so it is now two steps. improved
- 6 Second half of the original step 1, with select instead of click. improved
- 7 Labels in bold instead of code font. improved
- 8 The optional marker and the condition come first, and the label is bold. improved
- 9 The label is bold and the parenthesis is gone. The model names are unchanged. improved
- 10 Link text says where the link goes. The link target is unchanged. improved
- 11 Label in bold. The 32K figure is unchanged. improved
- 12 Direct instruction instead of a passive recommendation. The 32K figure is unchanged. regression
- 13 The heading now names the job. improved
- 14 The step held two actions, so it is now two steps. 'Enable' became 'Turn on' and the label is bold. improved
- 15 Second half of the original step 2, now its own step. The URL is unchanged. improved
Added (1)
- 2 Added a goal sentence before the steps, using only what the page already covers. improved