bug: Provider and input provider not applied
Describe the bug
When configuring avante.nvim with provider = "gemini" and input.provider = "snacks" in opts, the plugin does not apply these settings automatically at startup. Instead, I have to manually run :AvanteSwitchProvider gemini and :AvanteSwitchSelectorProvider snacks after Neovim starts. The subprovider model for copilot is applied, but the main provider and input are not, which indicates the configuration is only partially loaded.
To reproduce
- Set the following in your lazy.nvim plugin config:
opts = {
provider = "gemini",
providers = {
copilot = { model = "gpt-4.1" },
gemini = { model = "gemini-2.5-pro" },
},
input = {
provider = "snacks",
provider_opts = {
title = "Avante Input",
icon = " ",
},
},
}
- Start Neovim.
- Avante.nvim loads with default provider and input; only the copilot model is applied.
- Run :AvanteSwitchProvider gemini and :AvanteSwitchSelectorProvider snacks manually; settings are then applied as expected.
Expected behavior
The plugin should apply both the main provider and input provider from opts automatically on startup, without manual intervention.
Installation method
Use lazy.nvim:
{
"yetone/avante.nvim",
event = "VeryLazy",
version = false, -- set this if you want to always pull the latest change
opts = {
provider = "gemini",
providers = {
copilot = { model = "gpt-4.1" },
gemini = { model = "gemini-2.5-pro" },
},
input = {
provider = "snacks",
provider_opts = {
title = "Avante Input",
icon = " ",
},
},
}
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
build = "make",
-- build = "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false" -- for windows
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
},
}
Environment
- Neovim version: 0.10+
- avante.nvim version: latest
- OS: kubuntu 24.04
- Lazy.nvim
Repro
vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()
require("lazy.minit").repro({
spec = {
-- add any other plugins here
},
})
i have the same issue , i always have to manually switch from copilot to the provider that is actually configured in my config
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
The error persists