mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +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> {
|
): Promise<INodeListSearchResult> {
|
||||||
const credentials = await this.getCredentials<{ url: string }>('openAiApi');
|
const credentials = await this.getCredentials<{ url: string }>('openAiApi');
|
||||||
const url = credentials.url && new URL(credentials.url);
|
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(
|
return await getModelSearch(
|
||||||
(model) =>
|
(model) =>
|
||||||
!isCustomAPI &&
|
!isCustomAPI &&
|
||||||
|
|||||||
Reference in New Issue
Block a user