diff --git a/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl b/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl index 7f413ee..a455e45 100644 --- a/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl +++ b/dot_config/nvim/exact_lua/exact_plugins/exact_components/ai.lua.tmpl @@ -30,16 +30,23 @@ return { { "", "AvanteToggle", desc = "Avante Chat Toggle" }, }, opts = { - provider = "ollama", - ollama = { - {{ if .ollamaKey -}} - api_key_name = "OLLAMA_API_KEY", - {{ end -}} - endpoint = {{ .ollamaUrl | quote }}, - model = "qwen2.5-coder:7b", - disable_tools = true, -- Open-source models often do not support tools. + providers = { + ollama = { + {{ if .ollamaKey -}} + api_key_name = "OLLAMA_API_KEY", + {{ end -}} + 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,