# Run local models

**[aixplain Desktop](https://www.aixplain.com/support/articles/get-started-with-aixplain-desktop)** can run models on your own computer, so the model's work stays on your machine and costs nothing beyond your hardware. You can use Ollama, the app's built-in engine or a local server you already run. This article explains how to set up a local model, how the app checks that it fits your computer, how to use it from the terminal and what still needs a network connection.

> Local models work in aixplain Desktop on macOS, Windows and Linux, and in the `koder` CLI. They're free; you pay only for the hardware you run them on. aixplain Desktop is in early releases (version 0.x), so features can change from one release to the next.

## What you can run

| Engine | What it is | Setup |
| --- | --- | --- |
| **Ollama** | A popular local model runner | The app finds it with no setup when it's running, or installs it for you |
| **Built-in engine** | The app's own engine for models saved on disk in the GGUF format | Nothing else to install or keep running |
| **A server you already run** | llama-server or LM Studio on this computer | The app picks it up when it's running |

Other local servers, such as vLLM or llama.cpp, can be added as a custom provider by their base URL in **Settings → Models & providers**.

## Set up a local model

1. Open the command palette and choose **Connect an AI provider**.
2. Go to **Run locally**. Under **This machine**, the app shows your computer's memory, graphics and free disk, and a **Suggested model** that fits.
3. Pick the suggested model, or another one, and select **Download**.
4. If you don't have a local runtime yet, choose **Install Ollama**, or **I'll install it myself**.
5. Wait for the download and setup to finish. The app checks that the model answers before it offers it.
6. Pick the local model in the model picker.

If a model is already running in Ollama, LM Studio or llama-server, the app says so and offers **Use it**.

### How Ollama installs

- **macOS:** the app downloads Ollama, verifies it and installs it in your Applications folder.
- **Windows:** the app starts Ollama's installer for you to finish.
- **Linux:** the app shows a command to run in a terminal. It asks for your password.

### Check what a model can do

Each installed model shows a badge, so you know what to expect before you use it:

- **Tools:** it can call tools, so it can edit files and run commands.
- **Tools (limited)** or **Tools untested:** tool calls may not work well. Select **Test tool calling** to check.
- **Chat only:** it can answer but can't call tools.
- **Too large** or **Context too small:** it won't run well on this computer, or its context is too short.

> **Note:** Local models need a context of at least 32,768 tokens. Models trained on less are left out when the app routes requests on its own.

## Choose a model that fits your computer

The app suggests a model from your memory, graphics and free disk, so you don't have to guess.

- **With a graphics card or on a Mac:** a model that fits runs fully on it.
- **Without a graphics card:** models run on the processor and are slower.
- **Not enough memory:** the app suggests a cloud model instead.
- **Not enough disk:** the app tells you how much free space the model needs.

## Use a local model in the terminal

Ollama models are available in the `koder` CLI with no extra setup. Pick one for a single run with `--model`:

```sh
koder run --model ollama/qwen3.5:latest "Explain this repository"
```

If Ollama listens on another port or address, set `OLLAMA_HOST`. Run `koder models` to list every model you can use.

## What works offline

With a local model, the model runs on your computer, and your sessions and settings are always stored there.

These still need a network connection:

- **Setup:** installing Ollama and downloading models.
- **Signing in to aixplain**, and hosted models such as Athena and Automode.
- **Connected apps and MCP servers** that reach services on the internet.
- **Update checks.** The app tells you when it can't check because you're offline.

> **Important:** A local model keeps the model's work on your computer, but tools the agent uses can still send data. Check which apps and MCP servers are connected before you work with sensitive files.

## Limitations

- Local engines must run on the same computer as the app. Models on another machine on your network go in as a custom provider.
- Some local models call tools poorly or not at all. Use one marked **Tools** for coding work.
- Large models need a lot of memory and free disk, and run slower without a graphics card.

## Frequently asked questions

### Does a local model use my aixplain credits?

No. Local models cost nothing beyond your hardware, and they don't count toward your usage.

### Can I use a model on another machine on my network?

Yes, as a custom provider. Open **Settings → Models & providers**, add a custom provider and enter the server's base URL. See **[Get started with aixplain Desktop](https://www.aixplain.com/support/articles/get-started-with-aixplain-desktop#connect-your-own-provider)**.

### Why is my local model missing when the app picks a model on its own?

Its context is shorter than 32,768 tokens. Pick it yourself in the model picker, or use a model with a longer context.

## Get help

- **Fix other problems:** see **[Troubleshooting aixplain Desktop](https://www.aixplain.com/support/articles/aixplain-desktop-troubleshooting)**.
- **Report a problem:** email **care@aixplain.com** with your operating system, the model and what happened.
