Use avante.nvim with Shannon
Add Shannon to avante.nvim as a provider that inherits from openai, and its sidebar, edits and agent tools run on Shannon models.
- From the avante.nvim docs, Nov 7, 2026
- OpenAI Chat Completions
- About 4 min
About avante.nvim
avante.nvim is a Neovim plugin that brings a Cursor-style AI sidebar into the editor: ask about code, review suggested diffs and apply them, and in agentic mode let the model read files, edit and run commands with tools. A provider can inherit from avante's built-in openai provider, so one short entry points it at Shannon models.
What you need
- A Shannon API key
- Keys & usage
- Base URL
-
https://api.shannon-ai.com/v1Endpoint:/v1/chat/completions - Every snippet below follows your choice.
Set it up
-
Export your key
avante reads the variable named in
api_key_name, tryingAVANTE_SHANNON_API_KEYfirst. Set it in your shell profile so every Neovim session sees it.Shellexport SHANNON_API_KEY=YOUR_API_KEY -
Add the Shannon provider
In avante's
opts(the lazy.nvim spec from the README, with itsbuildand dependencies), add a provider that inherits fromopenaiand make it the default.endpointis the base URL; avante adds/chat/completions.lazy.nvim{ "yetone/avante.nvim", -- keep build, event and dependencies from the README opts = { provider = "shannon", mode = "agentic", providers = { shannon = { __inherited_from = "openai", endpoint = "https://api.shannon-ai.com/v1", api_key_name = "SHANNON_API_KEY", model = "Kimi-K3-uncensored-NVFP4", context_window = 1022976, extra_request_body = { max_tokens = 262144, }, }, }, }, } -
Ask
Open the sidebar with
<Leader>aa(or:AvanteAsk), ask about the current file, and apply the suggested diff witha(at the cursor) orA(all).
Check that it works
Send: Add a docstring to the bark() function in this file.
You should see: avante shows a diff in the sidebar; a or A applies it.
Models that fit avante.nvim
Every id below meets what avante.nvim needs. The first one is the default in the snippets.
| Model id | Context window | Max output | Image input |
|---|---|---|---|
Kimi-K3-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
shannon-coder-1 | 131,072 | 65,536 | No |
Kimi-K3.1-Pro-uncensored-NVFP4 | 1,022,976 | 262,144 | Yes |
Kimi-K3-uncensored-3BIT-REAP | 225,280 | 225,280 | Yes |
shannon-3 | 196,608 | 65,536 | Yes |
Model settings
avante.nvim asks for these values. They follow the model you picked.
| Setting | Value | Why |
|---|---|---|
context_window | 1022976 | How many tokens avante may send. |
extra_request_body.max_tokens | 262144 | The longest answer. |
Good to know
- Agentic mode, the default, needs tool calls; every model in the picker has them.
- With
max_tokensinextra_request_body, avante sendsmax_tokensinstead of the inheritedmax_completion_tokens. use_response_api = trueon the provider sends requests to/v1/responses; Shannon serves both.- The optional RAG service and Fast Apply use embedding and apply models that Shannon does not serve.
Tips
:AvanteSwitchProvider shannonswitches a running session to Shannon; add--saveto keep the choice.<Leader>a?opens the model picker and:AvanteModelsshows the model list.- Put project rules in
avante.mdat the project root; avante includes it with every request. - Type
/compactin the input to shorten a long history and save tokens;/clearstarts over. - Set
mode = "legacy"to get suggestions without tool runs, ordisable_tools = trueon the provider.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "shannon: API key is not set" | Neovim started without SHANNON_API_KEY in its environment. | Export the variable in your shell profile and restart Neovim. |
| 404 Not Found | endpoint lacks /v1 or ends in /chat/completions. | Use endpoint = "https://api.shannon-ai.com/v1". |
401 Unauthorized | The key is missing, mistyped or rotated. | Copy the key again from Keys & usage; it starts with sk-. |
context_length_exceeded / "prompt is too long" | The conversation is longer than the model's window. | Start a new chat, let the tool compact it, or pick a model with a larger window. |
insufficient_quota | Your balance cannot pay for the request. | Top up or change plan; the request is not retried by itself. |
Questions
Does avante.nvim work with Shannon?
Yes: a provider with __inherited_from = "openai" and endpoint = "https://api.shannon-ai.com/v1".
Can I keep my other providers?
Yes. Add shannon next to them under providers and switch with :AvanteSwitchProvider.