plugins/avante: providers migration

This commit is contained in:
Austin Horstman 2025-06-10 19:38:00 -05:00 committed by Gaétan Lepage
parent e89eb15456
commit 6e8d9f84b8
2 changed files with 76 additions and 55 deletions

View file

@ -45,12 +45,16 @@ lib.nixvim.plugins.mkNeovimPlugin {
settingsExample = { settingsExample = {
provider = "claude"; provider = "claude";
providers = {
claude = { claude = {
endpoint = "https://api.anthropic.com"; endpoint = "https://api.anthropic.com";
model = "claude-3-5-sonnet-20240620"; model = "claude-3-5-sonnet-20240620";
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
};
mappings = { mappings = {
diff = { diff = {
ours = "co"; ours = "co";

View file

@ -15,52 +15,65 @@
system_prompt = '' system_prompt = ''
You are an excellent programming expert. You are an excellent programming expert.
''; '';
providers = {
openai = { openai = {
endpoint = "https://api.openai.com/v1"; endpoint = "https://api.openai.com/v1";
model = "gpt-4o"; model = "gpt-4o";
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
copilot = { copilot = {
endpoint = "https://api.githubcopilot.com"; endpoint = "https://api.githubcopilot.com";
model = "gpt-4o-2024-05-13"; model = "gpt-4o-2024-05-13";
proxy = null; proxy = null;
allow_insecure = false; allow_insecure = false;
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
azure = { azure = {
endpoint = ""; endpoint = "";
deployment = ""; deployment = "";
api_version = "2024-06-01"; api_version = "2024-06-01";
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
claude = { claude = {
endpoint = "https://api.anthropic.com"; endpoint = "https://api.anthropic.com";
model = "claude-3-5-sonnet-20240620"; model = "claude-3-5-sonnet-20240620";
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 8000; max_tokens = 8000;
}; };
};
gemini = { gemini = {
endpoint = "https://generativelanguage.googleapis.com/v1beta/models"; endpoint = "https://generativelanguage.googleapis.com/v1beta/models";
model = "gemini-1.5-flash-latest"; model = "gemini-1.5-flash-latest";
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
cohere = { cohere = {
endpoint = "https://api.cohere.com/v1"; endpoint = "https://api.cohere.com/v1";
model = "command-r-plus-08-2024"; model = "command-r-plus-08-2024";
timeout = 30000; timeout = 30000;
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
vendors = { }; };
};
behaviour = { behaviour = {
auto_suggestions = false; auto_suggestions = false;
auto_set_highlight_group = true; auto_set_highlight_group = true;
@ -151,12 +164,16 @@
settings = { settings = {
provider = "claude"; provider = "claude";
providers = {
claude = { claude = {
endpoint = "https://api.anthropic.com"; endpoint = "https://api.anthropic.com";
model = "claude-3-5-sonnet-20240620"; model = "claude-3-5-sonnet-20240620";
extra_request_body = {
temperature = 0; temperature = 0;
max_tokens = 4096; max_tokens = 4096;
}; };
};
};
mappings = { mappings = {
diff = { diff = {
ours = "co"; ours = "co";