return { dir = vim.fn.expand("~/code/nvim-ai-assist"), name = "nvim_ai_assist", lazy = false, cmd = { "AI", "AIHealth", "AIRefreshContext" }, keys = { { "ai", ":AI", desc = "AI command (prompt)", mode = "n" }, { "aA", ":AI!", desc = "AI command (auto-execute)", mode = "n" }, { "ah", ":AIHealth", desc = "AI health + context stats", mode = "n" }, }, config = function() require("nvim_ai_assist").setup({ -- Active: Z.AI Coding Plan (uses ZAI_API_KEY from env) provider = "zai-coding", model = "glm-4.7", max_tokens = 300, temperature = 0.05, debug = true, -- writes request/response to ~/.cache/nvim/nvim_ai_assist.log; :AILog to view context = { enabled = true, max_chars = 1500, refresh_seconds = 60, }, -- Local LM Studio fallback — uncomment to use, and comment out the -- provider/model lines above. -- The host is deliberately not written down here: this repo is public, -- and a LAN address is one of the things the tier split exists to keep -- out of it. Put yours in and do not commit it back. -- endpoint = "http://:1234/v1/chat/completions", -- api_key = "lm-studio", -- model = "qwen3-almost-human-y1-7b", }) end, }