Skip to content
This repository was archived by the owner on Jul 23, 2025. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/about/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ Major features and changes are noted here. To review all updates, see the

Related: [Upgrade CodeGate](../how-to/install.md#upgrade-codegate)

- **New integration: Open Interpreter** - 20 Feb, 2025\
CodeGate v0.1.24 adds support for the
[avante.nvim](https://github.com/yetone/avante.nvim) plugin for Neovim with
OpenAI and CodeGate muxing. See the
[integration guide](../integrations/avante.mdx) to get started.

- **Muxing filter rules** - 18 Feb, 2025\
CodeGate v0.1.23 adds filter rules for model muxing, allowing you to define
which model should be used for a given file type. See the
Expand Down
2 changes: 2 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ AI coding assistants / IDEs:

- **[Aider](./integrations/aider.mdx)** with Ollama and OpenAI-compatible APIs

- **[avante.nvim](./integrations/avante.mdx)** (Neovim plugin) with OpenAI

- **[Cline](./integrations/cline.mdx)** in Visual Studio Code

CodeGate supports Ollama, Anthropic, OpenAI and compatible APIs, OpenRouter,
Expand Down
142 changes: 93 additions & 49 deletions docs/integrations/avante.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,78 +3,122 @@ title: Use CodeGate with avante.nvim
description: Configure the `avante.nvim` plugin for Neovim
sidebar_label: avante.nvim
sidebar_position: 15
unlisted: true
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

**[avante.nvim](https://github.com/yetone/avante.nvim)** is a Neovim plugin that
provides a Cursor-like user experience. It integrates with multiple AI providers
(e.g. Claude and OpenAI).
provides a Cursor-like user experience with multiple AI providers.

CodeGate works with [OpenAI](https://openai.com/api/) and compatible APIs
through Avante.

You can also use [CodeGate muxing](../features/muxing.mdx) to select your
provider and model using [workspaces](../features/workspaces.mdx).

:::note

You can **additionally** install
[codegate.nvim](https://github.com/stacklok/codegate.nvim), which will provide a
closer integration with CodeGate.

:::

## Install avante.nvim

Install the **avante.nvim** plugin using your preferred plugin manager. For
instructions, consult **avante.nvim**'s
Install the `avante.nvim` plugin using your preferred Neovim plugin manager. For
detailed installation instructions, refer to Avante's
[documentation](https://github.com/yetone/avante.nvim?tab=readme-ov-file#installation).

## Configure CodeGate with avante.nvim
:::tip

You can also install [codegate.nvim](https://github.com/stacklok/codegate.nvim),
a plugin that interfaces with CodeGate and allows you to quickly switch between
workspaces without leaving Neovim.

:::

## Configure avante.nvim to use CodeGate

Configure `avante.nvim` to route requests through CodeGate by setting its
provider endpoint to `http://localhost:8989/<provider>`.

Consult **avante.nvim**'s documentation for specific examples on customizing
your configuration using your preferred plugin manager.
Using [lazy.nvim](https://lazy.folke.io/) (recommended), configure the
`avante.nvim` provider settings as shown:

Using `lazy.nvim` (recommended) add the following configuration to enable
CodeGate with **avante.nvim**:
<Tabs groupId="provider" queryString="provider">
<TabItem value="mux" label="CodeGate muxing" default>
First, configure your [provider(s)](../features/muxing.mdx#add-a-provider) and
select a model for each of your
[workspace(s)](../features/workspaces.mdx#manage-workspaces) in the CodeGate dashboard.

```lua
Then configure `avante.nvim` to use the CodeGate mux endpoint:

```lua title="~/.config/nvim/lua/plugins/avante.lua"
{
"yetone/avante.nvim",
-- ... etc ...
opts = {
-- your provider configuration ...
provider = "openai",
openai = {
endpoint = "http://localhost:8989/openai", -- use the endpoint matching your LLM provider
model = "gpt-4o", -- your desired model (or use gpt-4o, etc.)
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},
"yetone/avante.nvim",
-- ... etc ...
opts = {
provider = "openai",
openai = {
endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint
model = "gpt-4o", -- the actual model is determined by your CodeGate workspace
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},
-- ... etc ...
},
-- ... etc ...
}
```

:::note
</TabItem>
<TabItem value="openai" label="OpenAI">
You need an [OpenAI API](https://openai.com/api/) account to use this provider.
To use a different OpenAI-compatible endpoint, set the `CODEGATE_OPENAI_URL`
[configuration parameter](../how-to/configure.md) when you launch CodeGate.

**avante.nvim** does not yet support _fill-in-the-middle_ completions. You have
to configure your fill-in-the-middle completion plugin separately.
```lua title="~/.config/nvim/lua/plugins/avante.lua"
{
"yetone/avante.nvim",
-- ... etc ...
opts = {
provider = "openai",
openai = {
endpoint = "http://localhost:8989/openai", -- CodeGate's OpenAI endpoint
model = "gpt-4o", -- your desired model
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},
},
-- ... etc ...
}
```

:::
</TabItem>
</Tabs>

### Verifying configuration
:::note

To verify the configuration, type `:AvanteChat` to start the **avante.nvim**
plugin. You should see the **avante.nvim** UI appear in the Neovim window.
`avante.nvim` does not yet support _fill-in-the-middle_ (FIM) completions. You
have to configure your FIM completion plugin separately.

Type and send the following message:
:::

```
codegate version
```
## Verify configuration

If CodeGate is configured correctly, you should see a response from the CodeGate
server.
To verify your setup:

### Model muxing
1. In Neovim, type `:AvanteChat` to launch the Avante interface.
2. Enter the following prompt in the chat:
```
codegate version
```
3. You should receive a response like like "CodeGate version 0.1.24".

To take advantage of CodeGate's [model muxing feature](../features/muxing.mdx),
use **avante.nvim**'s OpenAI provider with the following configuration:
## Next steps

```lua
openai = {
endpoint = "http://localhost:8989/v1/mux", -- CodeGate's mux endpoint
model = "gpt-4o", -- the actual model is determined by your CodeGate workspace
timeout = 30000, -- timeout in milliseconds
temperature = 0, -- adjust if needed
max_tokens = 4096,
},
```
Learn more about [CodeGate's features](../features/index.mdx) and explore the
[dashboard](../how-to/dashboard.md).