Connect Zed to TrustedRails
Zed is a fast, multiplayer code editor with a built-in AI agent. It supports OpenAI-compatible providers natively, so you can add TrustedRails in its agent settings and run the agent on open-source models; no extension needed.
Prerequisites
Section titled “Prerequisites”- A TrustedRails API key (starts with
tr-prx-). See Create a TrustedRails API Key. - Zed installed.
Add TrustedRails as a provider
Section titled “Add TrustedRails as a provider”- Open the agent settings: run agent: open settings from the Command Palette (
Cmd/Ctrl + Shift + P). Under LLM Providers, click Add Provider and choose OpenAI (this means an OpenAI-compatible API). - In the Add LLM Provider dialog, fill in:
- Provider Name:
TrustedRails - API URL:
https://proxy.trustedrails.com/v1 - API Key: your
tr-prx-…key
- Provider Name:
- Under Models, click Add Model and enter a TrustedRails model id in Model Name, for example
zai-org/GLM-5.3-Flash. It must match a TrustedRails-supported id exactly (see Supported Models). Keep the token defaults (or set them to the model's context window) and tick Supports tools so the agent can call tools; leave the other capability boxes at their defaults. Use Add Model again for any other model, e.g.MiniMaxAI/MiniMax-M2.7. - Click Save Provider.
To change the provider later, edit it in your settings.json (run zed: open settings file; Zed saves the provider there), or remove it and add it again; there is no edit button in the UI.
Use it
Section titled “Use it”Open the Agent panel, pick a TrustedRails model from the model selector, and start a conversation or let the agent edit files and run commands, all on your open-source model.
Verify
Section titled “Verify”In the Agent panel, with a TrustedRails model selected, send any message. A reply confirms the connection.
Troubleshooting
Section titled “Troubleshooting”- Provider or models don't appear: re-open agent: open settings and confirm the provider saved with API URL exactly
https://proxy.trustedrails.com/v1. - 401 / invalid API key: wrong or paused key, or it wasn't saved. Re-enter it, or create a fresh one from Create a TrustedRails API Key.
- Model not found / unsupported: the Model Name must match a model TrustedRails serves exactly (see Supported Models).