fix nvim: upgrade avante.nvim and update providers format. and fix ollama api key

Provider configuration migration guide: <https://github.com/yetone/avante.nvim/wiki/Provider-configuration-migration-guide>
This commit is contained in:
Yuan Chiu 2025-06-03 23:14:19 +08:00
parent 7ef8a4275d
commit fa8b671872
Signed by: yuan
GPG Key ID: 50FBE4156404B98D

View File

@ -30,7 +30,7 @@ return {
{ "<C-A-i>", "<cmd>AvanteToggle<cr>", desc = "Avante Chat Toggle" },
},
opts = {
provider = "ollama",
providers = {
ollama = {
{{ if .ollamaKey -}}
api_key_name = "OLLAMA_API_KEY",
@ -38,8 +38,15 @@ return {
endpoint = {{ .ollamaUrl | quote }},
model = "qwen2.5-coder:7b",
disable_tools = true, -- Open-source models often do not support tools.
-- Fix: Always show `ollama: API key not set, continuing without authentication`
parse_api_key = function()
return vim.env.OLLAMA_API_KEY
end,
},
},
provider = "ollama",
behaviour = {
auto_suggestions = false, -- Experimental stage
auto_set_highlight_group = true,