Skip to main content
Avante.nvim supports multiple AI providers, giving you flexibility in choosing the best model for your workflow. You can easily switch between providers and configure them to suit your needs.

Available Providers

Switching Providers

During Runtime

You can switch providers at any time using the command:
Or use the keyboard shortcut:

In Configuration

Set the default provider in your configuration:

Provider Comparison

Performance

  • Fastest: Claude (Sonnet 4), Gemini (Flash)
  • Most Capable: Claude (Opus 4), OpenAI (GPT-4o)
  • Best for Reasoning: OpenAI (o1, o3-mini), Claude (with thinking)
  • Local/Private: Ollama

Context Window

  • Largest: Gemini (1M+ tokens)
  • Claude: 200K tokens
  • OpenAI: 128K tokens
  • Copilot: 64K tokens

Cost Considerations

  • Free Options: Ollama (local), Copilot (with subscription)
  • Pay-per-use: OpenAI, Claude, Gemini
  • Enterprise: Azure OpenAI, AWS Bedrock

API Key Management

Avante supports two methods for setting API keys: Isolate API keys specifically for Avante by prefixing with AVANTE_:

Global Keys

Use standard environment variable names:
Scoped keys (AVANTE_*) take precedence over global keys.

Provider Configuration Structure

All providers share a common configuration structure:

Common Options

  • endpoint: API endpoint URL
  • model: Model identifier
  • timeout: Request timeout in milliseconds
  • context_window: Maximum context size in tokens
  • api_key_name: Environment variable name for API key
  • extra_request_body: Provider-specific parameters
  • proxy: HTTP proxy URL (optional)
  • allow_insecure: Allow insecure connections (optional)

Advanced Features

Dual Boost Mode

Combine responses from two providers for enhanced quality:

Auto-Suggestions Provider

Use a different provider for auto-suggestions:
Auto-suggestions are high-frequency operations. Using expensive providers like Copilot can be costly.

Troubleshooting

Provider Not Working

  1. Check API Key: Ensure your API key is set correctly
  2. Verify Provider Setup: Check if the provider is configured
  3. Check Login Status: Ensure authentication succeeded

Rate Limiting

If you encounter rate limits:
  • Increase the timeout value
  • Reduce request frequency
  • Consider upgrading your API plan

Network Issues

For proxy or network problems:

Next Steps