Skip to content

Integrations / Zed

Use Zed with any model

Add Yunshu Router to Zed as an OpenAI-compatible provider for the Zed agent. Exact settings.json, key setup, checks and fixes.

Get an API key

Zed is a code editor with a built-in agent. Add Yunshu Router as an OpenAI-compatible provider and the Zed agent and inline assistant run on the model you choose, billed per token to your prepaid balance.

What you need

  • Zed installed, a recent version.
  • A Yunshu Router account with credit on the balance.
  • An API key from the console. Use a separate key for Zed.

Set it up

  1. Create a key in the console (API keys → Create key) and copy it.

  2. Open your Zed settings file. To add the provider in the app instead, run agent: open settings and use Add Provider under LLM Providers, with the same URL, model ID and context window.

  3. Add the provider:

    {
      "language_models": {
        "openai_compatible": {
          "yunshu": {
            "api_url": "https://api.yunshurouter.com/v1",
            "available_models": [
              {
                "name": "deepseek-v4-pro",
                "display_name": "DeepSeek V4 Pro (Yunshu)",
                "max_tokens": 131072,
                "max_output_tokens": 8192,
                "capabilities": {
                  "tools": true,
                  "images": false,
                  "parallel_tool_calls": false,
                  "prompt_cache_key": false
                }
              }
            ]
          }
        }
      }
    }
    Field Why
    api_url With /v1.
    name Our model ID, exactly.
    capabilities.tools Must be true for the agent.
    capabilities.images true only if the model page lists image input.
  4. Add the key. Zed asks you not to put keys in settings.json. Either enter it in the agent panel’s settings under the yunshu provider, or set an environment variable before starting Zed. The name comes from the provider id: yunshu → YUNSHU_API_KEY.

    export YUNSHU_API_KEY="YOUR_YUNSHU_KEY"
  5. Open the agent panel and pick DeepSeek V4 Pro (Yunshu) in the model selector.

Check it works

  1. In the agent panel, ask: “Summarise the open file.”
  2. A correct answer means the key, address and model work. Ask for a small edit to check tool calls.
  3. Open Usage in the console: the requests show under the Zed key.
Model ID Use it for
deepseek-v4-pro Agent, everyday work
glm-5.3 Inline assistant, commit messages
kimi-k3 Long agent tasks

Add one entry to available_models per model.

Set a budget on the key

In the console, open API keys, pick the Zed key and set a monthly budget, a model allow-list and a budget alert. A request that would pass the budget is refused with 402 budget_exceeded.

Known limitations

  • Zed lists only the models you put in available_models.
  • Anthropic format. Zed also has language_models.anthropic_compatible with an api_url (no /v1: https://api.yunshurouter.com).

Troubleshooting

What you see Likely cause Fix
401 Key not set, or set for another provider id Enter it in the agent panel for yunshu, or export YUNSHU_API_KEY and restart Zed.
404 on every request api_url without /v1 Use https://api.yunshurouter.com/v1.
404 naming the model name differs from our ID Copy it from the models page.
Agent doesn’t call tools capabilities.tools is false Set it to true.
403 naming the model Not on the key’s allow-list Add it to the key.
402 Budget or balance used up Raise the budget or top up.

Questions

Where does Zed store the key?

Otherwise it reads YUNSHU_API_KEY from the environment.

Can I use Claude models in Zed through Yunshu Router?

Not yet. Claude models can’t be called today. Use the DeepSeek, GLM and Kimi models on the models page.