Skip status check of invalid custom endpoint URLs Fixes #3683

e60796548b09da92db3645a991a84f5cec6206b8

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

1 files changed, +7 -0Ignore whitespace
public/scripts/openai.js+7 -0
@@ -57,6 +57,7 @@ import {
57 getSortableDelay,57 getSortableDelay,
58 getStringHash,58 getStringHash,
59 isDataURL,59 isDataURL,
60 isValidUrl,
60 parseJsonFile,61 parseJsonFile,
61 resetScrollHeight,62 resetScrollHeight,
62 stringFormat,63 stringFormat,
@@ -3490,6 +3491,12 @@ async function getStatusOpen() {
3490 return resultCheckStatus();3491 return resultCheckStatus();
3491 }3492 }
34923493
3494 if (oai_settings.chat_completion_source === chat_completion_sources.CUSTOM && !isValidUrl(oai_settings.custom_url)) {
3495 console.debug('Invalid endpoint URL of Custom OpenAI API:', oai_settings.custom_url);
3496 setOnlineStatus('no_connection');
3497 return resultCheckStatus();
3498 }
3499
3493 let data = {3500 let data = {
3494 reverse_proxy: oai_settings.reverse_proxy,3501 reverse_proxy: oai_settings.reverse_proxy,
3495 proxy_password: oai_settings.proxy_password,3502 proxy_password: oai_settings.proxy_password,