mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(core): Do not use url.includes to check for domain names (#13802)
This commit is contained in:
committed by
GitHub
parent
9d698edceb
commit
d3bc80c22b
@@ -15,8 +15,9 @@ export async function searchModels(
|
||||
const { data: models = [] } = await openai.models.list();
|
||||
|
||||
const filteredModels = models.filter((model: { id: string }) => {
|
||||
const url = baseURL && new URL(baseURL);
|
||||
const isValidModel =
|
||||
(baseURL && !baseURL.includes('api.openai.com')) ||
|
||||
(url && url.hostname !== 'api.openai.com') ||
|
||||
model.id.startsWith('ft:') ||
|
||||
model.id.startsWith('o1') ||
|
||||
model.id.startsWith('o3') ||
|
||||
|
||||
Reference in New Issue
Block a user