From cfe36997827467d6af7bf4d752dac6297902545d Mon Sep 17 00:00:00 2001 From: Eugene Date: Thu, 3 Jul 2025 14:22:25 +0200 Subject: [PATCH] feat(LangChain Nodes): Upgrade LangChain and improve proxy handling for LLM nodes (#16778) --- package.json | 1 - .../LMChatAnthropic/LmChatAnthropic.node.ts | 6 +- .../llms/LMChatOpenAi/LmChatOpenAi.node.ts | 13 +- .../methods/__tests__/loadModels.test.ts | 30 +- .../llms/LMChatOpenAi/methods/loadModels.ts | 6 +- .../nodes/llms/LMOpenAi/LmOpenAi.node.ts | 7 +- .../LmChatAwsBedrock/LmChatAwsBedrock.node.ts | 4 +- .../LmChatAzureOpenAi.node.ts | 6 +- .../LmChatDeepSeek/LmChatDeepSeek.node.ts | 6 +- .../nodes/llms/LmChatGroq/LmChatGroq.node.ts | 4 +- .../LmChatOpenRouter/LmChatOpenRouter.node.ts | 6 +- .../llms/LmChatXAiGrok/LmChatXAiGrok.node.ts | 6 +- .../OpenAi/helpers/error-handling.test.ts | 2 +- packages/@n8n/nodes-langchain/package.json | 10 +- .../nodes-langchain/utils/httpProxyAgent.ts | 24 +- .../utils/tests/httpProxyAgent.test.ts | 165 +++++--- pnpm-lock.yaml | 363 ++++++++---------- pnpm-workspace.yaml | 8 +- 18 files changed, 368 insertions(+), 299 deletions(-) diff --git a/package.json b/package.json index c56d5e4a38..68a380fddf 100644 --- a/package.json +++ b/package.json @@ -100,7 +100,6 @@ "vue-tsc": "^2.2.8", "google-gax": "^4.3.7", "ws": ">=8.17.1", - "zod": "3.25.67", "brace-expansion@1": "1.1.12", "brace-expansion@2": "2.0.2", "date-fns": "2.30.0", diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.ts index 8ee1165d47..f5053fda35 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LMChatAnthropic/LmChatAnthropic.node.ts @@ -10,7 +10,7 @@ import { type SupplyData, } from 'n8n-workflow'; -import { getHttpProxyAgent } from '@utils/httpProxyAgent'; +import { getProxyAgent } from '@utils/httpProxyAgent'; import { getConnectionHintNoticeField } from '@utils/sharedFields'; import { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler'; @@ -329,7 +329,9 @@ export class LmChatAnthropic implements INodeType { onFailedAttempt: makeN8nLlmFailedAttemptHandler(this), invocationKwargs, clientOptions: { - httpAgent: getHttpProxyAgent(), + fetchOptions: { + dispatcher: getProxyAgent(baseURL), + }, }, }); diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.ts index 85908adeea..7c5b4d2c2e 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/LmChatOpenAi.node.ts @@ -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 { searchModels } from './methods/loadModels'; @@ -345,15 +345,20 @@ export class LmChatOpenAi implements INodeType { reasoningEffort?: 'low' | 'medium' | 'high'; }; - const configuration: ClientOptions = { - httpAgent: getHttpProxyAgent(), - }; + const configuration: ClientOptions = {}; + if (options.baseURL) { configuration.baseURL = options.baseURL; } else if (credentials.url) { configuration.baseURL = credentials.url as string; } + if (configuration.baseURL) { + configuration.fetchOptions = { + dispatcher: getProxyAgent(configuration.baseURL ?? 'https://api.openai.com/v1'), + }; + } + // Extra options to send to OpenAI, that are not directly supported by LangChain const modelKwargs: { response_format?: object; diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/__tests__/loadModels.test.ts b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/__tests__/loadModels.test.ts index ad6e2e5753..e9b1904e28 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/__tests__/loadModels.test.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/__tests__/loadModels.test.ts @@ -54,10 +54,12 @@ describe('searchModels', () => { it('should return filtered models if custom API endpoint is not provided', async () => { const result = await searchModels.call(mockContext); - expect(mockOpenAI).toHaveBeenCalledWith({ - baseURL: 'https://api.openai.com/v1', - apiKey: 'test-api-key', - }); + expect(mockOpenAI).toHaveBeenCalledWith( + expect.objectContaining({ + baseURL: 'https://api.openai.com/v1', + apiKey: 'test-api-key', + }), + ); expect(result.results).toEqual([ { name: 'ft:gpt-3.5-turbo', value: 'ft:gpt-3.5-turbo' }, { name: 'gpt-3.5-turbo', value: 'gpt-3.5-turbo' }, @@ -74,10 +76,12 @@ describe('searchModels', () => { }); await searchModels.call(mockContext); - expect(mockOpenAI).toHaveBeenCalledWith({ - baseURL: 'https://test-url.com', - apiKey: 'test-api-key', - }); + expect(mockOpenAI).toHaveBeenCalledWith( + expect.objectContaining({ + baseURL: 'https://test-url.com', + apiKey: 'test-api-key', + }), + ); }); it('should use default OpenAI URL if no custom URL provided', async () => { @@ -87,10 +91,12 @@ describe('searchModels', () => { await searchModels.call(mockContext); - expect(mockOpenAI).toHaveBeenCalledWith({ - baseURL: 'https://api.openai.com/v1', - apiKey: 'test-api-key', - }); + expect(mockOpenAI).toHaveBeenCalledWith( + expect.objectContaining({ + baseURL: 'https://api.openai.com/v1', + apiKey: 'test-api-key', + }), + ); }); it('should include all models for custom API endpoints', async () => { diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/loadModels.ts b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/loadModels.ts index 31e3f45ba7..fe96052428 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/loadModels.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LMChatOpenAi/methods/loadModels.ts @@ -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(); diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LMOpenAi/LmOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LMOpenAi/LmOpenAi.node.ts index 7f7e8aecab..80fe17e14c 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LMOpenAi/LmOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LMOpenAi/LmOpenAi.node.ts @@ -8,7 +8,7 @@ import type { ILoadOptionsFunctions, } from 'n8n-workflow'; -import { getHttpProxyAgent } from '@utils/httpProxyAgent'; +import { getProxyAgent } from '@utils/httpProxyAgent'; import { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler'; import { N8nLlmTracing } from '../N8nLlmTracing'; @@ -250,8 +250,11 @@ export class LmOpenAi implements INodeType { }; const configuration: ClientOptions = { - httpAgent: getHttpProxyAgent(), + fetchOptions: { + dispatcher: getProxyAgent(options.baseURL ?? 'https://api.openai.com/v1'), + }, }; + if (options.baseURL) { configuration.baseURL = options.baseURL; } diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.ts index d1633b5515..fa8da0b03f 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAwsBedrock/LmChatAwsBedrock.node.ts @@ -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 { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler'; @@ -147,7 +147,7 @@ export class LmChatAwsBedrock implements INodeType { temperature: options.temperature, maxTokens: options.maxTokensToSample, clientConfig: { - httpAgent: getHttpProxyAgent(), + httpAgent: getProxyAgent(), }, credentials: { secretAccessKey: credentials.secretAccessKey as string, diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts index eafc14f5fb..31d4b824c9 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatAzureOpenAi/LmChatAzureOpenAi.node.ts @@ -8,7 +8,7 @@ import { type SupplyData, } from 'n8n-workflow'; -import { getHttpProxyAgent } from '@utils/httpProxyAgent'; +import { getProxyAgent } from '@utils/httpProxyAgent'; import { setupApiKeyAuthentication } from './credentials/api-key'; import { setupOAuth2Authentication } from './credentials/oauth2'; @@ -112,7 +112,9 @@ export class LmChatAzureOpenAi implements INodeType { maxRetries: options.maxRetries ?? 2, callbacks: [new N8nLlmTracing(this)], configuration: { - httpAgent: getHttpProxyAgent(), + fetchOptions: { + dispatcher: getProxyAgent(), + }, }, modelKwargs: options.responseFormat ? { diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.ts index e1ee08d2f5..87b0eea9ba 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatDeepSeek/LmChatDeepSeek.node.ts @@ -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'; @@ -228,7 +228,9 @@ export class LmChatDeepSeek implements INodeType { const configuration: ClientOptions = { baseURL: credentials.url, - httpAgent: getHttpProxyAgent(), + fetchOptions: { + dispatcher: getProxyAgent(credentials.url), + }, }; const model = new ChatOpenAI({ diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatGroq/LmChatGroq.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatGroq/LmChatGroq.node.ts index e76a864e13..c4c3b53fbe 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatGroq/LmChatGroq.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatGroq/LmChatGroq.node.ts @@ -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 { makeN8nLlmFailedAttemptHandler } from '../n8nLlmFailedAttemptHandler'; @@ -146,7 +146,7 @@ export class LmChatGroq implements INodeType { maxTokens: options.maxTokensToSample, temperature: options.temperature, callbacks: [new N8nLlmTracing(this)], - httpAgent: getHttpProxyAgent(), + httpAgent: getProxyAgent('https://api.groq.com/openai/v1'), onFailedAttempt: makeN8nLlmFailedAttemptHandler(this), }); diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.ts index 7e4450e5b9..d57ea3c323 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatOpenRouter/LmChatOpenRouter.node.ts @@ -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({ diff --git a/packages/@n8n/nodes-langchain/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.ts b/packages/@n8n/nodes-langchain/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.ts index 9e00dac432..dd39ab1a2c 100644 --- a/packages/@n8n/nodes-langchain/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.ts +++ b/packages/@n8n/nodes-langchain/nodes/llms/LmChatXAiGrok/LmChatXAiGrok.node.ts @@ -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'; @@ -228,7 +228,9 @@ export class LmChatXAiGrok implements INodeType { const configuration: ClientOptions = { baseURL: credentials.url, - httpAgent: getHttpProxyAgent(), + fetchOptions: { + dispatcher: getProxyAgent(credentials.url), + }, }; const model = new ChatOpenAI({ diff --git a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.test.ts b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.test.ts index 13fcf0877d..67662fe3fb 100644 --- a/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.test.ts +++ b/packages/@n8n/nodes-langchain/nodes/vendors/OpenAi/helpers/error-handling.test.ts @@ -36,7 +36,7 @@ describe('error-handling', () => { 429, { code: 'rate_limit_exceeded' }, 'Rate limit exceeded', - {}, + new Headers(), ); try { diff --git a/packages/@n8n/nodes-langchain/package.json b/packages/@n8n/nodes-langchain/package.json index 74ed11dc19..17ecb194a2 100644 --- a/packages/@n8n/nodes-langchain/package.json +++ b/packages/@n8n/nodes-langchain/package.json @@ -174,7 +174,7 @@ "@langchain/groq": "0.2.3", "@langchain/mistralai": "0.2.1", "@langchain/mongodb": "^0.1.0", - "@langchain/ollama": "0.2.2", + "@langchain/ollama": "0.2.3", "@langchain/openai": "catalog:", "@langchain/pinecone": "0.2.0", "@langchain/qdrant": "0.1.2", @@ -202,23 +202,25 @@ "generate-schema": "2.6.0", "html-to-text": "9.0.5", "https-proxy-agent": "catalog:", - "jsdom": "23.0.1", "js-tiktoken": "^1.0.12", - "langchain": "0.3.28", + "jsdom": "23.0.1", + "langchain": "0.3.29", "lodash": "catalog:", "mammoth": "1.7.2", "mime-types": "2.1.35", "mongodb": "6.11.0", "n8n-nodes-base": "workspace:*", "n8n-workflow": "workspace:*", - "openai": "4.103.0", + "openai": "5.8.1", "pdf-parse": "1.1.1", "pg": "8.12.0", + "proxy-from-env": "^1.1.0", "redis": "4.6.12", "sanitize-html": "2.12.1", "sqlite3": "5.1.7", "temp": "0.9.4", "tmp-promise": "3.0.3", + "undici": "^6.21.0", "weaviate-client": "3.6.2", "zod": "catalog:", "zod-to-json-schema": "3.23.3" diff --git a/packages/@n8n/nodes-langchain/utils/httpProxyAgent.ts b/packages/@n8n/nodes-langchain/utils/httpProxyAgent.ts index 4dfa867c8f..bc894830ca 100644 --- a/packages/@n8n/nodes-langchain/utils/httpProxyAgent.ts +++ b/packages/@n8n/nodes-langchain/utils/httpProxyAgent.ts @@ -1,11 +1,19 @@ -import { HttpsProxyAgent } from 'https-proxy-agent'; +import proxyFromEnv from 'proxy-from-env'; +import { ProxyAgent } from 'undici'; -export function getHttpProxyAgent() { - const httpProxy = - process.env.HTTPS_PROXY ?? - process.env.https_proxy ?? - process.env.HTTP_PROXY ?? - process.env.http_proxy; +/** + * Returns a ProxyAgent or undefined based on the environment variables and target URL. + * When target URL is not provided, NO_PROXY environment variable is not respected. + */ +export function getProxyAgent(targetUrl?: string) { + // There are cases where we don't know the target URL in advance (e.g. when we need to provide a proxy agent to ChatAwsBedrock) + // In such case we use a dummy URL. + // This will lead to `NO_PROXY` environment variable not being respected, but it is better than not having a proxy agent at all. + const proxyUrl = proxyFromEnv.getProxyForUrl(targetUrl ?? 'https://example.nonexistent/'); - return httpProxy ? new HttpsProxyAgent(httpProxy) : undefined; + if (!proxyUrl) { + return undefined; + } + + return new ProxyAgent(proxyUrl); } diff --git a/packages/@n8n/nodes-langchain/utils/tests/httpProxyAgent.test.ts b/packages/@n8n/nodes-langchain/utils/tests/httpProxyAgent.test.ts index b98724916a..24782e0438 100644 --- a/packages/@n8n/nodes-langchain/utils/tests/httpProxyAgent.test.ts +++ b/packages/@n8n/nodes-langchain/utils/tests/httpProxyAgent.test.ts @@ -1,13 +1,13 @@ -import { HttpsProxyAgent } from 'https-proxy-agent'; +import { ProxyAgent } from 'undici'; -import { getHttpProxyAgent } from '../httpProxyAgent'; +import { getProxyAgent } from '../httpProxyAgent'; -// Mock the https-proxy-agent package -jest.mock('https-proxy-agent', () => ({ - HttpsProxyAgent: jest.fn().mockImplementation((url) => ({ proxyUrl: url })), +// Mock the dependencies +jest.mock('undici', () => ({ + ProxyAgent: jest.fn().mockImplementation((url) => ({ proxyUrl: url })), })); -describe('getHttpProxyAgent', () => { +describe('getProxyAgent', () => { // Store original environment variables const originalEnv = { ...process.env }; @@ -19,6 +19,8 @@ describe('getHttpProxyAgent', () => { delete process.env.http_proxy; delete process.env.HTTPS_PROXY; delete process.env.https_proxy; + delete process.env.NO_PROXY; + delete process.env.no_proxy; }); // Restore original environment after all tests @@ -26,63 +28,130 @@ describe('getHttpProxyAgent', () => { process.env = originalEnv; }); - it('should return undefined when no proxy environment variables are set', () => { - const agent = getHttpProxyAgent(); - expect(agent).toBeUndefined(); - expect(HttpsProxyAgent).not.toHaveBeenCalled(); + describe('target URL not provided', () => { + it('should return undefined when no proxy environment variables are set', () => { + const agent = getProxyAgent(); + expect(agent).toBeUndefined(); + expect(ProxyAgent).not.toHaveBeenCalled(); + }); + + it('should create ProxyAgent when HTTPS_PROXY is set', () => { + const proxyUrl = 'https://proxy.example.com:8080'; + process.env.HTTPS_PROXY = proxyUrl; + + const agent = getProxyAgent(); + + expect(agent).toEqual({ proxyUrl }); + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + }); + + it('should create ProxyAgent when https_proxy is set', () => { + const proxyUrl = 'https://proxy.example.com:8080'; + process.env.https_proxy = proxyUrl; + + const agent = getProxyAgent(); + + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + expect(agent).toEqual({ proxyUrl }); + }); + + it('should respect priority order of proxy environment variables', () => { + // Set multiple proxy environment variables + process.env.HTTP_PROXY = 'http://http-proxy.example.com:8080'; + process.env.http_proxy = 'http://http-proxy-lowercase.example.com:8080'; + process.env.HTTPS_PROXY = 'https://https-proxy.example.com:8080'; + process.env.https_proxy = 'https://https-proxy-lowercase.example.com:8080'; + + const agent = getProxyAgent(); + + // Should use https_proxy as it has highest priority now + expect(ProxyAgent).toHaveBeenCalledWith('https://https-proxy-lowercase.example.com:8080'); + expect(agent).toEqual({ proxyUrl: 'https://https-proxy-lowercase.example.com:8080' }); + }); }); - it('should create HttpsProxyAgent when HTTP_PROXY is set', () => { - const proxyUrl = 'http://proxy.example.com:8080'; - process.env.HTTP_PROXY = proxyUrl; + describe('target URL provided', () => { + it('should return undefined when no proxy is configured', () => { + const agent = getProxyAgent('https://api.openai.com/v1'); - const agent = getHttpProxyAgent(); + expect(agent).toBeUndefined(); + expect(ProxyAgent).not.toHaveBeenCalled(); + }); - expect(HttpsProxyAgent).toHaveBeenCalledWith(proxyUrl); - expect(agent).toEqual({ proxyUrl }); - }); + it('should create ProxyAgent for HTTPS URL when HTTPS_PROXY is set', () => { + const proxyUrl = 'https://proxy.example.com:8080'; + process.env.HTTPS_PROXY = proxyUrl; - it('should create HttpsProxyAgent when http_proxy is set', () => { - const proxyUrl = 'http://proxy.example.com:8080'; - process.env.http_proxy = proxyUrl; + const agent = getProxyAgent('https://api.openai.com/v1'); - const agent = getHttpProxyAgent(); + expect(agent).toEqual({ proxyUrl }); + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + }); - expect(HttpsProxyAgent).toHaveBeenCalledWith(proxyUrl); - expect(agent).toEqual({ proxyUrl }); - }); + it('should create ProxyAgent for HTTP URL when HTTP_PROXY is set', () => { + const proxyUrl = 'http://proxy.example.com:8080'; + process.env.HTTP_PROXY = proxyUrl; - it('should create HttpsProxyAgent when HTTPS_PROXY is set', () => { - const proxyUrl = 'http://proxy.example.com:8080'; - process.env.HTTPS_PROXY = proxyUrl; + const agent = getProxyAgent('http://api.example.com'); - const agent = getHttpProxyAgent(); + expect(agent).toEqual({ proxyUrl }); + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + }); - expect(HttpsProxyAgent).toHaveBeenCalledWith(proxyUrl); - expect(agent).toEqual({ proxyUrl }); - }); + it('should use HTTPS_PROXY for HTTPS URLs even when HTTP_PROXY is set', () => { + const httpProxy = 'http://http-proxy.example.com:8080'; + const httpsProxy = 'https://https-proxy.example.com:8443'; + process.env.HTTP_PROXY = httpProxy; + process.env.HTTPS_PROXY = httpsProxy; - it('should create HttpsProxyAgent when https_proxy is set', () => { - const proxyUrl = 'http://proxy.example.com:8080'; - process.env.https_proxy = proxyUrl; + const agent = getProxyAgent('https://api.openai.com/v1'); - const agent = getHttpProxyAgent(); + expect(agent).toEqual({ proxyUrl: httpsProxy }); + expect(ProxyAgent).toHaveBeenCalledWith(httpsProxy); + }); - expect(HttpsProxyAgent).toHaveBeenCalledWith(proxyUrl); - expect(agent).toEqual({ proxyUrl }); - }); + it('should respect NO_PROXY for localhost', () => { + const proxyUrl = 'http://proxy.example.com:8080'; + process.env.HTTP_PROXY = proxyUrl; + process.env.NO_PROXY = 'localhost,127.0.0.1'; - it('should respect priority order of proxy environment variables', () => { - // Set multiple proxy environment variables - process.env.HTTP_PROXY = 'http://http-proxy.example.com:8080'; - process.env.http_proxy = 'http://http-proxy-lowercase.example.com:8080'; - process.env.HTTPS_PROXY = 'http://https-proxy.example.com:8080'; - process.env.https_proxy = 'http://https-proxy-lowercase.example.com:8080'; + const agent = getProxyAgent('http://localhost:3000'); - const agent = getHttpProxyAgent(); + expect(agent).toBeUndefined(); + expect(ProxyAgent).not.toHaveBeenCalled(); + }); - // Should use HTTPS_PROXY as it has highest priority now - expect(HttpsProxyAgent).toHaveBeenCalledWith('http://https-proxy.example.com:8080'); - expect(agent).toEqual({ proxyUrl: 'http://https-proxy.example.com:8080' }); + it('should respect NO_PROXY wildcard patterns', () => { + const proxyUrl = 'http://proxy.example.com:8080'; + process.env.HTTPS_PROXY = proxyUrl; + process.env.NO_PROXY = '*.internal.company.com,localhost'; + + const agent = getProxyAgent('https://api.internal.company.com'); + + expect(agent).toBeUndefined(); + expect(ProxyAgent).not.toHaveBeenCalled(); + }); + + it('should use proxy for URLs not in NO_PROXY', () => { + const proxyUrl = 'http://proxy.example.com:8080'; + process.env.HTTPS_PROXY = proxyUrl; + process.env.NO_PROXY = 'localhost,127.0.0.1'; + + const agent = getProxyAgent('https://api.openai.com/v1'); + + expect(agent).toEqual({ proxyUrl }); + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + }); + + it('should handle mixed case environment variables', () => { + const proxyUrl = 'http://proxy.example.com:8080'; + process.env.https_proxy = proxyUrl; + process.env.no_proxy = 'localhost'; + + const agent = getProxyAgent('https://api.openai.com/v1'); + + expect(agent).toEqual({ proxyUrl }); + expect(ProxyAgent).toHaveBeenCalledWith(proxyUrl); + }); }); }); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f06909af34..c35adeda5d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,17 +7,17 @@ settings: catalogs: default: '@langchain/anthropic': - specifier: 0.3.22 - version: 0.3.22 + specifier: 0.3.23 + version: 0.3.23 '@langchain/community': - specifier: 0.3.46 - version: 0.3.46 + specifier: 0.3.47 + version: 0.3.47 '@langchain/core': - specifier: 0.3.59 - version: 0.3.59 + specifier: 0.3.61 + version: 0.3.61 '@langchain/openai': - specifier: 0.5.13 - version: 0.5.13 + specifier: 0.5.16 + version: 0.5.16 '@n8n/typeorm': specifier: 0.3.20-12 version: 0.3.20-12 @@ -126,6 +126,9 @@ catalogs: xss: specifier: 1.0.15 version: 1.0.15 + zod: + specifier: 3.25.67 + version: 3.25.67 zod-to-json-schema: specifier: 3.23.3 version: 3.23.3 @@ -195,7 +198,6 @@ overrides: vue-tsc: ^2.2.8 google-gax: ^4.3.7 ws: '>=8.17.1' - zod: 3.25.67 brace-expansion@1: 1.1.12 brace-expansion@2: 2.0.2 date-fns: 2.30.0 @@ -372,16 +374,16 @@ importers: dependencies: '@langchain/anthropic': specifier: 'catalog:' - version: 0.3.22(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + version: 0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/core': specifier: 'catalog:' - version: 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + version: 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@langchain/langgraph': specifier: 0.2.45 - version: 0.2.45(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(react@18.2.0) + version: 0.2.45(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(react@18.2.0) '@langchain/openai': specifier: 'catalog:' - version: 0.5.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(ws@8.18.2) + version: 0.5.16(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(ws@8.18.2) '@n8n/config': specifier: workspace:* version: link:../config @@ -395,7 +397,7 @@ importers: specifier: workspace:* version: link:../../workflow zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -414,7 +416,7 @@ importers: specifier: 'catalog:' version: 1.0.15 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 zod-class: specifier: 0.0.16 @@ -567,7 +569,7 @@ importers: specifier: 'catalog:' version: 0.2.2 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -764,7 +766,7 @@ importers: packages/@n8n/extension-sdk: dependencies: zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -841,7 +843,7 @@ importers: specifier: ^7.0.15 version: 7.0.15 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 packages/@n8n/nodes-langchain: @@ -854,7 +856,7 @@ importers: version: 4.3.0 '@getzep/zep-cloud': specifier: 1.0.12 - version: 1.0.12(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(langchain@0.3.28(f9561c3b67724aa0f177a38a80041072)) + version: 1.0.12(1a792e11aeaf9de4c46582c2a158f676) '@getzep/zep-js': specifier: 0.9.0 version: 0.9.0 @@ -872,55 +874,55 @@ importers: version: 2.8.0 '@langchain/anthropic': specifier: 'catalog:' - version: 0.3.22(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + version: 0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/aws': specifier: 0.1.11 - version: 0.1.11(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + version: 0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/cohere': specifier: 0.3.4 - version: 0.3.4(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + version: 0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) '@langchain/community': specifier: 'catalog:' - version: 0.3.46(6de8a673a24e563cf8f4ca63f57e8b8d) + version: 0.3.47(fe5c91724b6df225451a5efa63588a7e) '@langchain/core': specifier: 'catalog:' - version: 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + version: 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@langchain/google-genai': specifier: 0.2.13 - version: 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + version: 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/google-vertexai': specifier: 0.2.13 - version: 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + version: 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/groq': specifier: 0.2.3 - version: 0.2.3(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + version: 0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) '@langchain/mistralai': specifier: 0.2.1 - version: 0.2.1(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67) + version: 0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67) '@langchain/mongodb': specifier: ^0.1.0 - version: 0.1.0(@aws-sdk/credential-providers@3.808.0)(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(gcp-metadata@5.3.0(encoding@0.1.13))(socks@2.8.3) + version: 0.1.0(@aws-sdk/credential-providers@3.808.0)(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(gcp-metadata@5.3.0(encoding@0.1.13))(socks@2.8.3) '@langchain/ollama': - specifier: 0.2.2 - version: 0.2.2(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + specifier: 0.2.3 + version: 0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/openai': specifier: 'catalog:' - version: 0.5.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(ws@8.18.2) + version: 0.5.16(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(ws@8.18.2) '@langchain/pinecone': specifier: 0.2.0 - version: 0.2.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(@pinecone-database/pinecone@5.1.2) + version: 0.2.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@pinecone-database/pinecone@5.1.2) '@langchain/qdrant': specifier: 0.1.2 - version: 0.1.2(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(typescript@5.8.3) + version: 0.1.2(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(typescript@5.8.3) '@langchain/redis': specifier: 0.1.1 - version: 0.1.1(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + version: 0.1.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/textsplitters': specifier: 0.1.0 - version: 0.1.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + version: 0.1.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) '@langchain/weaviate': specifier: 0.2.0 - version: 0.2.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + version: 0.2.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) '@modelcontextprotocol/sdk': specifier: 1.12.0 version: 1.12.0 @@ -991,8 +993,8 @@ importers: specifier: 23.0.1 version: 23.0.1 langchain: - specifier: 0.3.28 - version: 0.3.28(f9561c3b67724aa0f177a38a80041072) + specifier: 0.3.29 + version: 0.3.29(@langchain/anthropic@0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/aws@0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/cohere@0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@langchain/google-genai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/google-vertexai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/groq@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/mistralai@0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67))(@langchain/ollama@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(axios@1.10.0)(cheerio@1.0.0)(handlebars@4.7.8)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(ws@8.18.2) lodash: specifier: 'catalog:' version: 4.17.21 @@ -1012,14 +1014,17 @@ importers: specifier: workspace:* version: link:../../workflow openai: - specifier: 4.103.0 - version: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) + specifier: 5.8.1 + version: 5.8.1(ws@8.18.2)(zod@3.25.67) pdf-parse: specifier: 1.1.1 version: 1.1.1 pg: specifier: 8.12.0 version: 8.12.0 + proxy-from-env: + specifier: ^1.1.0 + version: 1.1.0 redis: specifier: 4.6.12 version: 4.6.12 @@ -1035,11 +1040,14 @@ importers: tmp-promise: specifier: 3.0.3 version: 3.0.3 + undici: + specifier: ^6.21.0 + version: 6.21.3 weaviate-client: specifier: 3.6.2 version: 3.6.2(encoding@0.1.13) zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 zod-to-json-schema: specifier: 3.23.3 @@ -1082,7 +1090,7 @@ importers: packages/@n8n/permissions: dependencies: zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -1512,7 +1520,7 @@ importers: specifier: 21.1.1 version: 21.1.1 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -1619,7 +1627,7 @@ importers: version: 3.808.0 '@langchain/core': specifier: 'catalog:' - version: 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + version: 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@n8n/backend-common': specifier: workspace:^ version: link:../@n8n/backend-common @@ -1720,7 +1728,7 @@ importers: specifier: 'catalog:' version: 0.6.2 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@n8n/typescript-config': @@ -2939,12 +2947,12 @@ importers: specifier: 'catalog:' version: 0.6.2 zod: - specifier: 3.25.67 + specifier: 'catalog:' version: 3.25.67 devDependencies: '@langchain/core': specifier: 'catalog:' - version: 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + version: 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@n8n/config': specifier: workspace:* version: link:../@n8n/config @@ -3012,8 +3020,9 @@ packages: '@anthropic-ai/sdk@0.27.3': resolution: {integrity: sha512-IjLt0gd3L4jlOfilxVXTifn42FnVffMgDC04RJK1KDZpmkBWLv0XC92MVVmkxrFZNS/7l3xWgP/I3nqtX1sQHw==} - '@anthropic-ai/sdk@0.39.0': - resolution: {integrity: sha512-eMyDIPRZbt1CCLErRCi3exlAvNkBtRe+kW5vvJyef93PmNr/clstYgHhtvmkxN82nlKgzyGPCyGxrm0JQ1ZIdg==} + '@anthropic-ai/sdk@0.52.0': + resolution: {integrity: sha512-d4c+fg+xy9e46c8+YnrrgIQR45CZlAi7PwdzIfDXDM6ACxEZli1/fxhURsq30ZpMZy6LvSkr41jGq5aF5TD7rQ==} + hasBin: true '@apidevtools/json-schema-ref-parser@12.0.2': resolution: {integrity: sha512-SoZWqQz4YMKdw4kEMfG5w6QAy+rntjsoAT1FtvZAnVEnCR4uy9YSuDBNoVAFHgzSz0dJbISLLCSrGR2Zd7bcvA==} @@ -4007,7 +4016,7 @@ packages: deepmerge: ^4.3.1 dotenv: ^16.4.5 openai: ^4.62.1 - zod: 3.25.67 + zod: ^3.23.8 '@cfworker/json-schema@4.1.0': resolution: {integrity: sha512-/vYKi/qMxwNsuIJ9WGWwM2rflY40ZenK3Kh4uR5vB9/Nz12Y7IUN/Xf4wDA7vzPfw0VNh3b/jz4+MjcVgARKJg==} @@ -4787,8 +4796,8 @@ packages: '@kwsites/promise-deferred@1.1.1': resolution: {integrity: sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==} - '@langchain/anthropic@0.3.22': - resolution: {integrity: sha512-3vLuGzWkUC1pGNtu2vyKThiv7jZ063KGYSb2Y89D+NT5iPo5fjmujmgGo5fyoTRpSOUWLgPr7ST+8D35Wmx44g==} + '@langchain/anthropic@0.3.23': + resolution: {integrity: sha512-lwp43HUcCM0bJqJEwBwutskvV85G3R3rQDW5XNCntPDzelW+fCmlsm40P7dg7uG/3uOtDGhj4eDMapKpbPvtlA==} engines: {node: '>=18'} peerDependencies: '@langchain/core': '>=0.3.58 <0.4.0' @@ -4805,8 +4814,8 @@ packages: peerDependencies: '@langchain/core': '>=0.3.58 <0.4.0' - '@langchain/community@0.3.46': - resolution: {integrity: sha512-loix9LkoNcn1gQlVCopmrJW9TmgZb+YpZw7nkFzXT6ozR8ZDh1XlFq1ymR5gTFtdNzF0neK2oJtE9iEl1lm7Dw==} + '@langchain/community@0.3.47': + resolution: {integrity: sha512-Vo42kAfkXpTFSevhEkeqqE55az8NyQgDktCbitXYuhipNbFYx08XVvqEDkFkB20MM/Z7u+cvLb+DxCqnKuH0CQ==} engines: {node: '>=18'} peerDependencies: '@arcjet/redact': ^v1.0.0-alpha.23 @@ -4837,8 +4846,8 @@ packages: '@google-ai/generativelanguage': '*' '@google-cloud/storage': ^6.10.1 || ^7.7.0 '@gradientai/nodejs-sdk': ^1.2.0 - '@huggingface/inference': ^2.6.4 - '@huggingface/transformers': ^3.2.3 + '@huggingface/inference': ^4.0.5 + '@huggingface/transformers': ^3.5.2 '@ibm-cloud/watsonx-ai': '*' '@lancedb/lancedb': ^0.12.0 '@langchain/core': '>=0.3.58 <0.4.0' @@ -4911,7 +4920,7 @@ packages: mammoth: ^1.6.0 mariadb: ^3.4.0 mem0ai: ^2.1.8 - mongodb: '>=5.2.0' + mongodb: ^6.17.0 mysql2: ^3.9.8 neo4j-driver: '*' notion-to-md: ^3.1.0 @@ -5188,8 +5197,8 @@ packages: youtubei.js: optional: true - '@langchain/core@0.3.59': - resolution: {integrity: sha512-YAvnx0z3A8z5MvyjZzjC9ZxXZYM20ivFdUeLzANSPCoPCNIQ1/EppWP82RI24PcmWkNtuXsFVaj5juWiIpZvxg==} + '@langchain/core@0.3.61': + resolution: {integrity: sha512-4O7fw5SXNSE+uBnathLQrhm3t+7dZGagt/5kt37A+pXw0AkudxEBvveg73sSnpBd9SIz3/Vc7F4k8rCKXGbEDA==} engines: {node: '>=18'} '@langchain/google-common@0.2.13': @@ -5257,14 +5266,14 @@ packages: peerDependencies: '@langchain/core': '>=0.2.21 <0.4.0' - '@langchain/ollama@0.2.2': - resolution: {integrity: sha512-q81DnIZC5kTYF6JCzpaDU4azRxfi/iVrVHwH2Uc6RHI1yGQEYh+veQ7NGW1tGF9pyKlf8ZPLfHVxVbRbUzS1Ww==} + '@langchain/ollama@0.2.3': + resolution: {integrity: sha512-1Obe45jgQspqLMBVlayQbGdywFmri8DgmGRdzNu0li56cG5RReYlRCFVDZBRMMvF9JhsP5eXRyfyivtKfITHWQ==} engines: {node: '>=18'} peerDependencies: '@langchain/core': '>=0.3.58 <0.4.0' - '@langchain/openai@0.5.13': - resolution: {integrity: sha512-t5UsO7XYE+DBQlXQ21QK74Y+LH4It20wnENrmueNvxIWTn0nHDIGVmO6wo4rJxbmOOPRQ4l/oAxGRnYU8B8v6w==} + '@langchain/openai@0.5.16': + resolution: {integrity: sha512-TqzPE3PM0bMkQi53qs8vCFkwaEp3VgwGw+s1e8Nas5ICCZZtc2XqcDPz4hf2gpo1k7/AZd6HuPlAsDy6wye9Qw==} engines: {node: '>=18'} peerDependencies: '@langchain/core': '>=0.3.58 <0.4.0' @@ -5356,7 +5365,7 @@ packages: '@mistralai/mistralai@1.3.4': resolution: {integrity: sha512-db5UhCXqH0N05XbXMR/2bSiGKIFUzS6p0sI9Nl2XDmJuDZIm+WRGTlsq60ALwhvKpHcQKzN5L58HIneksRrn9g==} peerDependencies: - zod: 3.25.67 + zod: '>= 3' '@modelcontextprotocol/sdk@1.12.0': resolution: {integrity: sha512-m//7RlINx1F3sz3KqwY1WWzVgTcYX52HYk4bJ1hkBXV3zccAEth+jRvG8DBRrdaQuRsPAJOx2MH3zaHNCKL7Zg==} @@ -11327,8 +11336,8 @@ packages: kuler@2.0.0: resolution: {integrity: sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==} - langchain@0.3.28: - resolution: {integrity: sha512-h4GGlBJNGU/Sj2PipW9kL+ewj7To3c+SnnNKH3HZaVHEqGPMHVB96T1lLjtCLcZCyUfabMr/zFIkLNI4War+Xg==} + langchain@0.3.29: + resolution: {integrity: sha512-L389pKlApVJPqu4hp58qY6NZAobI+MFPoBjSfjT1z3mcxtB68wLFGhaH4DVsTVg21NYO+0wTEoz24BWrxu9YGw==} engines: {node: '>=18'} peerDependencies: '@langchain/anthropic': '*' @@ -11385,14 +11394,6 @@ packages: typeorm: optional: true - langsmith@0.3.30: - resolution: {integrity: sha512-ZaiaOx9MysuSQlAkRw8mjm7iqhrlF7HI0LCTLxiNBEWBPywdkgI7UnN+s7KtlRiM0tP1cOLm+dQY++Fi33jkPQ==} - peerDependencies: - openai: '*' - peerDependenciesMeta: - openai: - optional: true - langsmith@0.3.33: resolution: {integrity: sha512-imNIaBL6+ElE5eMzNHYwFxo6W/6rHlqcaUjCYoIeGdCYWlARxE3CTGKul5DJnaUgGP2CTLFeNXyvRx5HWC/4KQ==} peerDependencies: @@ -12545,12 +12546,12 @@ packages: resolution: {integrity: sha512-XgFPPM+B28FtCCgSb9I+s9szOC1vZRSwgWsRUA5ylIxRTgKozqjOCrVOqGsYABPYK5qnfqClxZTFBa8PKt2v6Q==} engines: {node: '>=12'} - openai@4.103.0: - resolution: {integrity: sha512-eWcz9kdurkGOFDtd5ySS5y251H2uBgq9+1a2lTBnjMMzlexJ40Am5t6Mu76SSE87VvitPa0dkIAp75F+dZVC0g==} + openai@5.8.1: + resolution: {integrity: sha512-+qp4vQjJs43pzMSb6quTYslOhVE0c0c7j4YMoEks83BnusG23UrsWn3Hey6/8mwYadY05KipLvbp+PTO4jxO9w==} hasBin: true peerDependencies: ws: '>=8.17.1' - zod: 3.25.67 + zod: ^3.23.8 peerDependenciesMeta: ws: optional: true @@ -14503,7 +14504,7 @@ packages: peerDependencies: date-fns: 2.30.0 lodash: ^4 - zod: 3.25.67 + zod: ^3 ts-interface-checker@0.1.13: resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} @@ -15616,17 +15617,17 @@ packages: zod-class@0.0.16: resolution: {integrity: sha512-3A1l81VEUOxvSTGoNPsU4fTUY9CKin/HSySnXT3bIc+TJTDGCPbzSPE8W1VvwXqyzHEIWK608eFZja2uew9Ivw==} peerDependencies: - zod: 3.25.67 + zod: ^3 zod-to-json-schema@3.23.3: resolution: {integrity: sha512-TYWChTxKQbRJp5ST22o/Irt9KC5nj7CdBKYB/AosCRdj/wxEMvv4NNaj9XVUHDOIp53ZxArGhnw5HMZziPFjog==} peerDependencies: - zod: 3.25.67 + zod: ^3.23.3 zod-to-json-schema@3.24.5: resolution: {integrity: sha512-/AuWwMP+YqiPbsJx5D6TfgRTc4kTLjsh5SOcd4bLsfUg2RcEXrFMJl1DGgdHy2aCfsIA/cr/1JM0xcB2GZji8g==} peerDependencies: - zod: 3.25.67 + zod: ^3.24.1 zod@3.25.67: resolution: {integrity: sha512-idA2YXwpCdqUSKRCACDE6ItZD9TZzy3OZMtpfLoh6oPR47lipysRrJfjzMqFxQ3uJuUPyUeWe1r9vLH33xO/Qw==} @@ -15680,17 +15681,7 @@ snapshots: transitivePeerDependencies: - encoding - '@anthropic-ai/sdk@0.39.0(encoding@0.1.13)': - dependencies: - '@types/node': 20.19.1 - '@types/node-fetch': 2.6.12 - abort-controller: 3.0.0 - agentkeepalive: 4.6.0 - form-data-encoder: 1.7.2 - formdata-node: 4.4.1 - node-fetch: 2.7.0(encoding@0.1.13) - transitivePeerDependencies: - - encoding + '@anthropic-ai/sdk@0.52.0': {} '@apidevtools/json-schema-ref-parser@12.0.2': dependencies: @@ -17562,14 +17553,14 @@ snapshots: transitivePeerDependencies: - encoding - '@browserbasehq/stagehand@1.9.0(@playwright/test@1.53.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))(zod@3.25.67)': + '@browserbasehq/stagehand@1.9.0(@playwright/test@1.53.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(zod@3.25.67)': dependencies: '@anthropic-ai/sdk': 0.27.3(encoding@0.1.13) '@browserbasehq/sdk': 2.6.0(encoding@0.1.13) '@playwright/test': 1.53.0 deepmerge: 4.3.1 dotenv: 16.5.0 - openai: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) + openai: 5.8.1(ws@8.18.2)(zod@3.25.67) sharp: 0.33.5 ws: 8.18.2 zod: 3.25.67 @@ -17743,7 +17734,7 @@ snapshots: json-stringify-safe: 5.0.1 lil-http-terminator: 1.2.3 lodash: 4.17.21 - nanoid: 3.3.8 + nanoid: 3.3.11 object-sizeof: 2.6.5 p-debounce: 2.1.0 p-map: 4.0.0 @@ -18032,7 +18023,7 @@ snapshots: '@gar/promisify@1.1.3': optional: true - '@getzep/zep-cloud@1.0.12(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(langchain@0.3.28(f9561c3b67724aa0f177a38a80041072))': + '@getzep/zep-cloud@1.0.12(1a792e11aeaf9de4c46582c2a158f676)': dependencies: form-data: 4.0.0 node-fetch: 2.7.0(encoding@0.1.13) @@ -18040,8 +18031,8 @@ snapshots: url-join: 4.0.1 zod: 3.25.67 optionalDependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - langchain: 0.3.28(f9561c3b67724aa0f177a38a80041072) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + langchain: 0.3.29(@langchain/anthropic@0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/aws@0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/cohere@0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@langchain/google-genai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/google-vertexai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/groq@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/mistralai@0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67))(@langchain/ollama@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(axios@1.10.0)(cheerio@1.0.0)(handlebars@4.7.8)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(ws@8.18.2) transitivePeerDependencies: - encoding @@ -18570,48 +18561,46 @@ snapshots: '@kwsites/promise-deferred@1.1.1': {} - '@langchain/anthropic@0.3.22(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': + '@langchain/anthropic@0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@anthropic-ai/sdk': 0.39.0(encoding@0.1.13) - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@anthropic-ai/sdk': 0.52.0 + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) fast-xml-parser: 4.4.1 - transitivePeerDependencies: - - encoding - '@langchain/aws@0.1.11(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/aws@0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: '@aws-sdk/client-bedrock-agent-runtime': 3.808.0 '@aws-sdk/client-bedrock-runtime': 3.808.0 '@aws-sdk/client-kendra': 3.808.0 '@aws-sdk/credential-provider-node': 3.808.0 - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) transitivePeerDependencies: - aws-crt - '@langchain/cohere@0.3.4(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': + '@langchain/cohere@0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) cohere-ai: 7.14.0(encoding@0.1.13) uuid: 10.0.0 transitivePeerDependencies: - aws-crt - encoding - '@langchain/community@0.3.46(6de8a673a24e563cf8f4ca63f57e8b8d)': + '@langchain/community@0.3.47(fe5c91724b6df225451a5efa63588a7e)': dependencies: - '@browserbasehq/stagehand': 1.9.0(@playwright/test@1.53.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))(zod@3.25.67) + '@browserbasehq/stagehand': 1.9.0(@playwright/test@1.53.0)(deepmerge@4.3.1)(dotenv@16.5.0)(encoding@0.1.13)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(zod@3.25.67) '@ibm-cloud/watsonx-ai': 1.1.2 - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - '@langchain/openai': 0.5.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(ws@8.18.2) - '@langchain/weaviate': 0.2.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + '@langchain/openai': 0.5.16(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(ws@8.18.2) + '@langchain/weaviate': 0.2.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) binary-extensions: 2.2.0 expr-eval: 2.0.2 flat: 5.0.2 ibm-cloud-sdk-core: 5.3.2 js-yaml: 4.1.0 - langchain: 0.3.28(f9561c3b67724aa0f177a38a80041072) - langsmith: 0.3.33(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - openai: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) + langchain: 0.3.29(@langchain/anthropic@0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/aws@0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/cohere@0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@langchain/google-genai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/google-vertexai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/groq@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/mistralai@0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67))(@langchain/ollama@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(axios@1.10.0)(cheerio@1.0.0)(handlebars@4.7.8)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(ws@8.18.2) + langsmith: 0.3.33(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + openai: 5.8.1(ws@8.18.2)(zod@3.25.67) uuid: 10.0.0 zod: 3.25.67 optionalDependencies: @@ -18623,7 +18612,7 @@ snapshots: '@aws-sdk/credential-provider-node': 3.808.0 '@azure/storage-blob': 12.26.0 '@browserbasehq/sdk': 2.6.0(encoding@0.1.13) - '@getzep/zep-cloud': 1.0.12(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(langchain@0.3.28(f9561c3b67724aa0f177a38a80041072)) + '@getzep/zep-cloud': 1.0.12(1a792e11aeaf9de4c46582c2a158f676) '@getzep/zep-js': 0.9.0 '@google-ai/generativelanguage': 2.6.0(encoding@0.1.13) '@google-cloud/storage': 7.12.1(encoding@0.1.13) @@ -18678,14 +18667,14 @@ snapshots: - handlebars - peggy - '@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))': + '@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))': dependencies: '@cfworker/json-schema': 4.1.0 ansi-styles: 5.2.0 camelcase: 6.3.0 decamelize: 1.2.0 js-tiktoken: 1.0.12 - langsmith: 0.3.33(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + langsmith: 0.3.33(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) mustache: 4.2.0 p-queue: 6.6.2 p-retry: 4.6.2 @@ -18695,76 +18684,76 @@ snapshots: transitivePeerDependencies: - openai - '@langchain/google-common@0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/google-common@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) uuid: 10.0.0 - '@langchain/google-gauth@0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/google-gauth@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - '@langchain/google-common': 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + '@langchain/google-common': 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) google-auth-library: 10.1.0 transitivePeerDependencies: - supports-color - '@langchain/google-genai@0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/google-genai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: '@google/generative-ai': 0.24.1 - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) uuid: 11.1.0 - '@langchain/google-vertexai@0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/google-vertexai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - '@langchain/google-gauth': 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + '@langchain/google-gauth': 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) transitivePeerDependencies: - supports-color - '@langchain/groq@0.2.3(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': + '@langchain/groq@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) groq-sdk: 0.19.0(encoding@0.1.13) zod: 3.25.67 transitivePeerDependencies: - encoding - '@langchain/langgraph-checkpoint@0.0.17(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/langgraph-checkpoint@0.0.17(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) uuid: 10.0.0 - '@langchain/langgraph-sdk@0.0.70(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(react@18.2.0)': + '@langchain/langgraph-sdk@0.0.70(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(react@18.2.0)': dependencies: '@types/json-schema': 7.0.15 p-queue: 6.6.2 p-retry: 4.6.2 uuid: 9.0.1 optionalDependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) react: 18.2.0 - '@langchain/langgraph@0.2.45(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(react@18.2.0)': + '@langchain/langgraph@0.2.45(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(react@18.2.0)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - '@langchain/langgraph-checkpoint': 0.0.17(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) - '@langchain/langgraph-sdk': 0.0.70(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(react@18.2.0) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + '@langchain/langgraph-checkpoint': 0.0.17(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) + '@langchain/langgraph-sdk': 0.0.70(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(react@18.2.0) uuid: 10.0.0 zod: 3.25.67 transitivePeerDependencies: - react - '@langchain/mistralai@0.2.1(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67)': + '@langchain/mistralai@0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@mistralai/mistralai': 1.3.4(zod@3.25.67) uuid: 10.0.0 transitivePeerDependencies: - zod - '@langchain/mongodb@0.1.0(@aws-sdk/credential-providers@3.808.0)(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(gcp-metadata@5.3.0(encoding@0.1.13))(socks@2.8.3)': + '@langchain/mongodb@0.1.0(@aws-sdk/credential-providers@3.808.0)(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(gcp-metadata@5.3.0(encoding@0.1.13))(socks@2.8.3)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) mongodb: 6.11.0(@aws-sdk/credential-providers@3.808.0)(gcp-metadata@5.3.0(encoding@0.1.13))(socks@2.8.3) transitivePeerDependencies: - '@aws-sdk/credential-providers' @@ -18775,50 +18764,49 @@ snapshots: - snappy - socks - '@langchain/ollama@0.2.2(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/ollama@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) ollama: 0.5.16 uuid: 10.0.0 - '@langchain/openai@0.5.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(ws@8.18.2)': + '@langchain/openai@0.5.16(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(ws@8.18.2)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) js-tiktoken: 1.0.12 - openai: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) + openai: 5.8.1(ws@8.18.2)(zod@3.25.67) zod: 3.25.67 transitivePeerDependencies: - - encoding - ws - '@langchain/pinecone@0.2.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(@pinecone-database/pinecone@5.1.2)': + '@langchain/pinecone@0.2.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@pinecone-database/pinecone@5.1.2)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@pinecone-database/pinecone': 5.1.2 flat: 5.0.2 uuid: 10.0.0 - '@langchain/qdrant@0.1.2(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(typescript@5.8.3)': + '@langchain/qdrant@0.1.2(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(typescript@5.8.3)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) '@qdrant/js-client-rest': 1.14.1(typescript@5.8.3) uuid: 10.0.0 transitivePeerDependencies: - typescript - '@langchain/redis@0.1.1(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/redis@0.1.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) redis: 4.6.14 - '@langchain/textsplitters@0.1.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))': + '@langchain/textsplitters@0.1.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) js-tiktoken: 1.0.12 - '@langchain/weaviate@0.2.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': + '@langchain/weaviate@0.2.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)': dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) uuid: 10.0.0 weaviate-client: 3.6.2(encoding@0.1.13) transitivePeerDependencies: @@ -22600,7 +22588,7 @@ snapshots: c12@1.11.2(magicast@0.3.5): dependencies: - chokidar: 4.0.1 + chokidar: 4.0.3 confbox: 0.1.8 defu: 6.1.4 dotenv: 16.5.0 @@ -26582,38 +26570,37 @@ snapshots: kuler@2.0.0: {} - langchain@0.3.28(f9561c3b67724aa0f177a38a80041072): + langchain@0.3.29(@langchain/anthropic@0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/aws@0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/cohere@0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(@langchain/google-genai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/google-vertexai@0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(@langchain/groq@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13))(@langchain/mistralai@0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67))(@langchain/ollama@0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))))(axios@1.10.0)(cheerio@1.0.0)(handlebars@4.7.8)(openai@5.8.1(ws@8.18.2)(zod@3.25.67))(ws@8.18.2): dependencies: - '@langchain/core': 0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) - '@langchain/openai': 0.5.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13)(ws@8.18.2) - '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + '@langchain/core': 0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) + '@langchain/openai': 0.5.16(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(ws@8.18.2) + '@langchain/textsplitters': 0.1.0(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) js-tiktoken: 1.0.12 js-yaml: 4.1.0 jsonpointer: 5.0.1 - langsmith: 0.3.30(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)) + langsmith: 0.3.33(openai@5.8.1(ws@8.18.2)(zod@3.25.67)) openapi-types: 12.1.3 p-retry: 4.6.2 uuid: 10.0.0 yaml: 2.3.4 zod: 3.25.67 optionalDependencies: - '@langchain/anthropic': 0.3.22(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) - '@langchain/aws': 0.1.11(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) - '@langchain/cohere': 0.3.4(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) - '@langchain/google-genai': 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) - '@langchain/google-vertexai': 0.2.13(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) - '@langchain/groq': 0.2.3(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) - '@langchain/mistralai': 0.2.1(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67) - '@langchain/ollama': 0.2.2(@langchain/core@0.3.59(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67))) + '@langchain/anthropic': 0.3.23(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) + '@langchain/aws': 0.1.11(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) + '@langchain/cohere': 0.3.4(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + '@langchain/google-genai': 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) + '@langchain/google-vertexai': 0.2.13(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) + '@langchain/groq': 0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(encoding@0.1.13) + '@langchain/mistralai': 0.2.1(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67)))(zod@3.25.67) + '@langchain/ollama': 0.2.3(@langchain/core@0.3.61(openai@5.8.1(ws@8.18.2)(zod@3.25.67))) axios: 1.10.0 cheerio: 1.0.0 handlebars: 4.7.8 transitivePeerDependencies: - - encoding - openai - ws - langsmith@0.3.30(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)): + langsmith@0.3.33(openai@5.8.1(ws@8.18.2)(zod@3.25.67)): dependencies: '@types/uuid': 10.0.0 chalk: 4.1.2 @@ -26623,19 +26610,7 @@ snapshots: semver: 7.7.2 uuid: 10.0.0 optionalDependencies: - openai: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) - - langsmith@0.3.33(openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67)): - dependencies: - '@types/uuid': 10.0.0 - chalk: 4.1.2 - console-table-printer: 2.14.1 - p-queue: 6.6.2 - p-retry: 4.6.2 - semver: 7.7.2 - uuid: 10.0.0 - optionalDependencies: - openai: 4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67) + openai: 5.8.1(ws@8.18.2)(zod@3.25.67) lazy-ass@1.6.0: {} @@ -28007,20 +27982,10 @@ snapshots: is-docker: 2.2.1 is-wsl: 2.2.0 - openai@4.103.0(encoding@0.1.13)(ws@8.18.2)(zod@3.25.67): - dependencies: - '@types/node': 20.17.57 - '@types/node-fetch': 2.6.12 - abort-controller: 3.0.0 - agentkeepalive: 4.6.0 - form-data-encoder: 1.7.2 - formdata-node: 4.4.1 - node-fetch: 2.7.0(encoding@0.1.13) + openai@5.8.1(ws@8.18.2)(zod@3.25.67): optionalDependencies: ws: 8.18.2 zod: 3.25.67 - transitivePeerDependencies: - - encoding openapi-sampler@1.5.1: dependencies: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 5abeb0d6b0..32410291e5 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -9,10 +9,10 @@ packages: catalog: '@n8n/typeorm': 0.3.20-12 '@n8n_io/ai-assistant-sdk': 1.14.1 - '@langchain/core': 0.3.59 - '@langchain/openai': 0.5.13 - '@langchain/anthropic': 0.3.22 - '@langchain/community': 0.3.46 + '@langchain/core': 0.3.61 + '@langchain/openai': 0.5.16 + '@langchain/anthropic': 0.3.23 + '@langchain/community': 0.3.47 '@sentry/node': 8.52.1 '@types/basic-auth': ^1.1.3 '@types/express': ^5.0.1