Describe the bug
Hi,
I am trying to use gemini cli as an ACP provider, which works with ollama for autosuggestion. When I have both of the suggestions are not working. If I use gemini for both, it works as expected.
To reproduce
Configure Avante with auto_suggestion with ollama and provider to gemini-cli.
Expected behavior
I expect the auto suggestion inline to call ollama and the other functionalities and chat to use gemini-cli.
Installation method
Use lazy.nvim:
-- Customize Avante
---@type LazySpec
return {
"yetone/avante.nvim",
-- if you want to build from source then do `make BUILD_FROM_SOURCE=true`
-- ⚠️ must add this setting! ! !
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
---@module 'avante'
---@type avante.Config
opts = {
-- add any opts here
-- this file can contain specific instructions for your project
instructions_file = "avante.md",
-- mode = "legacy",
-- Use the Gemini CLI for the main chat/agent logic
provider = "gemini-cli",
-- Use Local Ollama for high-speed, zero-latency autocomplete
auto_suggestions_provider = "ollama",
behaviour = {
auto_suggestions = false, -- Enable ghost text
-- Force Avante to be aggressive with local suggestions
auto_suggestions_respect_ignore = false,
-- Add this to prevent cmp from blocking ghost text
minimize_diff = true,
},
acp_providers = {
["gemini-cli"] = {
command = "gemini",
args = { "--experimental-acp", "--no-suggestions" },
env = {
NODE_NO_WARNINGS = "1",
HOME = os.getenv "HOME",
GEMINI_API_KEY = os.getenv "AVANTE_GEMINI_API_KEY",
GEMINI_DEFAULT_AUTH_TYPE = "oauth-personal",
},
auth_method = "oauth-personal",
},
},
providers = {
-- Configure Ollama for the MacBook M5 Neural Accelerator
ollama = {
endpoint = "http://127.0.0.1:11434",
model = "qwen3.5:4b", -- Optimized for M5 unified memory
timeout = 30000,
is_env_set = function() return true end,
-- CRITICAL: Avante checks for this key name even if is_env_set is true
api_key_name = "",
extra_request_body = {
options = {
num_ctx = 32768,
num_thread = 10, -- Matches M5 core count for peak performance
},
},
},
},
selector = {
exclude_auto_select = { "NvimTree" },
},
-- Tweak the suggestion timing for M5 speed
suggestions = {
debounce = 400, -- Suggestions appear 400ms after you stop typing
request_timeout = 2000,
},
},
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"nvim-mini/mini.pick", -- for file_selector provider mini.pick
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
"stevearc/dressing.nvim", -- for input provider dressing
"folke/snacks.nvim", -- for input provider snacks
"nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
{
-- Make sure to set this up properly if you have lazy=true
"MeanderingProgrammer/render-markdown.nvim",
opts = {
file_types = { "markdown", "Avante" },
},
ft = { "markdown", "Avante" },
},
keys = {
{
"<leader>a+",
function()
local tree_ext = require "avante.extensions.nvim_tree"
tree_ext.add_file()
end,
desc = "Select file in NvimTree",
ft = "NvimTree",
},
{
"<leader>a-",
function()
local tree_ext = require "avante.extensions.nvim_tree"
tree_ext.remove_file()
end,
desc = "Deselect file in NvimTree",
ft = "NvimTree",
},
},
},
}
Environment
NVIM v0.11.6
Macbook Pro M5 Tahoe 26.3.
AstroNvim v5.3.15
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
},
})
Describe the bug
Hi,
I am trying to use gemini cli as an ACP provider, which works with ollama for autosuggestion. When I have both of the suggestions are not working. If I use gemini for both, it works as expected.
To reproduce
Configure Avante with auto_suggestion with ollama and provider to gemini-cli.
Expected behavior
I expect the auto suggestion inline to call ollama and the other functionalities and chat to use gemini-cli.
Installation method
Use lazy.nvim:
Environment
NVIM v0.11.6
Macbook Pro M5 Tahoe 26.3.
AstroNvim v5.3.15
Repro