avante.nvim icon indicating copy to clipboard operation
avante.nvim copied to clipboard

bug: Provider and input provider not applied

Open rafael-jurado-gh opened this issue 2 months ago • 1 comments

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

  1. 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 = " ",
    },
  },
}
  1. Start Neovim.
  2. Avante.nvim loads with default provider and input; only the copilot model is applied.
  3. 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
  },
})

rafael-jurado-gh avatar Oct 20 '25 13:10 rafael-jurado-gh

i have the same issue , i always have to manually switch from copilot to the provider that is actually configured in my config

ogoshi2000 avatar Nov 05 '25 13:11 ogoshi2000

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.

github-actions[bot] avatar Dec 06 '25 02:12 github-actions[bot]

The error persists

rafael-jurado-gh avatar Dec 10 '25 11:12 rafael-jurado-gh