Connect Zed to OpenLLM Buddy

Connect the Zed editor to OpenLLM Buddy by adding an OpenAI-compatible language model provider in settings.json.

Coding · Integration guide

What is Zed?

Zed is a high-performance code editor with an integrated AI agent panel, inline assist, and support for external language model providers. Visit Zed.

Why connect OpenLLM Buddy?

Zed's openai_compatible provider takes an API URL and a list of models, which is exactly what an OpenLLM Buddy endpoint offers.

Before you start, create an API key in the console and deploy a model. If anything fails, run the curl test in Step 4 first: no tool can fix a broken endpoint.

1

Add the provider

Open settings with Ctrl/Cmd + , then Open Settings File, and add the provider.

settings.json
json
{
  "language_models": {
    "openai_compatible": {
      "OpenLLM Buddy": {
        "api_url": "https://openllmbuddy-proxy.botbuddytech.workers.dev/v1",
        "available_models": [
          {
            "name": "gemma4:26b",
            "display_name": "OpenLLM Buddy",
            "max_tokens": 32768,
            "max_output_tokens": 4096,
            "capabilities": {
              "tools": true,
              "images": false,
              "parallel_tool_calls": false,
              "prompt_cache_key": false
            }
          }
        ]
      }
    }
  }
}

Set max_tokens to your deployment's real context length. Set tools to false if the model does not support function calling.

2

Enter the API key

Open the Agent Panel, click the settings icon, find OpenLLM Buddy under providers, and paste your API key. Zed stores it in your system keychain.

3

Choose the model

Pick OpenLLM Buddy from the model selector in the Agent Panel, or set it as the default in your settings.

4

Test the endpoint with curl

Confirm the key, URL, and model id work before debugging Zed. A short JSON reply means the endpoint is healthy.

Terminal
bash
curl -sS https://openllmbuddy-proxy.botbuddytech.workers.dev/v1/chat/completions   -H "Authorization: Bearer YOUR_API_KEY"   -H "Content-Type: application/json"   -d '{"model": "gemma4:26b", "messages": [{"role": "user", "content": "Reply with OK"}], "max_tokens": 16}'

Troubleshooting

  • Provider not listed — the JSON must be valid. Zed underlines errors in the settings file.
  • Tool calls fail — turn tools off for models without function calling.
  • 401 or 403 — the API key is wrong, revoked, or missing the Bearer prefix. Create a fresh key in the console.
  • 404 on /chat/completions — the base URL must end in /v1, with no trailing /chat/completions and no extra path.
  • Model not found — the model id must match your deployment exactly. Run the curl test and copy the id you used.
  • Timeouts on the first request — a GPU that was idle may still be loading the model. Retry after a minute.
  • Connection refused from Docker or a remote host — use the public HTTPS base URL, never localhost.

Connection details

Use these values wherever Zed asks for an OpenAI-compatible provider.

Reference
text
Base URL:  https://openllmbuddy-proxy.botbuddytech.workers.dev/v1
Chat URL:  https://openllmbuddy-proxy.botbuddytech.workers.dev/v1/chat/completions
API key:   your key from the console
Model id:  gemma4:26b