feat(LangChain Nodes): Upgrade LangChain and improve proxy handling for LLM nodes (#16778)

This commit is contained in:
Eugene
2025-07-03 14:22:25 +02:00
committed by GitHub
parent c1ac8c19ef
commit cfe3699782
18 changed files with 368 additions and 299 deletions

View File

@@ -1,7 +1,7 @@
import type { ILoadOptionsFunctions, INodeListSearchResult } from 'n8n-workflow';
import OpenAI from 'openai';
import { getHttpProxyAgent } from '@utils/httpProxyAgent';
import { getProxyAgent } from '@utils/httpProxyAgent';
export async function searchModels(
this: ILoadOptionsFunctions,
@@ -16,7 +16,9 @@ export async function searchModels(
const openai = new OpenAI({
baseURL,
apiKey: credentials.apiKey as string,
httpAgent: getHttpProxyAgent(),
fetchOptions: {
dispatcher: getProxyAgent(baseURL),
},
});
const { data: models = [] } = await openai.models.list();