Zed

Zed

A fast, native code editor with a built-in AI agent that works with any OpenAI-compatible model.

What Zed is

Zed is a high-performance, native code editor built in Rust by the team behind Atom and Tree-sitter. It has a built-in Agent Panel that connects to any OpenAI-compatible model, so you can point it at TokenMix and code with Claude, GPT or DeepSeek without leaving the editor. It suits developers who want a fast editor and prefer to run AI on their own API key.

Before you start

Connect TokenMix

Zed reaches custom endpoints through its openai_compatible provider, configured in settings.json.

  1. Open the command palette and run "zed: open settings" to edit settings.json.
  2. Add a TokenMix provider under language_models.openai_compatible. The api_url must end in /v1, and you list the models yourself, because Zed does not fetch them automatically. Set max_tokens to each model's context window.
{
  "language_models": {
    "openai_compatible": {
      "TokenMix": {
        "api_url": "https://api.tokenmix.ai/v1",
        "available_models": [
          { "name": "claude-sonnet-4.6", "max_tokens": 200000 },
          { "name": "claude-opus-4.8", "max_tokens": 200000 }
        ]
      }
    }
  }
}
  1. Add your key. Run "agent: open settings" to open the Agent Panel settings, find the LLM Providers section, and enter your sk-tm- key for TokenMix. If you prefer the config file, Zed reads the key from the TOKENMIX_API_KEY environment variable instead; keys are never written into settings.json.
  2. Open the Agent Panel, pick a TokenMix model from the selector, and start a chat.

Check it works

In the Agent Panel, choose one of your TokenMix models and send a short message such as "hello". A reply means Zed is talking to TokenMix. You can see the spend in the TokenMix Console.

Common questions

No models appear: Zed only lists the models you put in available_models. Add each model's name (the TokenMix model id) and its max_tokens context size.

Where does the key go: either the Agent Panel provider field or the TOKENMIX_API_KEY environment variable, not settings.json.

Which models to pick: any text model works. For coding, Claude Opus 4.8, Claude Sonnet 4.6 and DeepSeek V4 Pro are good starting points.