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

@@ -7,7 +7,7 @@ import {
type SupplyData,
} from 'n8n-workflow';
import { getHttpProxyAgent } from '@utils/httpProxyAgent';
import { getProxyAgent } from '@utils/httpProxyAgent';
import { getConnectionHintNoticeField } from '@utils/sharedFields';
import type { OpenAICompatibleCredential } from '../../../types/types';
@@ -227,7 +227,9 @@ export class LmChatOpenRouter implements INodeType {
const configuration: ClientOptions = {
baseURL: credentials.url,
httpAgent: getHttpProxyAgent(),
fetchOptions: {
dispatcher: getProxyAgent(credentials.url),
},
};
const model = new ChatOpenAI({