# Providers and Models

Source: https://athas.dev/docs/ai-providers

Choose default and feature models, configure provider keys or local endpoints, and diagnose connection failures.

Model settings choose where requests go. The selected connection determines whether usage is
charged through Athas, a personal provider key, or a local server.

## Default and feature models

Open **Settings > AI** and choose the **Default model**. New chats and other AI features use that
connection unless a feature has an override. Expand **Other features** to choose separate models
for new chats, inline edits, commit messages, titles, GitHub drafts or review assistance.

**Tab completion** has its own page and model choice. Its Automatic option resolves according to
your available Athas or personal/local connection. Inspect the displayed model and provider before
assuming a request stays on-device.

## Personal provider keys

Open **Settings > AI > Providers & keys**. Set the key for the provider you want to use, then select
one of its available models. Athas includes OpenAI, Anthropic, OpenRouter, Gemini and xAI provider setup.
Use the provider's official account console to create and manage keys; their access and billing
are separate from your Athas subscription.

Keys are stored locally through secure storage. External agents have their own authentication;
adding a provider key to Athas does not automatically sign every external CLI into its service.

## Ollama

Install and run [Ollama](https://ollama.com), then pull a model supported by your machine:

```bash
ollama pull <model-name>
ollama list
```

Configure the endpoint in **Models & keys**, then select the Ollama model. A local endpoint keeps
model execution on that machine; an Ollama Cloud endpoint is a remote service and may need a key.
Model availability, context size and tool support depend on the model and server.

## Custom OpenAI-compatible endpoint

Configure **Custom** under **Models & keys** with:

- Its API base URL, such as `http://localhost:11434/v1`.
- An API key if the server requires bearer authentication.
- Optionally, a model ID, for servers that don't list their models.

Athas accepts an API root or full chat completions URL, such as
`https://api.example.com/v1/chat/completions`. The endpoint must implement the supported
OpenAI-compatible chat completions API. The model pickers list the models the server reports at
`/models`, next to the model ID you entered, so the default model, features and Tab completion can
each use a different one. The list reloads when the address or key changes. If the server doesn't
list models, the picker shows the error with a retry, and the entered model ID still works.

## Troubleshooting

| Symptom                    | Check                                                            |
| -------------------------- | ---------------------------------------------------------------- |
| Authentication error       | Correct provider, key validity and account permissions           |
| Model not found            | Exact model ID and endpoint URL                                  |
| Local connection refused   | Server running, host and port reachable                          |
| Hosted credit or cap error | Athas billing usage, available credit and monthly spending limit |
| Tool calls unavailable     | Selected model and endpoint's tool-calling support               |
| External agent login error | That agent's CLI login and account setup                         |

Never paste keys into a bug report or chat. [AI overview](https://athas.dev/docs/ai) explains hosted usage and
[Agent context](https://athas.dev/docs/agent-context) describes which project information an agent receives.
