> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/yetone/avante.nvim/llms.txt
> Use this file to discover all available pages before exploring further.

# Configuration Schema

> Complete configuration schema with all options, types, and defaults

Complete reference for all Avante.nvim configuration options.

## Core Configuration

### debug

Enable debug mode for verbose logging.

* **Type:** `boolean`
* **Default:** `false`

```lua theme={null}
debug = false
```

**Source:** lua/avante/config.lua:30

***

### mode

Interaction mode for AI responses.

* **Type:** `"agentic" | "legacy"`
* **Default:** `"agentic"`

```lua theme={null}
mode = "agentic"
```

**Options:**

* `"agentic"` - Uses tools to automatically generate code
* `"legacy"` - Uses old planning method to generate code

**Source:** lua/avante/config.lua:31-33

***

### provider

Default AI provider.

* **Type:** `string`
* **Default:** `"claude"`

```lua theme={null}
provider = "claude"
```

**Built-in providers:** `"claude"`, `"openai"`, `"azure"`, `"gemini"`, `"vertex"`, `"cohere"`, `"copilot"`, `"bedrock"`, `"ollama"`, `"watsonx_code_assistant"`, `"mistral"`

**Source:** lua/avante/config.lua:34-36

***

### auto\_suggestions\_provider

Provider for auto-suggestions (high-frequency operation).

* **Type:** `string | nil`
* **Default:** `nil`

```lua theme={null}
auto_suggestions_provider = nil
```

<Warning>
  Using `"copilot"` for auto-suggestions can be expensive. Consider increasing `suggestion.debounce` if enabling.
</Warning>

**Source:** lua/avante/config.lua:37-40

***

### memory\_summary\_provider

Provider for memory summarization.

* **Type:** `string | nil`
* **Default:** `nil`

**Source:** lua/avante/config.lua:41

***

### tokenizer

Tokenizer for counting tokens and encoding text.

* **Type:** `"tiktoken" | "hf"`
* **Default:** `"tiktoken"`

```lua theme={null}
tokenizer = "tiktoken"
```

**Source:** lua/avante/config.lua:42-48

***

### system\_prompt

Custom system prompt for AI.

* **Type:** `string | function | nil`
* **Default:** `nil`

```lua theme={null}
system_prompt = nil
-- Or as a function
system_prompt = function()
  return "You are an expert programmer."
end
```

**Source:** lua/avante/config.lua:49-50

***

### override\_prompt\_dir

Override directory for custom prompts.

* **Type:** `string | function | nil`
* **Default:** `nil`

**Source:** lua/avante/config.lua:51-52

***

### instructions\_file

Project-specific instruction file.

* **Type:** `string`
* **Default:** `"avante.md"`

```lua theme={null}
instructions_file = "avante.md"
```

**Source:** lua/avante/config.lua:27

***

## Rules Configuration

Configuration for project and global rules.

### rules.project\_dir

Project-specific rules directory (relative path).

* **Type:** `string | nil`
* **Default:** `nil`

**Source:** lua/avante/config.lua:53-56

***

### rules.global\_dir

Global rules directory (absolute path).

* **Type:** `string | nil`
* **Default:** `nil`

**Source:** lua/avante/config.lua:53-56

***

## RAG Service Configuration

Retrieval-Augmented Generation service settings.

### rag\_service.enabled

Enable RAG service.

* **Type:** `boolean`
* **Default:** `false`

**Source:** lua/avante/config.lua:57-78

***

### rag\_service.host\_mount

Host mount path for RAG service.

* **Type:** `string`
* **Default:** `os.getenv("HOME")`

***

### rag\_service.runner

Runner for RAG service.

* **Type:** `"docker" | "nix"`
* **Default:** `"docker"`

***

### rag\_service.image

Docker image for RAG service.

* **Type:** `string`
* **Default:** `"quay.io/yetoneful/avante-rag-service:0.0.11"`

***

### rag\_service.llm

LLM configuration for RAG.

* **Type:** `table`
* **Fields:**
  * `provider` (string) - LLM provider (default: `"openai"`)
  * `endpoint` (string) - API endpoint
  * `api_key` (string) - Environment variable name for API key
  * `model` (string) - Model name
  * `extra` (any|nil) - Extra configuration

***

### rag\_service.embed

Embedding model configuration.

* **Type:** `table`
* **Fields:** Same as `rag_service.llm`

***

### rag\_service.docker\_extra\_args

Extra Docker arguments.

* **Type:** `string`
* **Default:** `""`

