Zed is an IDE similar to VSCode but entirely written in rust with performance in mind.

Connecting Zed to LiteLLM

You need to add some custom overrides to your settings.json file to enable language models

  "language_models": {
    "openai": {
      "version": "1",
      "api_url": "https://litellm.example.com/v1",
      "available_models": [
        {
          "provider": "LiteLLM",
          "name": "gpt-4o",
          "display_name": "LiteLLM OpenAI GPT-4o",
          "max_tokens": 2048
        },
        {
          "provider": "LiteLLM",
          "name": "claude-3-5-sonnet-20240620",
          "display_name": "LiteLLM Anthropic Claude 3.5 Sonnet",
          "max_tokens": 2048
        }
      ]
    }
  }

You then set the OpenAI API key to your litellm admin key (or whatever key you are using) in the settings panel and your models should appear in the drop down.

Python LSP

Create a pyrightconfig.json in the project directory pointing to the virtual environment that should be used:

{
  "venvPath": "/Users/jamesravenscroft/miniconda3/envs/",
  "venv": "<envname>"
}