# Inline AI

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

Choose Tab completion separately from inline edits and review generated changes in the editor.

Inline AI includes suggestions while typing and targeted edits to code in the active editor.
The two surfaces have separate model choices.

## Tab completion

Open **Settings > AI > Tab completion**, enable suggestions and choose a model. Automatic uses
the available connection described by the picker. Check its provider before assuming a completion
is local. Organization policy can disable completion.

Use a model suitable for fast coding suggestions. For a personal or local connection, configure
it first in [Models & keys](https://athas.dev/docs/ai-providers).

## Inline edits

Select the code you want changed and run **Agent Inline Edit** from the command palette. Describe
the focused change, inspect the generated result and keep or reject it before continuing.

Inline edits use the default model unless **Inline edits** has an override under
**Settings > AI > Other features**. Changing the Tab completion model does not set the inline-edit model.

## Context and failures

Keep the selection small enough to review. Root ignore files affect automatic context and Tab
completion; see [Agent context](https://athas.dev/docs/agent-context). If a request fails, check the chosen connection,
key or endpoint and hosted usage limits in [Providers and Models](https://athas.dev/docs/ai-providers).

Use [Athas Agent](https://athas.dev/docs/athas-agent) for tasks that need broader discussion or multiple files.
