{ ... }: { programs.nixvim.plugins.avante = { enable = true; settings = { provider = "ollama"; claude = { api_key_name = ""; }; openai = { api_key_name = ""; }; vendors = { ollama = { api_key_name = ""; endpoint = "http://localhost:11434/v1"; model = "hf.co/unsloth/DeepSeek-R1-Distill-Qwen-1.5B-GGUF"; temperature = "0.6"; parse_curl_args.__raw = '' function(opts, code_opts) return { url = opts.endpoint .. "/chat/completions", headers = { ["Accept"] = "application/json", ["Content-Type"] = "application/json", ["x-api-key"] = "ollama", }, body = { model = opts.model, messages = require("avante.providers").copilot.parse_messages(code_opts), max_tokens = opts.max_tokens, stream = true, }, } end''; parse_response_data.__raw = '' function(data_stream, event_state, opts) require("avante.providers").openai.parse_response(data_stream, event_state, opts) end''; }; }; mappings = { ask = "ca"; edit = "ce"; refresh = "cr"; focus = "cf"; toggle = { default = "ct"; debug = "cd"; hint = "ch"; suggestion = "cs"; repomap = "cR"; }; files = { add_current = "cc"; }; }; }; }; }