Claude is Anthropic’s family of AI models, known for their advanced reasoning capabilities and extended thinking modes. Avante.nvim supports both API key authentication and Claude Pro/Max subscription authentication.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.
Quick Start
API Key Authentication
Get your API key
Sign up at Anthropic Console and create an API key.
Claude Pro/Max Subscription
If you have a Claude Pro or Max subscription, you can authenticate using OAuth:Authenticate in browser
When you open Neovim, the authentication process will start in your browser.
If you previously had a different provider selected, run
:AvanteSwitchProvider claude to initiate authentication.Configuration
Basic Configuration
Available Models
Authentication Types
Environment Variables
Claude uses the following environment variables:| Variable | Scoped Version | Purpose |
|---|---|---|
ANTHROPIC_API_KEY | AVANTE_ANTHROPIC_API_KEY | API authentication |
When using
auth_type = "max", API keys are not required as OAuth is used instead.Advanced Features
Prompt Caching
Claude supports prompt caching to reduce costs and latency for repeated prompts:- System prompts
- Tool definitions
- The last text message in history
Extended Thinking
Claude models support extended thinking for complex reasoning tasks. This is automatically enabled when the model returns thinking content.Custom Endpoint
For self-hosted or proxy setups:Proxy Configuration
Rate Limiting
Claude automatically handles rate limiting by:- Detecting rate limit headers
- Calculating sleep time based on reset timestamps
- Pausing requests until limits reset
anthropic-ratelimit-tokens-remaininganthropic-ratelimit-tokens-resetanthropic-ratelimit-requests-reset
Troubleshooting
Authentication Failed
API Key Not Found
API Key Not Found
Ensure your API key is set in your environment:Restart Neovim after setting the variable.
OAuth Code Invalid
OAuth Code Invalid
If the OAuth code doesn’t work:
- Ensure you copied the entire code from the browser
- Try the authentication flow again
- Check that
auth_type = "max"is set correctly
Token Expired
Token Expired
OAuth tokens are automatically refreshed. If you see expiration errors:
- Wait a moment for auto-refresh
- Restart Neovim to trigger re-authentication
Quota Exceeded
If you see quota errors:Temperature Errors
Claude requires temperature between 0 and 1:Best Practices
Model Selection
- Sonnet 4.5: Best balance of speed and capability
- Opus 4: Maximum capability for complex tasks
- Haiku 3.5: Fastest, best for simple tasks
Token Management
- Use prompt caching for repeated contexts
- Set appropriate
max_tokenslimits - Monitor usage in Anthropic Console
Temperature Settings
0.0-0.3: Focused, deterministic responses0.4-0.7: Balanced creativity and consistency0.8-1.0: More creative and varied responses
OAuth vs API Key
- OAuth: For Claude Pro/Max subscribers
- API Key: For pay-per-use developers
- Both work with same models