**Source:** lua/avante/config.lua:57-78

***

## Web Search Engine Configuration

### web\_search\_engine.provider

Web search provider.

* **Type:** `string`
* **Default:** `"tavily"`

**Built-in providers:** `"tavily"`, `"serpapi"`, `"searchapi"`, `"google"`, `"kagi"`, `"brave"`, `"searxng"`

**Source:** lua/avante/config.lua:79-245

***

### web\_search\_engine.proxy

HTTP proxy for web search.

* **Type:** `string | nil`
* **Default:** `nil`

***

## ACP Providers Configuration

Agent Client Protocol providers.

### acp\_providers

Configuration for ACP providers.

* **Type:** `table`
* **Default providers:**
  * `gemini-cli`
  * `claude-code`
  * `goose`
  * `codex`
  * `opencode`
  * `kimi-cli`

**Example:**

```lua theme={null}
acp_providers = {
  ["gemini-cli"] = {
    command = "gemini",
    args = { "--experimental-acp" },
    env = {
      NODE_NO_WARNINGS = "1",
      GEMINI_API_KEY = os.getenv("GEMINI_API_KEY"),
    },
    auth_method = "gemini-api-key",
  },
}
```

**Source:** lua/avante/config.lua:247-290

***

## Providers Configuration

### providers

AI provider configurations.

* **Type:** `table<string, table>`

**Default providers:**

* `openai` - OpenAI (GPT-4, etc.)
* `copilot` - GitHub Copilot
* `azure` - Azure OpenAI
* `claude` - Anthropic Claude
* `bedrock` - AWS Bedrock
* `gemini` - Google Gemini
* `vertex` - Google Vertex AI
* `cohere` - Cohere
* `ollama` - Ollama (local models)
* `watsonx_code_assistant` - IBM watsonx
* `vertex_claude` - Vertex AI Claude
* `mistral` - Mistral AI

**Provider schema:**

```lua theme={null}
providers = {
  openai = {
    endpoint = "https://api.openai.com/v1",
    model = "gpt-4o",
    timeout = 30000,
    context_window = 128000,
    use_response_api = false,
    support_previous_response_id = true,
    extra_request_body = {
      temperature = 0.75,
      max_completion_tokens = 16384,
      reasoning_effort = "medium",
    },
  },
}
```

**Source:** lua/avante/config.lua:293-514

***

### Provider Inheritance

Providers can inherit from other providers:

```lua theme={null}
providers = {
  ["claude-haiku"] = {
    __inherited_from = "claude",
    model = "claude-3-5-haiku-20241022",
  },
}
```

**Source:** lua/avante/config.lua:441-449

***

## Dual Boost Configuration

Experimental dual-provider mode.

### dual\_boost.enabled

* **Type:** `boolean`
* **Default:** `false`

### dual\_boost.first\_provider

* **Type:** `string`
* **Default:** `"openai"`

### dual\_boost.second\_provider

* **Type:** `string`
* **Default:** `"claude"`

### dual\_boost.prompt

Prompt template for combining responses.

* **Type:** `string`
* **Default:** Template for merging two outputs

### dual\_boost.timeout

* **Type:** `number`
* **Default:** `60000`

**Source:** lua/avante/config.lua:516-531

***

## Behaviour Configuration

### behaviour.auto\_focus\_sidebar

* **Type:** `boolean`
* **Default:** `true`

### behaviour.auto\_suggestions

* **Type:** `boolean`
* **Default:** `false`

### behaviour.auto\_suggestions\_respect\_ignore

* **Type:** `boolean`
* **Default:** `false`

### behaviour.auto\_set\_highlight\_group

* **Type:** `boolean`
* **Default:** `true`

### behaviour.auto\_set\_keymaps

* **Type:** `boolean`
* **Default:** `true`

### behaviour.auto\_apply\_diff\_after\_generation

* **Type:** `boolean`
* **Default:** `false`

### behaviour.jump\_result\_buffer\_on\_finish

* **Type:** `boolean`
* **Default:** `false`

### behaviour.support\_paste\_from\_clipboard

* **Type:** `boolean`
* **Default:** Auto-detected based on img-clip availability

### behaviour.minimize\_diff

* **Type:** `boolean`
* **Default:** `true`

### behaviour.enable\_token\_counting

* **Type:** `boolean`
* **Default:** `true`

### behaviour.use\_cwd\_as\_project\_root

* **Type:** `boolean`
* **Default:** `false`

