Skip to content

Connect a model

Terere Harness works with any OpenAI- or Anthropic-compatible API. You bring the endpoint and, if it needs one, the key.

Last updated 29 September 2026

The four settings

The first window asks for these. Settings, then Models, asks for the same things when you add another provider, but calls API type API protocol.

  • Base URL: the address of the API, for example https://api.openai.com/v1.
  • API type: OpenAI-compatible (Chat Completions) for most providers and local servers, or Anthropic-compatible (Messages) for Anthropic’s API.
  • API key: the key from your provider’s dashboard. Leave it empty for a local server that doesn’t use one. The key is saved on your computer only.
  • Model ID: the exact name your provider uses for the model, as shown in its model list.

Use a model that supports tool calling (also called function calling). Terere Harness works by calling tools to read files, edit code and run commands, so a model without it can chat but can’t do the work.

Settings for common providers

The model IDs are examples. Providers add and retire models often, so check the current list in your provider’s documentation.

Base URL, API type, key and an example model ID for common providers
Provider and API typeBase URLAPI keyExample model ID
OpenAIOpenAI-compatiblehttps://api.openai.com/v1Requiredgpt-4.1
AnthropicAnthropic-compatiblehttps://api.anthropic.comRequiredclaude-sonnet-5-5
OpenRouterOpenAI-compatiblehttps://openrouter.ai/api/v1Requiredanthropic/claude-sonnet-5-5
DeepSeekOpenAI-compatiblehttps://api.deepseek.com/v1Requireddeepseek-chat
Google GeminiOpenAI-compatiblehttps://generativelanguage.googleapis.com/v1beta/openaiRequiredgemini-2.5-pro
Ollama (on your computer)OpenAI-compatiblehttp://localhost:11434/v1Leave emptyllama3.1
LM Studio (on your computer)OpenAI-compatiblehttp://localhost:1234/v1Leave emptyThe model’s identifier in LM Studio

Models on your computer

With Ollama, download a model first with ollama pull llama3.1, and keep Ollama running while you use Terere Harness. With LM Studio, load a model and start its local server from the Developer tab. Neither needs a key, and your prompts never leave your computer.

Change or add models later

Open Settings, then Models, and select Add model provider. Give the provider a short Provider ID and a Display name, then enter the same base URL and key as above. Under API protocol, choose OpenAI Chat Completions or Anthropic Messages; OpenAI Responses is for providers that offer OpenAI’s newer Responses API.

Settings, Models, with the Add model provider form filled in for Ollama: Provider ID ollama, Display name Ollama, Base URL http://localhost:11434/v1, API protocol OpenAI Chat Completions and an empty API key.
Adding Ollama, which runs on your computer and needs no key.

Under Models, select Fetch available models to see the models the provider offers, tick the ones you want and select Add selected. Then select Create provider.

A Choose models to add dialog listing the models Ollama has installed, with qwen3:8b ticked and an Add selected button.
Fetch available models asks the provider which models it has.

To switch models, use the model picker in a session; the model you pick there becomes the default for new sessions.

The model picker open above the message box, listing qwen3:8b under the Ollama provider.
The model picker groups models by provider.

If something doesn’t work

The first window won’t save

“Enter a valid HTTP or HTTPS URL, without a query string.” means the base URL must start with http:// or https:// and have nothing after it such as ?key=. “Remove spaces or quotes from the API key and model ID.” means paste the key on its own, without quotes, spaces or a name like OPENAI_API_KEY=. “Could not save the endpoint. Try again.” means the save itself failed; try again, or add the model later in Settings, then Models.

Unauthorized (401) or forbidden (403)

The key is wrong, expired, or doesn’t have access to that model. Create a new key in your provider’s dashboard and paste it again.

Not found (404)

The base URL or model ID is wrong. OpenAI-compatible URLs usually end in /v1; Anthropic’s is just https://api.anthropic.com. Copy the model ID exactly as your provider lists it.

Can’t connect to a local model

Make sure the server is running and the port matches: 11434 for Ollama, 1234 for LM Studio. Open the base URL followed by /models in a browser; it should list your models.

The model answers but doesn’t edit files or run commands

The model doesn’t support tool calling, or supports it poorly. Try a larger model, or one your provider lists as supporting tools.