# agent_ui: Implement favorite models selection \(\#44297\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 0c91f061c360468da86bd1cb88768ceae6f71308

Requested commit: 0c91f061c360468da86bd1cb88768ceae6f71308

Commit: 0c91f061c360468da86bd1cb88768ceae6f71308

Tree: 60521748bee7c1f93d59a17cea47cdc0c82b75fd

Author: Oleksii \(Alexey\) Orlenko

Committer: GitHub

## Message

```
agent_ui: Implement favorite models selection (#44297)

This PR solves my main pain point with Zed agent: I have a long list of
available models from different providers, and I switch between a few of
them depending on the context and the project. In particular, I use the
same models from different providers depending on whether I'm working on
a personal project or at my day job. Since I only care about a few
models (none of which are in "recommended") that are scattered all over
the list, switching between them is bothersome, even using search.

This change adds a new option in `settings.json`
(`agent.favorite_models`) and the UI to manipulate it directly from the
list of available models. When any models are marked as favorites, they
appear in a dedicated section at the very top of the list. Each model
has a small icon button that appears on hover and allows to toggle
whether it's marked as favorite.

I implemented this on the UI level (i.e. there's no first-party
knowledge about favorite models in the agent itself; in theory it could
return favorite models as a group but it would make it harder to
implement bespoke UI for the favorite models section and it also
wouldn't work for text threads which don't use the ACP infrastructure).

The feature is only enabled for the native agent but disabled for
external agents because we can't easily map their model IDs to settings
and there could be weird collisions between them.


https://github.com/user-attachments/assets/cf23afe4-3883-45cb-9906-f55de3ea2a97

Closes https://github.com/zed-industries/zed/issues/31507

Release Notes:

- Added the ability to mark language models as favorites and pin them to
the top of the list. This feature is available in the native Zed agent
(including text threads and the inline assistant), but not in external
agents via ACP.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
```

## Parents

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

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