Add custom_openai models only if custom_openai is configured

This commit is contained in:
C H 2025-05-29 22:19:28 +02:00
parent bcebdb5fd9
commit 70919ea228

View file

@ -104,6 +104,7 @@ export const getAvailableChatModelProviders = async () => {
const customOpenAiApiUrl = getCustomOpenaiApiUrl();
const customOpenAiModelName = getCustomOpenaiModelName();
if (customOpenAiApiKey && customOpenAiApiUrl && customOpenAiModelName) {
models['custom_openai'] = {
...(customOpenAiApiKey && customOpenAiApiUrl && customOpenAiModelName
? {
@ -121,6 +122,7 @@ export const getAvailableChatModelProviders = async () => {
}
: {}),
};
};
return models;
};