DOCUMENTATION

Local models with Ollama

Use a model running on your own computer with Ollama or LM Studio, so nothing leaves it.

With a local model, KomaLens connects to your own computer: nothing leaves it in any mode and there's no per-use cost. You need a computer with enough memory for the model you choose.

1. Install Ollama

Download it from ollama.com for Windows, macOS or Linux and install it. Ollama keeps running in the background and listens on http://localhost:11434.

2. Download a model

In a terminal, pull the model with ollama pull. For Image to API you need a vision model; for Hybrid any text model works.

ollama pull qwen3-vl

Some vision families in the Ollama library are Qwen-VL (qwen3-vl), Gemma 3 (gemma3, from size 4b up) and LLaVA (llava). The lineup changes often: check current names and sizes at ollama.com/library. This isn't a recommendation: pick whatever runs best on your computer.

To see the models you have installed:

ollama list

3. Set up KomaLens

In Settings → API provider:

FieldValue
Base URLhttp://localhost:11434/v1
API keyLeave it empty: it's optional and Ollama doesn't use it.
ModelThe name as shown by ollama list, for example qwen3-vl:latest.

When you save, KomaLens asks for permission to connect to localhost / 127.0.0.1. Accept it: that's what lets it talk to Ollama.

4. If you get a 403 or CORS error

By default, Ollama only accepts requests from localhost, 127.0.0.1 and 0.0.0.0, not from browser extensions. If KomaLens shows a 403 or CORS error when connecting, allow the extension's origin with the OLLAMA_ORIGINS environment variable.

The KomaLens origin is:

chrome-extension://gfooakgilleljdbbbgnfihfaoflnoejf

It's the same in Chrome and Edge, since both install it from the Chrome Web Store. You can also use chrome-extension://* to allow any extension, but it's less restrictive.

Windows

  1. Quit Ollama from its icon in the taskbar.
  2. Open Settings and search for “environment variables”. Choose Edit environment variables for your account.
  3. Create a variable named OLLAMA_ORIGINS with the value chrome-extension://gfooakgilleljdbbbgnfihfaoflnoejf.
  4. Save and start Ollama again from the Start menu.

macOS

If you use the Ollama app, run this in Terminal, then quit and reopen the app:

launchctl setenv OLLAMA_ORIGINS "chrome-extension://gfooakgilleljdbbbgnfihfaoflnoejf"

Linux

If Ollama runs as a systemd service, edit the service:

sudo systemctl edit ollama.service

Add these lines, then save and exit:

[Service]
Environment="OLLAMA_ORIGINS=chrome-extension://gfooakgilleljdbbbgnfihfaoflnoejf"

Then reload and restart:

sudo systemctl daemon-reload
sudo systemctl restart ollama

If you start it from a terminal

Set the variable in the same command:

OLLAMA_ORIGINS="chrome-extension://gfooakgilleljdbbbgnfihfaoflnoejf" ollama serve

Tip

In every case, the variable must be set **before** Ollama starts. If it was already running, quit it and open it again.

LM Studio

LM Studio also offers an OpenAI-compatible API:

  1. Download a model from the app. For Image to API, a vision model.
  2. In the Developer tab, start the local server. By default it listens on port 1234.
  3. In the server settings, turn on Enable CORS so the extension can connect.
  4. In KomaLens use the base URL http://localhost:1234/v1, leave the API key empty and pick the model from the list.

You can check the server is up by opening http://localhost:1234/v1/models in your browser.