bug: After updating avante.nvim to the latest version, message replies ending without finishing.
Describe the bug
Hello,
After updating avante.nvim to the latest version, message replies ending without finishing.
Interestingly, when I switched to the following commit:
commit = f9aa75459d403d9e963ef2647c9791e0dfc9e5f9
Everything works perfectly without any issues.
Here is my configuration:
return {
{
"yetone/avante.nvim",
event = "VeryLazy",
commit = "f9aa75459d403d9e963ef2647c9791e0dfc9e5f9",
opts = {
provider = "copilot",
copilot = {
model = "claude-3.7-sonnet",
endpoint = "https://api.githubcopilot.com",
allow_insecure = false,
timeout = 10 * 60 * 1000,
temperature = 0,
max_completion_tokens = 80000,
max_tokens = 80000,
reasoning_effort = "high",
},
behaviour = {
enable_cursor_planning_mode = true,
enable_claude_text_editor_tool_mode = true,
enable_token_counting = false,
},
windows = {
width = 40,
input = {
prefix = "",
height = 12,
},
},
},
build = "make",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
"echasnovski/mini.pick",
"nvim-telescope/telescope.nvim",
"hrsh7th/nvim-cmp",
"ibhagwan/fzf-lua",
"nvim-tree/nvim-web-devicons",
"zbirenbaum/copilot.lua",
{
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
},
},
}
Could you please help investigate this issue? Let me know if you need any additional details. Thank you for your assistance!
To reproduce
No response
Expected behavior
No response
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 = {
-- add any opts here
},
-- 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-treesitter/nvim-treesitter",
"stevearc/dressing.nvim",
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
},
}
neovim version
Environment
NVIM v0.11.0 Build type: Release LuaJIT 2.1.1744318430
Darwin HIH-L-10836.local 24.4.0 Darwin Kernel Version 24.4.0: Fri Apr 11 18:33:47 PDT 2025; root:xnu-11417.101.15~117/RELEASE_ARM64_T6000 arm64
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'm seeing the same.
After some more digging this only seems to be an issue with the copilot provider for me. If change to either openai or claude the tools seem to behave better
for me even this commit commit = f9aa75459d403d9e963ef2647c9791e0dfc9e5f9 isn't working, it stops midway. Using copilot/claude-3.7-sonnet
commit = b2064a8f40cbd10ddd3ea9d82f0bdb2bcaf2f152
the same.
having the same issue with copilot/claude-3.7-sonnet
same issue here with openrouter anthropic/claude-3.7-sonnet
same issue with copilot/claude-3.7-sonnet
Same issue here with the vertex provider using gemini-2.5-pro-preview
I've spent something like ten hours trying to fix this issue, but no luck. I'm now seeing it in both Vertex and Gemini providers. Has anyone found a workaround?
That's become the case with all models I use, all suppliers for almost a week now.
I've been dealing with this issue for about two weeks now too. It takes repeating the prompt multiple to work - and sometimes never works.
Yeah, it's a large enough issue for me to stop using Neovim as my primary IDE and switch to RooCode until it's fixed, unfortunately. As mentioned in my past comment, I've already devoted over ten hours trying to find a fix, but have failed thus far, so I at least tried to fix it before reality set in and work deadlines loomed, forcing me to use an inferior IDE 🥲
I was experiencing this as well with copilot/sonnet-3.5/7 but the issue has gone away after switching to the claude provider.
Does anyone have a minimal reproducible example? I wanted to take a swing at it but every time I try to reproduce it - it just works. For me it seems to happen on longer chats, but I couldn't distill it to something that would use minimal amount of tokens and be consistent.
It definitely feels like a provider rate limiting thing since the model is the one not invoking a tool call. I’ve also seen the same behavior in codecompanion and the vscode copilot so I don’t necessarily think it is an avante bug.
For me the message pretty much always ends with a colon when it happens and I can’t think of another legitimate reason for a message from the llm to end with a colon. Thinking out loud here, can we consider a message that ends with a colon an “incomplete message” and just send another user message to coax the llm to continue?
I’ve been spamming “ok” to it when it pauses and it seems to continue on very reliably. There are certainly billing implications here given the coming changes to copilot usage limits so it would definitely need to be configurable.
I've found a relatively simple query that consistently fails for me:
Create a new file called test.txt in testdir/newdir with the content "Hello World". Make sure to check if the directories exist first.
The result:
From what I've found out so far it's not even trying to call the tool after the last sentence.
same issue with copilot/claude-3.7-sonnet
sometimes i use
I'm also getting the same issue with:
provider = 'copilot',
copilot = { model = 'claude-3.7-sonnet' },
The latest version should have resolved this issue, you can update and test it.
The latest version should have resolved this issue, you can update and test it.
the same
The latest version should have resolved this issue, you can update and test it.
the same
Which provider and model are you using?
I'm also getting the same issue with:
provider = 'copilot', copilot = { model = 'claude-3.7-sonnet' },
The copilot's claude-3.7-sonnet cannot solve this problem because: https://github.com/yetone/avante.nvim/issues/2093#issuecomment-2917351508
The latest version should have resolved this issue, you can update and test it.
the same
Which provider and model are you using?
copilot, claude-3.7-sonnet
I'm also getting the same issue with: provider = 'copilot', copilot = { model = 'claude-3.7-sonnet' },
The copilot's claude-3.7-sonnet cannot solve this problem because: #2093 (comment)
commit = f9aa75459d403d9e963ef2647c9791e0dfc9e5f9 Everything works perfectly without any issues.
The latest version should have resolved this issue, you can update and test it.
the same
Which provider and model are you using?
copilot, claude-3.7-sonnet
I'm also getting the same issue with: provider = 'copilot', copilot = { model = 'claude-3.7-sonnet' },
The copilot's claude-3.7-sonnet cannot solve this problem because: #2093 (comment)
commit = f9aa75459d403d9e963ef2647c9791e0dfc9e5f9 Everything works perfectly without any issues.
The avante version of the commit you quoted actually has a big problem, that is, the agent mode is not correct, because it does not carry the historical tool calling record, resulting in the LLM missing many necessary historical information.
I still can't get tools to work, seeing the following exception when I try:
Error 12:20:07 msg_show.lua_error Error executing vim.schedule lua callback: ...hare/nvim/lazy/avante.nvim/lua/avante/llm_tools/init.lua:37: attempt to concatenate field 'command' (a nil value)
stack traceback:
...hare/nvim/lazy/avante.nvim/lua/avante/llm_tools/init.lua:37: in function 'func'
...hare/nvim/lazy/avante.nvim/lua/avante/llm_tools/init.lua:1268: in function 'process_tool_use'
...on/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua:690: in function 'on_stop'
...re/nvim/lazy/avante.nvim/lua/avante/providers/openai.lua:472: in function 'parse_response'
...on/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua:367: in function 'parse_stream_data'
...on/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua:443: in function <...on/.local/share/nvim/lazy/avante.nvim/lua/avante/llm.lua:439>
This issue no longer exists in the latest version.
the same