Zed
Add Gateway as an OpenAI-compatible provider in Zed
Zed’s language_models.openai_compatible block adds Gateway as a provider for the Assistant Panel and inline assists. Shared setup: Building with coding agents.
Configure Zed
Run zed: open settings from the command palette and add a provider. Its key (Merge Gateway) is the picker name, and each available_models entry is one picker item.
settings.json
Zed reads the API key from an environment variable named after the provider, uppercased with non-alphanumerics as underscores plus _API_KEY: here, MERGE_GATEWAY_API_KEY. Persist it, restart Zed, and pick the model in the panel.
Gotchas
- Zed trusts your declared
capabilities. Set"tools": trueonly for models that support tool calling, or requests fail at the vendor. - Zed reads custom-provider keys from environment variables only, not
settings.json - Zed defaults to chat completions. Set
"chat_completions": falseon an entry to use the Responses API, also served under/v1/openai. - For an alias or
default_routingentry, setmax_tokensto the smallest context window among its routable models