Handle unknown chat completion sources gracefully by logging an error and returning an empty string

09f2b2f731f79a1df6a8382db2a2b447bbc9e433

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

1 files changed, +2 -1Showing whitespace changes
public/scripts/openai.js+2 -1
@@ -1661,7 +1661,8 @@ export function getChatCompletionModel(source = null) {
16611661 case chat_completion_sources.XAI:
16621662 return oai_settings.xai_model;
16631663 default:
16641664 throw new Errorconsole.error(`Unknown chat completion source: ${activeSource}`);
1665+ return '';
16651666 }
16661667}
16671668