diff --git a/src/api/Providers/special/custom_openai.js b/src/api/Providers/special/custom_openai.js index 23970f80..13058f3d 100644 --- a/src/api/Providers/special/custom_openai.js +++ b/src/api/Providers/special/custom_openai.js @@ -17,7 +17,7 @@ export const getOpenAIModels = async (url, apiKey) => { headers: getHeaders(apiKey), }); const data = (await response.json()).data; - const res = data.map((x) => x.id); + const res = data.map((x) => x.id || x.modelId || null).filter((x) => x !== null); return res; };