refactor: update & add acp?

This commit is contained in:
2025-10-01 18:21:29 +08:00
parent a4c3bd0336
commit 4652adef66
2 changed files with 46 additions and 35 deletions
+23 -12
View File
@@ -1,11 +1,12 @@
local function qwen(model)
local function dmx(model)
return {
__inherited_from = "openai",
api_key_name = "QWEN_API_KEY",
endpoint = "https://dashscope.aliyuncs.com/compatible-mode/v1/",
api_key_name = "DMX_API_KEY",
endpoint = "https://www.dmxapi.cn/v1/",
model = model,
}
end
local llm_main = dmx("glm-4.6")
return {
{
@@ -30,15 +31,6 @@ return {
provider = "fzf-lua",
provider_opts = {},
},
provider = "qwen3coder",
auto_suggestions_provider = "qwen332b",
providers = {
qwen3coder = qwen("qwen3-coder-480b-a35b-instruct"),
qwen332b = qwen("qwen3-32b"),
},
-- Key mappings for diff functionality
mappings = {
diff = {
@@ -46,6 +38,25 @@ return {
ours = "<M-L>",
},
},
-- providers
provider = "dsv3",
providers = {
main = llm_main,
air = dmx("glm-4.5-air"),
dsv3 = dmx("deepseek-v3.2-exp"),
},
acp_providers = {
["qwen-code"] = {
command = "qwen",
args = { "--experimental-acp" },
env = {
NODE_NO_WARNINGS = "1",
},
},
},
},
},