language_models: Add auto_discover setting for Ollama#42207
Merged
bennetbo merged 1 commit intozed-industries:mainfrom Dec 16, 2025
Merged
language_models: Add auto_discover setting for Ollama#42207bennetbo merged 1 commit intozed-industries:mainfrom
auto_discover setting for Ollama#42207bennetbo merged 1 commit intozed-industries:mainfrom
Conversation
|
We require contributors to sign our Contributor License Agreement, and we don't have @xfbs on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'. |
auto_discover setting for Ollama
Contributor
Author
|
@cla-bot check |
|
The cla-bot has been summoned, and re-checked this pull request! |
This adds a setting flag named 'auto_discover' for the Ollama LLM executor, which disables Zed from automatically picking up all pulled models that Ollama has, only showing manually listed models. By default, auto discovery is enabled, preseving the current behaviour. Release Notes: - Adds an 'auto_discover' field for the language_models.ollama setting.
3938c96 to
a2309c1
Compare
CherryWorm
pushed a commit
to CherryWorm/zed
that referenced
this pull request
Dec 16, 2025
…es#42207) First up: I'm sorry if this is a low quality PR, or if this feature isn't wanted. I implemented this because I'd like to have this behaviour. If you don't think that this is useful, feel free to close the PR without comment. :) My idea is this: I love to pull random models with Ollama to try them. At the same time, not all of them are useful for coding, or some won't work out of the box with the context_length set. So, I'd like to change Zed's behaviour to not show me all models Ollama has, but to limit it to the ones that I configure manually. What I did is add an `auto_discover` field to the settings. The idea is that you can write a config like this: ```json "language_models": { "ollama": { "api_url": "http://localhost:11434", "auto_discover": false, "available_models": [ { "name": "qwen3:4b", "display_name": "Qwen3 4B 32K", "max_tokens": 32768, "supports_tools": true, "supports_thinking": true, "supports_images": true } ] } } ``` The `auto_discover: false` means that Zed won't pick up or show the language models that Ollama knows about, and will only show me the one I manually configured in `available_models`. That way, I can pull random models with Ollama, but in Zed I can only see the ones that I know work (because I've configured them). The default for `auto_discover` (when it is not explicitly set) is `true`, meaning that the existing behaviour is preserved, and this is not a breaking change for configurations. Release Notes: - ollama: Added `auto_discover` setting to optionally limit visible models to only those manually configured in `available_models`
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
First up: I'm sorry if this is a low quality PR, or if this feature isn't wanted. I implemented this because I'd like to have this behaviour. If you don't think that this is useful, feel free to close the PR without comment. :)
My idea is this: I love to pull random models with Ollama to try them. At the same time, not all of them are useful for coding, or some won't work out of the box with the context_length set. So, I'd like to change Zed's behaviour to not show me all models Ollama has, but to limit it to the ones that I configure manually.
What I did is add an
auto_discoverfield to the settings. The idea is that you can write a config like this:The
auto_discover: falsemeans that Zed won't pick up or show the language models that Ollama knows about, and will only show me the one I manually configured inavailable_models. That way, I can pull random models with Ollama, but in Zed I can only see the ones that I know work (because I've configured them).The default for
auto_discover(when it is not explicitly set) istrue, meaning that the existing behaviour is preserved, and this is not a breaking change for configurations.Release Notes:
auto_discoversetting to optionally limit visible models to only those manually configured inavailable_models