Skip to content

Zed

Zed Agent supports custom OpenAI-compatible and Anthropic-compatible endpoints.

This setup applies to Zed Agent. External Agents and Terminal Threads can own their own configuration and do not automatically use these fields.

OpenAI-compatible

  1. Query GET /v1/models and select a model.
  2. Open agent: open settingsLLM Providers → Add Provider.
  3. Choose OpenAI-compatible, enter API URL https://api.nexus-hub.ru/v1, the model, and the context window.
  4. Enter the key in the UI keychain or use the variable Zed generates for the entry name. Do not put the key in settings.json.

Equivalent settings fragment (without a key):

{
  "language_models": {
    "openai_compatible": {
      "nexus": {
        "api_url": "https://api.nexus-hub.ru/v1",
        "available_models": [
          {
            "name": "MODEL_FROM_V1_MODELS",
            "display_name": "MODEL_FROM_V1_MODELS",
            "max_tokens": 128000,
            "capabilities": {
              "tools": true,
              "chat_completions": true
            }
          }
        ]
      }
    }
  }
}

For a Responses-only model, set chat_completions: false in capabilities and use only models for which Nexus permits that mode.

Anthropic-compatible

In LLM Providers, add a custom Anthropic endpoint with URL https://api.nexus-hub.ru and a model from GET /v1/models. Enter the key in the UI or use an environment variable; do not add it to the settings file. Nexus uses POST /v1/messages for this protocol.

Streaming and troubleshooting

Select the model in Agent Panel and send a short safe request. Streaming depends on the protocol and model. For 401, check the keychain or environment variable; for a missing model, query GET /v1/models again. Send support the x-request-id, error code, and Zed version, never the key or a full prompt.

Official reference: Zed Use API Access.