Using Crosshatch in Zed

Zed is a "next-generation code editor designed for high-performance collaboration with humans and AI", and it integrates seamlessly with Crosshatch Model Mixes.

  1. First, create a free Crosshatch account, and visit the API Keys page.

  2. Generate a new API Key for "Zed" and copy the key to your clipboard

  3. Next, click the "Sparkles" icon in the bottom right of the editor (or enter ⌘? on MacOS) tor bring up the Assistant Panel.

  4. Tap the Overflow menu in the top right corner and hit "Configure" to open the Assistant configuration settings.

  5. In the "OpenAI" section, enter the Crosshatch API Key you generated in step 2.

  6. Next, find the Model Mix from the Crosshatch Mixes directory that you choose to use.

  7. Copy the mix name and the "Base URL" from the Crosshatch site. For this example, we'll use the LMSys Coding Leaderboard mix.

  8. Open the Zed Settings and add the following to your existing JSON, replacing api_url with the Base URL from Crosshatch, and both instances of "lmsys-coding" with the Mix name you'd like to use:

    "language_models": {
      "openai": {
        "version": "1",
        "api_url": "https://api.crosshatch.app/v1",
        "available_models": [
          {
            "name": "lmsys-coding",
            "max_tokens": 10000
          }
        ]
      }
    },
    "assistant": {
      "provider": null,
      "default_model": {
        "provider": "openai",
        "model": "lmsys-coding"
      },
      "version": "2"
    }

The result should look like this:

Test the integration

To test, you can press open the Assistant Panel (via the Sparkles icon) and ask a question.

That's it!

Now you're free to use the great AI features in Zed with the powerful Model Mixes from Crosshatch!

If something didn't quite work, we're ready to help on Discord and X.

Last updated