# Choose your model provider

Each Speedwave project picks one model provider: Anthropic, a model server you host yourself, or OpenRouter. The choice lives in your user config, not the repository, so one project can run on the Anthropic subscription while another talks to a local server.

<DesktopFrame screen="settings" />

## A session sticks to one provider

The provider you pick is fixed for the whole session: `/model` only switches between models the active provider offers.

The shorthand names `opus`, `sonnet`, and `haiku` still work on a local server or OpenRouter. Speedwave remaps them onto that provider's own models.

## Anthropic uses a fixed catalogue

The Anthropic model dropdown groups models into Latest and Legacy, each labeled with its context window and model id. That list comes from Speedwave's built-in catalogue, not a live check against the provider.

| Model | Context | Status |
| --- | --- | --- |
| Fable 5 | 1M tokens | Latest |
| Opus 4.8 | 1M tokens | Latest |
| Sonnet 5 | 1M tokens | Latest |
| Haiku 4.5 | 200k tokens | Latest |
| Opus 4.7, Opus 4.6, Sonnet 4.6 | 1M tokens | Legacy |

Pricing varies by model and by context length. See [Usage and cost](/docs/guides/usage-and-cost/) for how this feeds what you are billed.

## Local servers get probed for models

A local provider points at a model server you run yourself, with a base URL that defaults to `http://host.docker.internal:11434`, matching Ollama's default port. Speedwave probes that address and lists the models it offers. A **discover models** button re-probes on demand, useful right after you pull a new model. Discovery works for Ollama, LM Studio, and llama.cpp-style servers, not Anthropic.

If the server is offline, or answers with something Speedwave cannot parse, the model field disappears and Speedwave shows an inline error instead. Fix the server or URL, then discover models again.

A custom base URL must be plain http or https with a simple path, so `http://localhost:11434/v1` works but `.../v1/extra` does not. Custom headers are advanced: setting them bypasses the per-project proxy, losing usage tracking, and Speedwave rejects a few names outright, including `Authorization`, `Cookie`, and `Host`. See [Data and privacy](/docs/security/data-and-privacy/) for what leaves your machine under each provider.

**Why can't I use my OpenAI or Gemini key here?** Speedwave used to ship a translating proxy that converted other providers' APIs into Anthropic's format, and it was removed on purpose: it was a source of subtle bugs and a bigger attack surface for something few people used. The proxy now relays the Anthropic Messages API straight through with no translation layer, so a local server must speak that API natively, the way Ollama, LM Studio, and llama.cpp do. An OpenAI or Gemini key in the local provider fields will not work.

## OpenRouter fetches its list from its own catalogue

OpenRouter is a fixed row in the provider panel, not a way to add arbitrary providers. Enter your OpenRouter API key and Speedwave fetches the model list from the OpenRouter catalogue, filtered to models that support tool use.

## Where this is stored

The active provider, its base URL, and related settings live in your user config at `~/.speedwave/config.json`, edited through Settings. See [Config keys](/docs/reference/config-keys/) for the full schema. Provider keys live separately, under `~/.speedwave/tokens/<project>/llm/` with owner-only file permissions. See [How credentials are handled](/docs/security/credentials/) for the full picture.