Skip to main content
Avante.nvim supports multiple AI providers including Claude, OpenAI, Gemini, Azure, Copilot, and many more. This guide covers how to configure each provider.

Provider Configuration Structure

string
default:"claude"
The default provider to use. Available options:
  • claude - Anthropic Claude (default)
  • openai - OpenAI GPT models
  • azure - Azure OpenAI
  • gemini - Google Gemini
  • vertex - Google Vertex AI
  • copilot - GitHub Copilot
  • cohere - Cohere
  • bedrock - Amazon Bedrock
  • ollama - Ollama (local models)
  • Custom provider names
table
Table containing provider-specific configurations. Each provider has its own configuration structure.

Claude (Anthropic)

API Authentication

Environment variable: ANTHROPIC_API_KEY or AVANTE_ANTHROPIC_API_KEY

Claude Pro/Max Subscription

To use your Claude Pro/Max subscription:
After setting auth_type = "max", re-open Neovim and the authentication process will start in your browser. Copy the provided code into the Neovim prompt.

Claude Model Variants

OpenAI

Environment variable: OPENAI_API_KEY or AVANTE_OPENAI_API_KEY

OpenAI Reasoning Models

For reasoning models (o1, o3), increase timeout and max tokens:

GPT-4o Mini

Azure OpenAI

Environment variable: AZURE_OPENAI_API_KEY or AVANTE_AZURE_OPENAI_API_KEY

Google Gemini

Environment variable: GEMINI_API_KEY or AVANTE_GEMINI_API_KEY

Google Vertex AI

GitHub Copilot

Copilot requires copilot.lua plugin to be installed and authenticated.

Amazon Bedrock

Bedrock Credentials

Option 1: Environment variable
Option 2: AWS credentials chain (AWS CLI, ~/.aws/profile, AWS SSO)
Bedrock requires the AWS CLI to be installed on your system.

Ollama (Local Models)

Ollama is disabled by default. You must provide an implementation for is_env_set to enable it.

Cohere

Environment variable: CO_API_KEY or AVANTE_CO_API_KEY

Alternative Providers

AIHub Mix

Moonshot (Kimi)

xAI (Grok)

Mistral

Qwen

Provider Inheritance

Use __inherited_from to reuse configuration from another provider:

Common Provider Options

string
API endpoint URL for the provider
string
Model name to use
number
default:"30000"
Request timeout in milliseconds. Increase for reasoning models.
number
Number of tokens to send for context
table
Additional parameters sent in the request body (temperature, max_tokens, etc.)
string
Environment variable name for the API key
boolean
default:"false"
Disable tool usage for this provider

Switching Providers

Switch providers at runtime:
Or use the keybinding (default <leader>a?):

Auto-Suggestions Provider

string | nil
default:"nil"
Separate provider for auto-suggestions. If nil, uses the main provider.
Auto-suggestions are high-frequency operations. Avoid using expensive providers like Copilot for auto-suggestions.

Disabling Tools

Some models don’t support tools. Disable them per provider:
Or disable specific tools globally:

Custom Providers

Create custom providers by following the OpenAI-compatible API format:
For more advanced custom providers, see the Custom Providers Wiki.