mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-16 09:36:44 +00:00
fix: Make sure modals are listed when using a free AI credits credential in the OpenAI node (#16030)
This commit is contained in:
@@ -77,7 +77,7 @@ export async function modelSearch(
|
||||
): Promise<INodeListSearchResult> {
|
||||
const credentials = await this.getCredentials<{ url: string }>('openAiApi');
|
||||
const url = credentials.url && new URL(credentials.url);
|
||||
const isCustomAPI = url && url.hostname !== 'api.openai.com';
|
||||
const isCustomAPI = url && !['api.openai.com', 'ai-assistant.n8n.io'].includes(url.hostname);
|
||||
return await getModelSearch(
|
||||
(model) =>
|
||||
!isCustomAPI &&
|
||||
|
||||
Reference in New Issue
Block a user