본문으로 건너뛰기

Zed

Zed stores api_url under language_models.openai_compatible.

Configuration example. Menu and setting names can differ slightly between Zed versions.

Setup#

Zed adds an OpenAI-compatible provider under language_models.openai_compatible.

  1. Add the provider below to settings.json. Set api_url to https://apirouter.pleum.ai/v1 and put an ID from the model catalog in each available_models name. max_tokens takes the model's context window, not its output limit.
  2. Do not put the key in settings.json. Enter it in Zed's provider settings (LLM Providers in Agent Settings), or pass it through an environment variable named after the provider ID in upper snake case plus _API_KEY. For example, my-gateway becomes MY_GATEWAY_API_KEY.
settings.json
// Zed settings.json
{
  "language_models": {
    "openai_compatible": {
      "PleumRouter": {
        "api_url": "https://apirouter.pleum.ai/v1",
        "available_models": [
          // max_tokens is the model's context window, not its output limit
          { "name": "gpt-5.5", "max_tokens": 1050000 }
        ]
      }
    }
  }
}

Verify#

Send a short prompt. If a reply arrives, the connection works. Look up cost with the X-Request-Id response header at GET /v1/generation?id=….

How it works#

This tool sends OpenAI Chat Completions requests (/v1/chat/completions). The base URL is https://apirouter.pleum.ai/v1 and auth sends your plm_ key as Authorization: Bearer.

Errors#

The table below lists the errors you may see when connecting Zed, with the fix for each. Do not append /chat/completions to api_url.

SymptomCause and fix
401 UnauthorizedThe key is wrong or disabled. Copy the plm_ key again from the dashboard's API keys page, and make sure it is not another service's key.
402 Payment RequiredYou are out of credits, or the key used up its daily, weekly or monthly budget or its monthly token limit. Top up, or check the budget and limits on your API key.
404 Not FoundThe base URL is wrong, or the model ID is not in the catalog. OpenAI-compatible tools end at /v1; Anthropic and Gemini tools take the bare origin without /v1. Do not append paths like /chat/completions yourself. If the error code is model_not_found, check the model ID.
429 Too Many RequestsThe key exceeded its per-minute request limit or the concurrent-request limit (concurrency_limit_exceeded), or the model provider's own limit was hit (upstream_rate_limited). Reduce the agent's parallel runs and check Usage limits.
model not foundThat model ID is not in the catalog. Check the exact ID with GET /v1/models, including case.

Cost & security tips#

  • Set a budget on the key. A coding agent calls the model many times per task and resends long context. Daily, weekly or monthly budgets on your API key make costs easier to predict.
  • Keep the key out of git. Make sure a key in your shell profile or config file never gets committed, and if you suspect a leak, revoke it in the dashboard and issue a new one.
  • Check where sensitive code goes. Prompts and code are sent to the provider of the model you pick. Use Data residency and PII masking to control that.