### behaviour.auto\_focus\_on\_diff\_view

* **Type:** `boolean`
* **Default:** `false`

### behaviour.auto\_approve\_tool\_permissions

* **Type:** `boolean | string[]`
* **Default:** `true`

**Options:**

* `true` - Auto-approve all tools
* `false` - Prompt for all tools
* `["bash", "str_replace"]` - Auto-approve specific tools

### behaviour.auto\_check\_diagnostics

* **Type:** `boolean`
* **Default:** `true`

### behaviour.allow\_access\_to\_git\_ignored\_files

* **Type:** `boolean`
* **Default:** `false`

### behaviour.enable\_fastapply

* **Type:** `boolean`
* **Default:** `false`

### behaviour.include\_generated\_by\_commit\_line

* **Type:** `boolean`
* **Default:** `false`

### behaviour.auto\_add\_current\_file

* **Type:** `boolean`
* **Default:** `true`

### behaviour.confirmation\_ui\_style

* **Type:** `"popup" | "inline_buttons"`
* **Default:** `"inline_buttons"`

### behaviour.acp\_follow\_agent\_locations

* **Type:** `boolean`
* **Default:** `true`

**Source:** lua/avante/config.lua:545-572

***

## Prompt Logger Configuration

### prompt\_logger.enabled

* **Type:** `boolean`
* **Default:** `true`

### prompt\_logger.log\_dir

* **Type:** `string`
* **Default:** `vim.fn.stdpath("cache")`

### prompt\_logger.max\_entries

* **Type:** `number`
* **Default:** `100`

### prompt\_logger.next\_prompt

Keymaps for navigating prompts.

* **Type:** `table`
* **Default:** `{ normal = "<C-n>", insert = "<C-n>" }`

### prompt\_logger.prev\_prompt

* **Type:** `table`
* **Default:** `{ normal = "<C-p>", insert = "<C-p>" }`

**Source:** lua/avante/config.lua:573-585

***

## History Configuration

### history.max\_tokens

* **Type:** `number`
* **Default:** `4096`

### history.carried\_entry\_count

* **Type:** `number | nil`
* **Default:** `nil`

### history.storage\_path

* **Type:** `string`
* **Default:** `vim.fn.stdpath("state") .. "/avante"`

### history.paste

Paste image configuration.

* **Type:** `table`
* **Fields:**
  * `extension` (string) - Default: `"png"`
  * `filename` (string) - Default: `"pasted-%Y-%m-%d-%H-%M-%S"`

**Source:** lua/avante/config.lua:586-594

***

## Highlights Configuration

### highlights.diff.current

Highlight group for current version.

* **Type:** `string | nil`
* **Default:** `nil`

### highlights.diff.incoming

Highlight group for incoming changes.

* **Type:** `string | nil`
* **Default:** `nil`

**Source:** lua/avante/config.lua:595-600

***

## Image Paste Configuration

### img\_paste.url\_encode\_path

* **Type:** `boolean`
* **Default:** `true`

### img\_paste.template

Markdown template for pasted images.

* **Type:** `string`
* **Default:** `"\nimage: $FILE_PATH\n"`

**Source:** lua/avante/config.lua:601-604

***

## Mappings Configuration

See [Keymaps](/api/keymaps) for complete keymap documentation.

**Source:** lua/avante/config.lua:605-681

***

## Windows Configuration

### windows.position

Sidebar position.

* **Type:** `"right" | "left" | "top" | "bottom" | "smart"`
* **Default:** `"right"`

### windows.fillchars

* **Type:** `string`
* **Default:** `"eob: "`

### windows.wrap

* **Type:** `boolean`
* **Default:** `true`

### windows.width

Sidebar width percentage.

* **Type:** `number`
* **Default:** `30`

### windows.height

Sidebar height percentage.

* **Type:** `number`
* **Default:** `30`

### windows.sidebar\_header

Sidebar header configuration.

* **Type:** `table`
* **Fields:**
  * `enabled` (boolean) - Default: `true`
  * `align` ("left"|"center"|"right") - Default: `"center"`
  * `rounded` (boolean) - Default: `true`
  * `include_model` (boolean) - Default: `false`

### windows.spinner

Spinner animations.

* **Type:** `table`
* **Fields:**
  * `editing` (string\[]) - Editing spinner characters
  * `generating` (string\[]) - Generating spinner characters
  * `thinking` (string\[]) - Thinking spinner characters

### windows.input

Input window configuration.

