Use Xantly with Zed

Zed's assistant panel supports an openai_compatible provider block in settings.json. Drop in Xantly for BaRP routing on inline chat, edit, and the inline assistant.

Zed is the high-performance Rust-native editor from the Atom team. Its assistant panel supports an openai_compatible provider block, drop in Xantly and every inline chat, edit, and inline assistant call routes through smart routing + cache + memory.

Prerequisites

Setup

Open your Zed settings (Cmd+, on macOS, Ctrl+, on Linux) and add an openai_compatible provider under language_models:

{
  "language_models": {
    "openai_compatible": {
      "Xantly": {
        "api_url": "https://api.xantly.com/v1",
        "available_models": [
          {
            "name": "xantly/auto-quality",
            "display_name": "Xantly Quality",
            "max_tokens": 200000,
            "max_completion_tokens": 8192
          },
          {
            "name": "xantly/auto-value",
            "display_name": "Xantly Value",
            "max_tokens": 128000,
            "max_completion_tokens": 4096
          },
          {
            "name": "anthropic/claude-sonnet-4.6",
            "display_name": "Claude Sonnet 4.6",
            "max_tokens": 200000,
            "max_completion_tokens": 8192
          },
          {
            "name": "openai/gpt-5.4",
            "display_name": "GPT-5.4",
            "max_tokens": 200000,
            "max_completion_tokens": 8192
          }
        ]
      }
    }
  },
  "assistant": {
    "default_model": {
      "provider": "openai_compatible/Xantly",
      "model": "xantly/auto-quality"
    }
  }
}

Set your API key via the Zed UI (Cmd+Shift+P → "Assistant: Configure Provider" → paste xantly_sk_...) or export it:

export OPENAI_COMPATIBLE_XANTLY_API_KEY=xantly_sk_...

Restart Zed. The model picker in the Assistant panel now shows Xantly models.

Using the Assistant panel

Everything streams through Xantly, routed model, cache status, and cost all appear in your Xantly dashboard.

Inline assistant (edit in place)

Select a block of code, press Cmd+Enter, and describe the change:

Convert this function to async/await and add error handling.

Zed's inline assistant fires an edit request against Xantly's auto-quality (via the default_model setting), applies the diff, shows you the preview.

Model choice

Model IDWhen
xantly/auto-qualityAssistant panel default, most reliable.
xantly/auto-valueHigher-volume edit/refactor work.
anthropic/claude-sonnet-4.6Long-context refactors, multi-file reasoning.
openai/gpt-5.4Structured output (schemas, configs).
groq/llama-3.3-70bUltra-fast inline completions.

Verify

In the Assistant panel:

Reply with just the word "pong".

Check your Xantly dashboard, the request logs with routed-to model, cache status, USD cost.

What you get

Gotchas

api_url with /v1. Zed's openai_compatible provider expects the path-less OpenAI-compatible base. Include /v1.

available_models is required. Zed doesn't hit /v1/models to discover the catalog, you list what you want available in the settings. Add whatever Xantly slugs you use.

Custom headers. Zed doesn't yet expose a custom-headers setting on the openai_compatible provider, so X-Xantly-Memory-Mode can't be set per-call from Zed natively. Workaround: use a CLI tool for memory-heavy workflows, or wait for upstream Zed support.

Max tokens. max_tokens in Zed config is the context window; max_completion_tokens is the generation limit. Set both to match the model.

Model picker caches. After adding new entries, restart Zed, it doesn't hot-reload the models list.

Next steps