Editors & Clients
VS Code and Copilot
VS Code can use Verdictan in two independent ways, and you can set up either or both:
- Model requests. Add your gateway as a Custom Endpoint model in Copilot Chat. Chat requests to that model then pass your policies and are recorded.
- MCP tools. Let Copilot's agent search Verdictan History or check policies. This does not change which model Copilot uses.
Inline suggestions and other GitHub-hosted features keep their own path to GitHub.
Before you start
- For model requests: a gateway on
127.0.0.1:41002with at least one provider target. See Gateway Setup for IDEs. - For MCP: an agent with a publication that has a resolved public hostname.
- A client API token for VS Code. See API Tokens for IDEs.
- VS Code with the GitHub Copilot extension.
Configure a Custom Endpoint model
- Run Chat: Manage Language Models from the Command Palette.
- Select Add Models → Custom Endpoint, name the group Verdictan, and enter your application token as the API key.
- Choose Chat Completions. VS Code opens
chatLanguageModels.json. - Keep the generated secret reference. Set your model ID, and set
urlto the full route,http://127.0.0.1:41002/v1/chat/completions. Match the limits and capabilities to the upstream model. - Save, and pick the model in the chat model picker.
For a published gateway, use your agent's base URL instead of the local address. See VS Code custom endpoint models for the file format.
Start with Chat Completions; the Responses and Messages types also work if your provider supports them. Don't put the gateway in VS Code's http.proxy setting.
Configure VS Code MCP tools
-
Create
.vscode/mcp.json, or add this server to it. VS Code uses aserverskey (Cursor usesmcpServers). The password input keeps the token out of the file:.vscode/mcp.json{ "inputs": [ { "type": "promptString", "id": "verdictan-token", "description": "Verdictan MCP client token", "password": true } ], "servers": { "verdictan": { "type": "http", "url": "https://<published-hostname>/mcp", "headers": { "Authorization": "Bearer ${input:verdictan-token}" } } } } -
Run MCP: List Servers and start
verdictan. -
Enter the client API token when VS Code asks for it.
See the VS Code MCP guide for trust and organization settings.
Verify
-
MCP: in MCP: List Servers, check that
verdictanlists tools. Ask Copilot to usehistory_searchfor the last ten minutes without changing anything, and read the result. -
Model requests: with the custom model selected, send
Reply with Hello. Do not use tools or change files.and check for a reply. -
In a terminal, read the recent decision events:
verdictan events tail --since 10m --event-type decision --json -
Check that a matching event appears. Delivery can take a few seconds, so run the command again if it is not there yet.
A working MCP tool proves tool access only. A decision event proves chat goes through the gateway. Inline suggestions never produce events.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| The MCP server does not start | The URL points to 127.0.0.1:41002 or an unpublished hostname. A local listener returns 404 with mcp_publication_required. | Use the agent's published hostname. |
401 from the MCP server | The input was empty or is not a vdt_ token | In MCP: List Servers, restart the server and enter the token again. |
| Copilot Chat shows a connection error | http.proxy or a proxy variable points at the gateway, or the URL does not match the API type | Remove the proxy setting and use the full route for the API type you chose. |
401 in Copilot Chat | The API key is the gateway runtime token or a provider key | Enter the client API token. |
| Chat events appear, but no inline suggestions | Inline suggestions use GitHub services | Expected. Only the custom chat model goes through the gateway. |
For endpoint and event problems, see IDE Integration Troubleshooting.
Next steps
- Continue with Verdictan: route chat, edit, and apply requests with a configurable
apiBase. - Configure Policies for IDE Traffic: controls for coding assistants.
- Gateway MCP Surface: every tool and resource on the MCP endpoint.