Skip to content

All settings are in the ollama.* namespace. Open them via:

  • File → Preferences → Settings then search "Ollama"
  • Or edit settings.json directly

Connection

ollama.host

TypeDefault
string"http://localhost:11434"

The URL of your Ollama server. Supports local and remote instances.

Examples:

json
"ollama.host": "http://localhost:11434"
"ollama.host": "https://my-ollama-server.example.com"
"ollama.host": "http://192.168.1.50:11434"

For remote instances that require authentication, also set ollama.authToken (via the Manage Ollama Auth Token command — it is stored securely in the VS Code secret store, not in settings.json).

Model Parameters

ollama.contextLength

TypeDefault
number0

Override the context window size (in tokens) for all models. 0 means use each model's default context length.

Increase this for longer conversations or large file analysis:

json
"ollama.contextLength": 32768

Warning: Setting this higher than a model supports can cause errors or degrade quality.

ollama.localModelRefreshInterval

TypeDefault
number30

How often (in seconds) to auto-refresh the local models and running models lists. Decrease for faster status updates; increase to reduce API polling.

ollama.libraryRefreshInterval

TypeDefault
number21600

How often (in seconds) to auto-refresh the Ollama Library and Cloud model catalogs. Default is 6 hours. These catalogs change infrequently, so aggressive polling is unnecessary.

Logging

ollama.streamLogs

TypeDefault
booleantrue

When enabled, streams Ollama server log output to the Opilot output channel in real time.

  • macOS: tails ~/.ollama/logs/server.log
  • Windows: tails %LOCALAPPDATA%\Ollama\server.log
  • Linux: streams from journalctl -u ollama

Disable if stream output is noisy or you prefer a quiet channel.

ollama.diagnostics.logLevel

TypeDefaultOptions
string"info""debug", "info", "warn", "error"

Controls verbosity of extension diagnostic output in the Opilot output channel.

LevelShows
debugAll messages including internal timing and API calls
infoNormal operation messages (default)
warnWarnings and errors only
errorErrors only

Use "debug" when troubleshooting connection or provider issues.

Modelfiles

ollama.modelfilesPath

TypeDefault
string"" (empty)

Path to the folder containing your Modelfiles. Leave empty to use the default: ~/.ollama/modelfiles.

json
"ollama.modelfilesPath": "/Users/yourname/projects/my-modelfiles"

Inline Completions

ollama.completionModel

TypeDefault
string"" (disabled)

The Ollama model to use for inline code completions. Must be a locally installed model. Leave empty to disable completions.

Best results with small, fast code models:

json
"ollama.completionModel": "qwen2.5-coder:1.5b"
"ollama.completionModel": "deepseek-coder:1.3b"
"ollama.completionModel": "starcoder2:3b"

ollama.enableInlineCompletions

TypeDefault
booleantrue

Master toggle for inline code completions. Set to false to temporarily disable without clearing your completionModel.

json
"ollama.enableInlineCompletions": false

A sensible starting configuration for local development:

json
{
  "ollama.host": "http://localhost:11434",
  "ollama.contextLength": 0,
  "ollama.localModelRefreshInterval": 30,
  "ollama.libraryRefreshInterval": 21600,
  "ollama.streamLogs": true,
  "ollama.diagnostics.logLevel": "info",
  "ollama.completionModel": "qwen2.5-coder:1.5b",
  "ollama.enableInlineCompletions": true
}

Released under the MIT License