mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
fix(OpenAI Chat Model Node): Respect baseURL override for /models (#10076)
This commit is contained in:
@@ -97,6 +97,18 @@ export class LmOpenAi implements INodeType {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName:
|
||||
'When using non OpenAI models via Base URL override, not all models might be chat-compatible or support other features, like tools calling or JSON response format.',
|
||||
name: 'notice',
|
||||
type: 'notice',
|
||||
default: '',
|
||||
displayOptions: {
|
||||
show: {
|
||||
'/options.baseURL': [{ _cnd: { exists: true } }],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
@@ -198,7 +210,7 @@ export class LmOpenAi implements INodeType {
|
||||
})) as { data: Array<{ owned_by: string; id: string }> };
|
||||
|
||||
for (const model of data) {
|
||||
if (!model.owned_by?.startsWith('system')) continue;
|
||||
if (!options.baseURL && !model.owned_by?.startsWith('system')) continue;
|
||||
results.push({
|
||||
name: model.id,
|
||||
value: model.id,
|
||||
|
||||
Reference in New Issue
Block a user