Open router provider filter (#5208)

* Added filter for OpenRouter models provider selection

Now if a model is selected, only available providers for that model will show. Wanted to do the same for the quants, but I think the API is not returning the quants available for each model at the moment. Used existing API that for some reason was not consumed.

* Added filter for OpenRouter providers

Now if a model is selected, only the providers available show. Wanted to do the same with the quants but it seems the OpenRouter API is not giving the available quants list at the moment for each model.

* gua

* Now it also works on chat completion and only disables options

* detail

* Warning added

* eslint

* Move inline styles to CSS

---------

Co-authored-by: Cohee <18619528+Cohee1207@users.noreply.github.com>
This commit is contained in:
GERNOMA
2026-02-24 15:40:42 -03:00
committed by GitHub
parent 334635ce74
commit 8f5c8f0a8e
5 changed files with 105 additions and 3 deletions
+8 -2
View File
@@ -2460,7 +2460,10 @@
</select>
</div>
<div>
<h4 data-i18n="Model Providers">Model Providers</h4>
<h4>
<span data-i18n="Model Providers">Model Providers</span>
<i id="openrouter_provider_warning_text" class="fa-solid fa-circle-exclamation displayNone" title="Deselect inapplicable provider(s) or select an applicable provider to avoid a 404 error."></i>
</h4>
<select id="openrouter_providers_text" class="openrouter_providers" multiple>
</select>
<label class="checkbox_label" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." for="openrouter_allow_fallbacks_textgenerationwebui" title="Automatically chooses an alternative provider if chosen providers can't serve your request.">
@@ -3214,7 +3217,10 @@
</div>
</div>
<div>
<h4 data-i18n="Model Providers">Model Providers</h4>
<h4>
<span data-i18n="Model Providers">Model Providers</span>
<i id="openrouter_provider_warning_chat" class="fa-solid fa-circle-exclamation displayNone" title="Deselect inapplicable provider(s) or select an applicable provider to avoid a 404 error."></i>
</h4>
<select id="openrouter_providers_chat" class="openrouter_providers" multiple>
</select>
<label class="checkbox_label marginTopBot5" for="openrouter_allow_fallbacks" data-i18n="[title]Automatically chooses an alternative provider if chosen providers can't serve your request." title="Automatically chooses an alternative provider if chosen providers can't serve your request.">