feat: aihubmix (#1780)

* feat: aihubmix

* feat: add chinese readme
This commit is contained in:
yetone
2025-03-31 18:58:41 +08:00
committed by GitHub
parent cda98593f9
commit 46073c0efd
3 changed files with 1092 additions and 0 deletions

View File

@@ -26,6 +26,9 @@
**avante.nvim** is a Neovim plugin designed to emulate the behaviour of the [Cursor](https://www.cursor.com) AI IDE. It provides users with AI-driven code suggestions and the ability to apply these recommendations directly to their source files with minimal effort.
[查看中文版](README_zh.md)
> [!NOTE]
>
> 🥰 This project is undergoing rapid iterations, and many exciting features will be added successively. Stay tuned!
@@ -734,6 +737,23 @@ ollama = {
> [!NOTE]
> If you use ollama, the code planning effect may not be ideal, so it is strongly recommended that you enable [cursor-planning-mode](https://github.com/yetone/avante.nvim/blob/main/cursor-planning-mode.md)
## AiHubMix
AiHubMix is a built-in provider for avante.nvim. You can register an account on the [AiHubMix official website](https://s.kiiro.ai/r/PPELHy), then create an API Key within the website, and set this API Key in your environment variables:
```bash
export AIHUBMIX_API_KEY=your_api_key
```
Then in your configuration, set `provider = "aihubmix"`, and set the `model` field to the model name you want to use, for example:
```lua
provider = "aihubmix",
aihubmix = {
model = "gpt-4o-2024-11-20",
}
```
## Custom providers
Avante provides a set of default providers, but users can also create their own providers.

1060
README_zh.md Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -299,6 +299,18 @@ M._defaults = {
__inherited_from = "openai",
model = "gpt-4o-mini",
},
aihubmix = {
__inherited_from = "openai",
endpoint = "https://aihubmix.com/v1",
model = "gpt-4o-2024-11-20",
api_key_name = "AIHUBMIX_API_KEY",
},
["aihubmix-claude"] = {
__inherited_from = "claude",
endpoint = "https://aihubmix.com",
model = "claude-3-7-sonnet-20250219",
api_key_name = "AIHUBMIX_API_KEY",
},
},
---Specify the special dual_boost mode
---1. enabled: Whether to enable dual_boost mode. Default to false.