Selecting New Model doesn't do anything.
Check for existing issues
- [X] Completed
Describe the bug / provide steps to reproduce it
When I go into New Context, after setting up my API Keys, and try to choose a Model, nothing happens. I tried picking Claude 3.5 Sonnet - Zed and Claude 3.5 Sonnet Anthropic and nothing happens. I also tried with all the others in the drop down, I choose but nothing happens.
All I see is /default - error: Permission denied (os error 13) in red.
Above this it says No LLM Provider selected.
I use VSCode and ClaudeDev with no issues and I have all my keys added as well.
Environment
Zed: v0.150.4 (Zed) OS: macOS 15.1.0 Memory: 64 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
No response
If applicable, attach your Zed.log file to this issue.
Zed.log
[Zed.log](https://github.com/user-attachments/files/16807001/Zed.log)
I had the same problem and that was on my side. My Zed config files were managed by Nix Manager and Zed has no permissions to change them. So may be you should check your settings.json permissions and fix them.
I've configured OpenAI and ollama using the UI but was still getting "No LLM Provider selected". It worked after editing settings.json directly and adding this:
"assistant": {
"version": "2",
"enabled": true,
"default_model": {
"provider": "ollama",
"model": "deepseek-r1"
}
},
I just ran into this same issue using home-manager to configure zed. If I remove the link to the nix store for my settings and restart, everything starts working. Otherwise, I tried to put in the default config for the assistant and it still didn't work. It seems like settings.json needs to be writeable, otherwise I can't get the model switcher to work. It will select the default model from my config, but then I can't switch to anything else
I'm having the same issue as @thomastaylor312 thanks for the explanation, I was completely lost, but what you say makes a lot of sense 😅
It would be nice if it can switch in memory + write the default value to the settings. This would mean that for nix user, changing the default provider would work, but it wouldn't be persisted. I'd be fine with that.
I would like to work on this issue. I'm not sure who to tag. Maybe @agu-z ?
I read a bit the code, and the following is what I think a possible solution:
I think LanguageModelRegistry should have a new attribute: active_model, instead of using default_model.
And the the trait should attempt to set default_model on model selection, but the application should use active_model instead, which would live in memory.
@woile Going to take a guess that since this is open for a bit, it is probably fine to work on. But, not a maintainer so totally just a guess!
@woile says:
I think
LanguageModelRegistryshould have a new attribute:active_model, instead of usingdefault_model. And the the trait should attempt to setdefault_modelon model selection, but the application should useactive_modelinstead, which would live in memory.
And just to add my two cents: I'm all for the active_model principle, which should furthermore be assistant panel specific (see #23484). In fact I don't get why Zed is trying to change the default_model configuration when selecting one of the pre-configured models: switching between models do not signal a user intent to change his defaults imo.
For example, there is a cost-optimisation use-case. Claude 3.5 is cheap compared to 3.7, and 3.5 is enough for most tasks => makes sense to have it as a default. At the same time, having the ability to switch to 3.7 for a more complex task is useful. But it clearly does not mean the user want to change its default.
I think this has been fixed (not by me).
Ironically though, in the new agent mode, if I try to select the mode (i.e. "write" "ask" etc), the logs complain about not being able to write to a file
Hey folks, I'm closing this issue as it doesn't seem to be a problem anymore; I couldn't personally reproduce it. As this issue is also quite old at this point, I'd kindly ask for a new issue if the problem by any chance still persists, attaching reproduction steps and env information. Thanks so much!