* **Type:** `table`
* **Fields:**
  * `prefix` (string) - Default: `"> "`
  * `height` (number) - Default: `8`

### windows.selected\_files

* **Type:** `table`
* **Fields:**
  * `height` (number) - Default: `6`

### windows.edit

Edit window configuration.

* **Type:** `table`
* **Fields:**
  * `border` (string\[]) - Default: All spaces
  * `start_insert` (boolean) - Default: `true`

### windows.ask

Ask window configuration.

* **Type:** `table`
* **Fields:**
  * `floating` (boolean) - Default: `false`
  * `border` (string\[]) - Default: All spaces
  * `start_insert` (boolean) - Default: `true`
  * `focus_on_apply` ("ours"|"theirs") - Default: `"ours"`

**Source:** lua/avante/config.lua:683-758

***

## Diff Configuration

### diff.autojump

Auto-jump to first conflict.

* **Type:** `boolean`
* **Default:** `true`

### diff.override\_timeoutlen

Override timeoutlen when hovering over diff.

* **Type:** `number`
* **Default:** `500`

**Source:** lua/avante/config.lua:760-766

***

## Selection Configuration

### selection.enabled

Enable selection mode.

* **Type:** `boolean`
* **Default:** `true`

### selection.hint\_display

When to show hints.

* **Type:** `"delayed" | "immediate" | "none"`
* **Default:** `"delayed"`

**Source:** lua/avante/config.lua:772-775

***

## Repo Map Configuration

### repo\_map.ignore\_patterns

Patterns to ignore.

* **Type:** `string[]`
* **Default:** `{ "%.git", "%.worktree", "__pycache__", "node_modules" }`

### repo\_map.negate\_patterns

Negate ignore patterns.

* **Type:** `string[]`
* **Default:** `{}`

**Source:** lua/avante/config.lua:777-780

***

## File Selector Configuration

### file\_selector.provider

File selector provider.

* **Type:** `string | nil`
* **Default:** `nil`

### file\_selector.provider\_opts

Provider-specific options.

* **Type:** `table`
* **Default:** `{}`

**Source:** lua/avante/config.lua:782-786

***

## Selector Configuration

### selector.provider

UI selector provider.

* **Type:** `"native" | "fzf_lua" | "mini_pick" | "snacks" | "telescope" | function`
* **Default:** `"native"`

### selector.provider\_opts

Provider-specific options.

* **Type:** `table`
* **Default:** `{}`

### selector.exclude\_auto\_select

Items to exclude from auto-selection.

* **Type:** `string[]`
* **Default:** `{}`

**Source:** lua/avante/config.lua:787-793

***

## Input Configuration

### input.provider

Input provider.

* **Type:** `"native" | "dressing" | "snacks" | function`
* **Default:** `"native"`

### input.provider\_opts

Provider-specific options.

* **Type:** `table`
* **Default:** `{}`

**Source:** lua/avante/config.lua:794-797

***

## Suggestion Configuration

### suggestion.debounce

Debounce time in milliseconds.

* **Type:** `number`
* **Default:** `600`

### suggestion.throttle

Throttle time in milliseconds.

* **Type:** `number`
* **Default:** `600`

**Source:** lua/avante/config.lua:798-801

***

## Custom Tools & Commands

### disabled\_tools

List of disabled tools.

* **Type:** `string[]`
* **Default:** `{}`

### custom\_tools

Custom LLM tools.

* **Type:** `table[] | function`
* **Default:** `{}`

### slash\_commands

Custom slash commands.

* **Type:** `table[]`
* **Default:** `{}`

### shortcuts

Custom prompt shortcuts.

* **Type:** `table[]`
* **Default:** `{}`

**Source:** lua/avante/config.lua:802-808

***

## Complete Example

```lua theme={null}
require('avante').setup({
  -- Core
  debug = false,
  mode = "agentic",
  provider = "claude",
  
  -- Providers
  providers = {
    claude = {
      endpoint = "https://api.anthropic.com",
      model = "claude-sonnet-4-5-20250929",
      timeout = 30000,
      extra_request_body = {
        temperature = 0.75,
        max_tokens = 64000,
      },
    },
  },
  
  -- Behaviour
  behaviour = {
    auto_suggestions = true,
    auto_set_keymaps = true,
    auto_apply_diff_after_generation = false,
  },
  
  -- Windows
  windows = {
    position = "right",
    width = 30,
    sidebar_header = {
      enabled = true,
      align = "center",
    },
  },
  
  -- See full schema above for all options
})
```
