Describe the bug
When using `avante.nvim with an ACP provider, opening the Avante sidebar crashes if the following option is enabled:
windows = {
sidebar_header = {
include_model = true,
}
}
Error message:
E5108: Error executing lua: ...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:1006: attempt to index a nil value
stack traceback:
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:1006: in function 'render_header'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:1045: in function 'render_result'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:1479: in function 'on_mount'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:3249: in function 'render'
...local/share/nvim/lazy/avante.nvim/lua/avante/sidebar.lua:179: in function 'open'
...s/.local/share/nvim/lazy/avante.nvim/lua/avante/init.lua:445: in function 'open_sidebar'
...as/.local/share/nvim/lazy/avante.nvim/lua/avante/api.lua:157: in function 'ask'
...s/.local/share/nvim/lazy/avante.nvim/lua/avante/init.lua:137: in function <...s/.local/share/nvim/lazy/avante.nvim/lua/avante/init.lua:137>
To reproduce
- Configure
avante.nvim to use an ACP provider
- Enable the following option:
windows = {
sidebar_header = {
include_model = true,
}
}
- Open Neovim.
- Open the Avatne sidebar (
:AvanteAsk)
- Observe the error.
Expected behavior
The Avante sidebar should open normally.
Installation method
Use lazy.nvim:
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this if you want to always pull the latest change
opts = {
provider = "copilot-cli",
acp_providers = {
["copilot-cli"] = {
command = "copilot",
-- https://docs.github.com/en/copilot/reference/acp-server
args = {
"--acp",
"--stdio",
"--allow-all-tools",
"--deny-tool",
"shell(git push)",
"--model",
"gpt-5.4",
},
},
},
windows = {
sidebar_header = {
include_model = true,
},
},
},
-- 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",
"zbirenbaum/copilot.lua",
},
}
Environment
NVIM v0.11.6
Ubuntu 24.04.4 LTS
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 = {
-- { "LazyVim/LazyVim", import = "lazyvim.plugins" },
{
"yetone/avante.nvim",
event = "VeryLazy",
lazy = false,
version = false, -- set this if you want to always pull the latest change
opts = {
provider = "copilot-cli",
acp_providers = {
["copilot-cli"] = {
command = "copilot",
-- https://docs.github.com/en/copilot/reference/acp-server
args = {
"--acp",
"--stdio",
"--allow-all-tools",
"--deny-tool",
"shell(git push)",
"--model",
"gpt-5.4",
},
},
},
windows = {
sidebar_header = {
include_model = true,
},
},
},
-- 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",
"zbirenbaum/copilot.lua",
},
},
},
})
Describe the bug
When using `avante.nvim with an ACP provider, opening the Avante sidebar crashes if the following option is enabled:
Error message:
To reproduce
avante.nvimto use an ACP provider:AvanteAsk)Expected behavior
The Avante sidebar should open normally.
Installation method
Use lazy.nvim:
{ "yetone/avante.nvim", event = "VeryLazy", lazy = false, version = false, -- set this if you want to always pull the latest change opts = { provider = "copilot-cli", acp_providers = { ["copilot-cli"] = { command = "copilot", -- https://docs.github.com/en/copilot/reference/acp-server args = { "--acp", "--stdio", "--allow-all-tools", "--deny-tool", "shell(git push)", "--model", "gpt-5.4", }, }, }, windows = { sidebar_header = { include_model = true, }, }, }, -- 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", "zbirenbaum/copilot.lua", }, }Environment
NVIM v0.11.6
Ubuntu 24.04.4 LTS
Repro