Neovim with the Gateway
Use a Neovim plugin that gives a custom OpenAI-compatible HTTP adapter. This guide uses CodeCompanion.nvim. Its configuration has different settings for HTTP adapters, chat, and inline interactions.
GitHub Copilot plugins use the GitHub protocol and authentication. The
Verdictan gateway is not a forward proxy. HTTP_PROXY or
HTTPS_PROXY at port 41002 does not route Copilot traffic through Verdictan.
Prerequisites
-
Complete Gateway Setup for IDEs.
-
Install CodeCompanion using its installation guide.
-
Before you start Neovim, export a client API token:
export VERDICTAN_IDE_TOKEN="vdt_..."
Configure CodeCompanion
Extend the OpenAI-compatible CodeCompanion HTTP adapter. Select it for chat and inline interactions:
require("codecompanion").setup({
adapters = {
http = {
verdictan = function()
return require("codecompanion.adapters").extend("openai_compatible", {
env = {
url = "http://127.0.0.1:41002",
api_key = "VERDICTAN_IDE_TOKEN",
chat_url = "/v1/chat/completions",
},
schema = {
model = {
default = "your-model-id",
},
},
})
end,
},
},
interactions = {
chat = {
adapter = "verdictan",
},
inline = {
adapter = "verdictan",
},
},
})
Replace your-model-id with an ID from the authenticated /v1/models route. The model name
must resolve to a configured provider target. The editor configuration does not
enable the model.
This setup governs the HTTP interactions assigned to verdictan. ACP/CLI
agents and GitHub Copilot integrations have different transports. This adapter
does not apply to them.
Verify the governed path
Verify authentication and model discovery from the environment that launches Neovim:
curl -fsS \
-H "Authorization: Bearer $VERDICTAN_IDE_TOKEN" \
http://127.0.0.1:41002/v1/models
Follow Verdictan events. Then open a CodeCompanion chat or make an inline edit:
verdictan events tail --since 10m --follow
A matching event proves that the request went through the gateway. If no event is available, first verify gateway event delivery. Then verify the CLI organization, region, event time window, and filters. Then verify the active CodeCompanion adapter.
Use a different Neovim plugin
The same integration is possible when a plugin lets you configure:
- the OpenAI-compatible base URL or
/v1/chat/completionsendpoint - bearer-token authentication
- the specified model identifier
- streaming, tools, or other capabilities that the plugin must have
Follow the plugin documentation because option names and supported interactions change independently of Verdictan. Verify that each interaction generates a Verdictan event. After a matching event is available, claim coverage.
Troubleshooting
| Symptom | Check |
|---|---|
| Connection refused | Make sure that verdictan gateway status and the configured port are correct. |
401 Unauthorized | Make sure that Neovim inherited VERDICTAN_IDE_TOKEN and that the token is active. |
| Model error | Compare the adapter model with the authenticated /v1/models response. |
| Chat works but inline does not | Make sure that the two interactions select verdictan and that the selected model supports the request. |
| No Verdictan event | Examine the active CodeCompanion HTTP adapter. CodeCompanion can select a different adapter. |