What is Avante.nvim?
Avante.nvim brings a Cursor-style AI coding experience to Neovim — agentic, multi-step edits driven from the editor. It lets you declare custom providers that inherit from the built-in openai provider, so a Tokonomix endpoint drops straight in.
- Agentic edits and AI chat inside Neovim, in the spirit of Cursor.
- Custom providers use
__inherited_from = "openai"with anendpointandmodel. - Reads the key from the variable named in
api_key_name. - Open source; configured in Lua.
Why route Avante.nvim through Tokonomix?
- One provider entry, 130+ models for Avante’s agentic edits.
- Point it at
tokonomix-consensusto cross-check a risky refactor before it is applied; a direct slug for routine edits. - Per-call spend caps bound an agentic session; region / origin routing for regulated repos.
- Reference the key from an environment variable, not the config file.
Connect Tokonomix to Avante.nvim
Declare a Tokonomix provider that inherits from openai, with the Tokonomix endpoint, a default model and the env-var name in api_key_name.
require("avante").setup({
provider = "tokonomix",
providers = {
tokonomix = {
__inherited_from = "openai",
endpoint = "https://tokonomix.ai/api/v1",
-- Opt-in (planning/review only, no tool-calling): model = "tokonomix-consensus"
model = "anthropic/claude-sonnet-4-6",
api_key_name = "TOKONOMIX_API_KEY",
},
},
})
-- export TOKONOMIX_API_KEY=tok_live_your-keyVerify it works
- Export
TOKONOMIX_API_KEY, add the provider to your Neovim config and select it. - Ask Avante to make a small, reversible edit.
- Confirm the call and token usage in your Tokonomix dashboard.