Skip to main content

Editors & Clients

Zed with Verdictan

Zed can use Verdictan in two independent ways. Add your gateway as an OpenAI-compatible provider, and Zed Agent's model requests go through your policies. Add the Verdictan MCP server, and the agent can also search request history. Set up either or both, and check each one you use.

Before you start​

  • A gateway on http://127.0.0.1:41002 with at least one provider target. See Gateway Setup for IDEs.
  • A client API token for each path you set up. See API Tokens for IDEs.
  • For MCP: a published gateway hostname. MCP is not served on localhost:41002.

Configure Zed​

Add the gateway as a model provider​

  1. Open Settings → AI → LLM Providers (or run agent: open settings) and choose Add Provider → OpenAI-compatible.

  2. Fill in:

    FieldValue
    Provider nameverdictan
    API URLhttp://127.0.0.1:41002/v1
    Model IDAn id from the gateway's authenticated GET /v1/models response
    API keyA Verdictan client API token
    Context windowThe value the upstream model documents
  3. Select the verdictan provider and model in Zed Agent.

Zed keeps the key in the system keychain. It also reads a VERDICTAN_API_KEY environment variable for this provider, which wins over the keychain when set. The model ID must match an existing provider target; Zed cannot create one.

Edit prediction and external agents have their own settings and don't use the Zed Agent model. See Zed API access for the provider fields.

Add the Verdictan MCP server​

  1. Open Settings → AI → MCP Servers, click Add Server, and choose Add Remote Server.
  2. Set the URL to https://<published-hostname>/mcp and add the header Authorization: Bearer <client-api-token>.
  3. Wait for the tools to load, then check that the indicator dot next to the server is active.

Zed writes the header, token included, into your settings file under context_servers. Keep it in your private user settings, not in shared or committed configuration. See Zed MCP for tool permissions.

Verify​

  1. Check the token and the model list:

    export VERDICTAN_CLIENT_TOKEN="<client-api-token>"
    
    curl -fsS \
      -H "Authorization: Bearer $VERDICTAN_CLIENT_TOKEN" \
      http://127.0.0.1:41002/v1/models
  2. In Zed Agent, pick the verdictan model and send Reply with Hello. Do not edit files or use tools.

  3. In a second shell, read the recent events, and check that a matching event appears:

    verdictan events tail --since 10m --json
  4. For MCP, check that Zed lists Verdictan tools, then ask it to use history_search for the last ten minutes without changing anything.

An event proves a request went through the gateway. A working tool proves MCP access only.

Troubleshooting​

SymptomCauseFix
Connection refused on the API URLThe gateway is not running on port 41002Start it, and check /healthz with curl.
401 Unauthorized from the providerThe key is not an active client token, or VERDICTAN_API_KEY overrides itCheck the token in the Console, and unset the variable or fix its value. Don't use the gateway runtime token.
Zed rejects the model IDIt does not match a provider targetUse an id from the authenticated GET /v1/models response.
A reply but no eventThat Zed feature uses another providerCheck which provider the feature selects. Edit prediction and external agents don't use the Zed Agent model.
The MCP indicator stays offThe URL is not a published hostname, or the token is inactiveUse the publication hostname, and check the token in the Console.

For more checks, see IDE Integration Troubleshooting.

Next steps​