Filter null-values from /model selection

4522d3cbae85b5a29d3175bd979adf48fa05eef5

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +12 -12Ignore whitespace
public/index.html+11 -11
@@ -2071,7 +2071,7 @@
2071 <div>2071 <div>
2072 <h4 data-i18n="TogetherAI Model">TogetherAI Model</h4>2072 <h4 data-i18n="TogetherAI Model">TogetherAI Model</h4>
2073 <select id="model_togetherai_select">2073 <select id="model_togetherai_select">
2074 <option data-i18n="-- Connect to the API --">2074 <option value="" data-i18n="-- Connect to the API --">
2075 -- Connect to the API --2075 -- Connect to the API --
2076 </option>2076 </option>
2077 </select>2077 </select>
@@ -2095,7 +2095,7 @@
2095 <div>2095 <div>
2096 <h4 data-i18n="OpenRouter Model">OpenRouter Model</h4>2096 <h4 data-i18n="OpenRouter Model">OpenRouter Model</h4>
2097 <select id="openrouter_model">2097 <select id="openrouter_model">
2098 <option data-i18n="-- Connect to the API --">2098 <option value="" data-i18n="-- Connect to the API --">
2099 -- Connect to the API --2099 -- Connect to the API --
2100 </option>2100 </option>
2101 </select>2101 </select>
@@ -2122,7 +2122,7 @@
2122 <div>2122 <div>
2123 <h4 data-i18n="InfermaticAI Model">InfermaticAI Model</h4>2123 <h4 data-i18n="InfermaticAI Model">InfermaticAI Model</h4>
2124 <select id="model_infermaticai_select">2124 <select id="model_infermaticai_select">
2125 <option>2125 <option value="" data-i18n="-- Connect to the API --">
2126 -- Connect to the API --2126 -- Connect to the API --
2127 </option>2127 </option>
2128 </select>2128 </select>
@@ -2145,7 +2145,7 @@
2145 <div>2145 <div>
2146 <h4 data-i18n="DreamGen Model">DreamGen Model</h4>2146 <h4 data-i18n="DreamGen Model">DreamGen Model</h4>
2147 <select id="model_dreamgen_select">2147 <select id="model_dreamgen_select">
2148 <option>2148 <option value="" data-i18n="-- Connect to the API --">
2149 -- Connect to the API --2149 -- Connect to the API --
2150 </option>2150 </option>
2151 </select>2151 </select>
@@ -2171,7 +2171,7 @@
2171 <div class="flex1">2171 <div class="flex1">
2172 <h4 data-i18n="Mancer Model">Mancer Model</h4>2172 <h4 data-i18n="Mancer Model">Mancer Model</h4>
2173 <select id="mancer_model">2173 <select id="mancer_model">
2174 <option data-i18n="-- Connect to the API --">2174 <option value="" data-i18n="-- Connect to the API --">
2175 -- Connect to the API --2175 -- Connect to the API --
2176 </option>2176 </option>
2177 </select>2177 </select>
@@ -2221,7 +2221,7 @@
2221 For privacy reasons, your API key will be hidden after you reload the page.2221 For privacy reasons, your API key will be hidden after you reload the page.
2222 </div>2222 </div>
2223 <select id="featherless_model">2223 <select id="featherless_model">
2224 <option data-i18n="-- Connect to the API --">2224 <option value="" data-i18n="-- Connect to the API --">
2225 -- Connect to the API --2225 -- Connect to the API --
2226 </option>2226 </option>
2227 </select>2227 </select>
@@ -2249,7 +2249,7 @@
2249 <div>2249 <div>
2250 <h4 data-i18n="vLLM Model">vLLM Model</h4>2250 <h4 data-i18n="vLLM Model">vLLM Model</h4>
2251 <select id="vllm_model">2251 <select id="vllm_model">
2252 <option data-i18n="-- Connect to the API --">2252 <option value="" data-i18n="-- Connect to the API --">
2253 -- Connect to the API --2253 -- Connect to the API --
2254 </option>2254 </option>
2255 </select>2255 </select>
@@ -2295,7 +2295,7 @@
2295 <div>2295 <div>
2296 <h4 data-i18n="Aphrodite Model">Aphrodite Model</h4>2296 <h4 data-i18n="Aphrodite Model">Aphrodite Model</h4>
2297 <select id="aphrodite_model">2297 <select id="aphrodite_model">
2298 <option data-i18n="-- Connect to the API --">2298 <option value="" data-i18n="-- Connect to the API --">
2299 -- Connect to the API --2299 -- Connect to the API --
2300 </option>2300 </option>
2301 </select>2301 </select>
@@ -2338,7 +2338,7 @@
2338 <span data-i18n="Ollama Model">Ollama Model</span>2338 <span data-i18n="Ollama Model">Ollama Model</span>
2339 </h4>2339 </h4>
2340 <select id="ollama_model">2340 <select id="ollama_model">
2341 <option data-i18n="-- Connect to the API --">2341 <option value="" data-i18n="-- Connect to the API --">
2342 -- Connect to the API --2342 -- Connect to the API --
2343 </option>2343 </option>
2344 </select>2344 </select>
@@ -2376,7 +2376,7 @@
2376 EXPERIMENTAL FEATURE. USE AT YOUR OWN RISK. DON'T ASK FOR SUPPORT ON THIS.2376 EXPERIMENTAL FEATURE. USE AT YOUR OWN RISK. DON'T ASK FOR SUPPORT ON THIS.
2377 </b>2377 </b>
2378 <select id="tabby_model">2378 <select id="tabby_model">
2379 <option data-i18n="-- Connect to the API --">2379 <option value="" data-i18n="-- Connect to the API --">
2380 -- Connect to the API --2380 -- Connect to the API --
2381 </option>2381 </option>
2382 </select>2382 </select>
@@ -2704,7 +2704,7 @@
2704 <div>2704 <div>
2705 <h4 data-i18n="OpenRouter Model">OpenRouter Model</h4>2705 <h4 data-i18n="OpenRouter Model">OpenRouter Model</h4>
2706 <select id="model_openrouter_select">2706 <select id="model_openrouter_select">
2707 <option data-i18n="-- Connect to the API --">-- Connect to the API --</option>2707 <option value="" data-i18n="-- Connect to the API --">-- Connect to the API --</option>
2708 </select>2708 </select>
2709 </div>2709 </div>
2710 <label for="openrouter_use_fallback" class="checkbox_label marginTopBot5" data-i18n="[title]Allow fallback routes Description" title="Automatically chooses an alternative model if the chosen model can't serve your request.">2710 <label for="openrouter_use_fallback" class="checkbox_label marginTopBot5" data-i18n="[title]Allow fallback routes Description" title="Automatically chooses an alternative model if the chosen model can't serve your request.">
public/scripts/slash-commands.js+1 -1
@@ -3470,7 +3470,7 @@ function getModelOptions(quiet) {
3470 return nullResult;3470 return nullResult;
3471 }3471 }
34723472
3473 const options = Array.from(modelSelectControl.options);3473 const options = Array.from(modelSelectControl.options).filter(x => x.value);
3474 return { control: modelSelectControl, options };3474 return { control: modelSelectControl, options };
3475}3475}
34763476