# language_models: Use \`/models/user\` for fetching OpenRouter models \(\#37534\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 1f37fbd0511fcafd6b39e9de4d6d6db7244453dd

Requested commit: 1f37fbd0511fcafd6b39e9de4d6d6db7244453dd

Commit: 1f37fbd0511fcafd6b39e9de4d6d6db7244453dd

Tree: 949749b2e71d4751316a27d0b9a3a485524722f6

Author: Umesh Yadav

Committer: GitHub

## Message

```
language_models: Use `/models/user` for fetching OpenRouter models (#37534)

This PR switches the OpenRouter integration from fetching all models to
fetching only the models specified in the user's account preferences.
This will help improve the experience

**The Problem**

The previous implementation used the `/models` endpoint, which returned
an exhaustive list of all models supported by OpenRouter. This resulted
in a long and cluttered model selection dropdown in Zed, making it
difficult for users to find the models they actually use.

**The Solution**

We now use the `/models/user` endpoint. This API call returns a curated
list based on the models and providers the user has selected in their
[OpenRouter dashboard](https://openrouter.ai/models).

Ref: [OpenRouter API Docs for User-Filtered
Models](https://openrouter.ai/docs/api-reference/list-models-filtered-by-user-provider-preferences)

Release Notes:

- language_models: Support OpenRouter user preferences for available
models
```

## Parents

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

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