Skip to content
Avante.nvim logo

Avante.nvim via Tokonomix

Inherit the OpenAI provider against Tokonomix in Avante.nvim — give its Cursor-style agentic edits 130+ models and consensus on one key.

provider __inherited_from = "openai"Neovim pluginApache-2.0 · open sourceNeovim
Avante.nvim — Cursor-style AI coding for Neovim, via Tokonomix

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 an endpoint and model.
  • 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-consensus to 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-key

Verify 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.

Model selection

Which model and endpoint should my agent use?

Pick by what your agent does, then swap the model id any time — every model in the catalog works through the same key.

What your agent doesUse this
Edits files / calls tools and streams responses (most coding agents)An Anthropic model via the Anthropic endpoint (tools + streaming both work)
Calls tools but does not need streaming (any model)The OpenAI-compatible endpoint with a single model id
Wants tools and streaming on a non-Anthropic modelRun non-streaming for now — streaming tool-calls on other providers is not enabled yet
Plain chat, no toolsEither endpoint; streaming is fine
Wants a cross-model verdict (consensus) on a high-stakes answerSet model to tokonomix-consensus on the OpenAI-compatible endpoint — note: consensus rejects tool requests (no tool-calling)
Endpoint & API reference (technical)

anthropic-messages → https://tokonomix.ai/api/anthropic — tools ✓, streaming ✓ (use an Anthropic model). openai-completions → https://tokonomix.ai/api/v1 — tools ✓ (single-model passthrough), streaming with tools not yet enabled. Plain chat: streaming works on both. Consensus: openai-completions, model tokonomix-consensus, no tools. Swap the model id to any slug returned by GET /api/v1/models.

Browse all models →

Related agents