zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
46.6k stars 2.64k forks source link

Allow Different Assistant Models to Be Toggled Without Changing Settings #15012

Open mikecfisher opened 1 month ago

mikecfisher commented 1 month ago

Check for existing issues

Describe the feature

When developing with Assistants some tasks GPT4o seems to be better at, some tasks Claude 3.5 seems to be better at. I can swap between these models by editing the settings.json but then I need to re-enter my API key each time. It would be great if I could configure all my models via an array and have it save the API key. Settings could look simply like this.

  "assistant": {
    "version": "1",
     "providers": [
      {
        "default_model": "claude-3-5-sonnet",
        "name": "anthropic"
      },
      {
        "name": "openai",
        "type": "openai",
        "default_model": "gpt-4-turbo-preview",
        "api_url": "http://localhost:11434/v1"
      },
    ]
  },

If applicable, add mockups / screenshots to help present your vision of the feature

No response

JosephTLyons commented 1 month ago

Hey @mikecfisher, this PR was just merged 1 hour ago:

SCR-20240723-nrjs

Which sort of does what you are asking, though I'm not sure the configuration is the same as you suggested

mikecfisher commented 1 month ago

That's great news! I don't care about the config as long as we can support multiple models and API keys