# language_models: Sort Ollama models by name \(\#31620\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/c0397727e0b114f62d038b821e2a7e6e10743944)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: c0397727e0b114f62d038b821e2a7e6e10743944

Requested commit: c0397727e0b114f62d038b821e2a7e6e10743944

Commit: c0397727e0b114f62d038b821e2a7e6e10743944

Tree: 6308f0864085b340c3ddebbff1d0c0fe1b83a3c6

Author: little-dude

Committer: GitHub

## Message

```
language_models: Sort Ollama models by name (#31620)

Hello,

This is my first contribution so apologies if I'm not following the
proper process (I haven't seen anything special in
https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md). Also,
I have tested my changes manually, but I could not figure out an easy we
to instantiate a `LanguageModelSelector` in the unit tests, so I didn't
write a test. If you can provide some guidance I'd be happy to write a
test.

---

If the user configured the models with custom names via `display_name`,
we want the ollama models to be sorted based on the name that is
actually displayed.

~~The original issue is only about ollama but this change will also
affect the other providers.~~

Closes #30854

Release Notes:

- Ollama: Changed models to be sorted by name.
```

## Parents

- [9c2b90fb8f41d36fc25acf6e0ad79762cc66f8a5](https://git.cafe/gitcafe/zed/commit/9c2b90fb8f41d36fc25acf6e0ad79762cc66f8a5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/c0397727e0b114f62d038b821e2a7e6e10743944?format=markdown)
