continue-custom/docs/customize/model-providers/top-level/ollama.mdx
Dallin Romney 5f3a861a59
docs: add troubleshooting for Ollama memory errors (#11864)
* docs: add troubleshooting for "model requires more system memory" in Ollama

Add guidance for users encountering memory errors when using Ollama models
with Continue. Continue's higher default context length can trigger this
error even when models work in other tools. Documents the fix of reducing
contextLength in config, with examples for both YAML and JSON formats.

Ref: https://github.com/continuedev/continue/issues/11715

* docs: make ollama memory troubleshooting more concise

* docs: remove discussion link from ollama troubleshooting

* docs: fix broken link to ollama troubleshooting section
2026-03-25 21:04:27 -07:00

109 lines
2.6 KiB
Text

---
title: "How to Configure Ollama with Continue"
slug: ../ollama
sidebarTitle: "Ollama"
---
<Tip>
**Discover Ollama models [here](https://continue.dev/lmstudio)**
</Tip>
<Info>
Get started with [Ollama](https://ollama.com/download)
</Info>
## Configuration
<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1
models:
- name: <MODEL_NAME>
provider: ollama
model: <MODEL_ID>
apiBase: http://<my endpoint>:11434 # if running a remote instance of Ollama
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "<MODEL_NAME>",
"provider": "ollama",
"model": "<MODEL_ID>"
"apiBase": "http://<my endpoint>:11434" // if running a remote instance of Ollama
}
]
}
```
</Tab>
</Tabs>
<Info>
**Check out a more advanced configuration [here](https://continue.dev/ollama/qwen3-coder-30b?view=config)**
</Info>
## How to Configure Model Capabilities in Ollama
Ollama models usually have their capabilities auto-detected correctly. However, if you're using custom model names or experiencing issues with tools/images not working, you can explicitly set capabilities:
<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1
models:
- name: <CUSTOM_MODEL_NAME>
provider: ollama
model: <CUSTOM_MODEL_ID>
capabilities:
- tool_use # Enable if your model supports function calling
- image_input # Enable for vision models
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "<CUSTOM_MODEL_NAME>",
"provider": "ollama",
"model": "<CUSTOM_MODEL_ID>",
"capabilities": {
"tools": true, // Enable if your model supports function calling
"uploadImage": true // Enable for vision models
}
}
]
}
```
</Tab>
</Tabs>
<Note>
Many Ollama models support tool use by default. Vision models often also support image input
</Note>
## Troubleshooting
### "Model requires more system memory"
Continue may set a higher default context length than other Ollama tools, causing this error even when the model works elsewhere. Fix by reducing `contextLength`:
```yaml title="config.yaml"
models:
- name: Deepseek R1
provider: ollama
model: deepseek-r1:latest
defaultCompletionOptions:
contextLength: 2048
```
You can also try a smaller model variant.