From 9d4b3edbd7d198713f87305d8a5599a53c073c24 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Tue, 4 Mar 2025 15:10:18 -0800 Subject: [PATCH] fix: enforce proxy use for all exa endpoints --- executor/handlers.ts | 4 ++-- tools/exa/answer.ts | 1 + tools/exa/findSimilarLinks.ts | 1 + tools/exa/getContents.ts | 1 + tools/exa/search.ts | 1 + 5 files changed, 6 insertions(+), 2 deletions(-) diff --git a/executor/handlers.ts b/executor/handlers.ts index 4b06b32c85..38816766ba 100644 --- a/executor/handlers.ts +++ b/executor/handlers.ts @@ -535,7 +535,7 @@ export class ApiBlockHandler implements BlockHandler { throw new Error(`Tool not found: ${block.config.tool}`) } - const result = await executeTool(block.config.tool, inputs, true) + const result = await executeTool(block.config.tool, inputs) if (!result.success) { throw new Error(result.error || `API request failed with no error message`) } @@ -592,7 +592,7 @@ export class GenericBlockHandler implements BlockHandler { throw new Error(`Tool not found: ${block.config.tool}`) } - const result = await executeTool(block.config.tool, inputs, true) + const result = await executeTool(block.config.tool, inputs) if (!result.success) { throw new Error(result.error || `Block execution failed with no error message`) } diff --git a/tools/exa/answer.ts b/tools/exa/answer.ts index 7c760bdb00..871e6e17e8 100644 --- a/tools/exa/answer.ts +++ b/tools/exa/answer.ts @@ -29,6 +29,7 @@ export const answerTool: ToolConfig = { request: { url: 'https://api.exa.ai/answer', method: 'POST', + isInternalRoute: false, headers: (params) => ({ 'Content-Type': 'application/json', 'x-api-key': params.apiKey, diff --git a/tools/exa/findSimilarLinks.ts b/tools/exa/findSimilarLinks.ts index ff41078a60..08180e3a43 100644 --- a/tools/exa/findSimilarLinks.ts +++ b/tools/exa/findSimilarLinks.ts @@ -38,6 +38,7 @@ export const findSimilarLinksTool: ToolConfig< request: { url: 'https://api.exa.ai/findSimilar', method: 'POST', + isInternalRoute: false, headers: (params) => ({ 'Content-Type': 'application/json', 'x-api-key': params.apiKey, diff --git a/tools/exa/getContents.ts b/tools/exa/getContents.ts index f33a7a349b..a5eccbbebc 100644 --- a/tools/exa/getContents.ts +++ b/tools/exa/getContents.ts @@ -36,6 +36,7 @@ export const getContentsTool: ToolConfig ({ 'Content-Type': 'application/json', 'x-api-key': params.apiKey, diff --git a/tools/exa/search.ts b/tools/exa/search.ts index 7ce70329fb..61410295ab 100644 --- a/tools/exa/search.ts +++ b/tools/exa/search.ts @@ -40,6 +40,7 @@ export const searchTool: ToolConfig = { request: { url: 'https://api.exa.ai/search', method: 'POST', + isInternalRoute: false, headers: (params) => ({ 'Content-Type': 'application/json', 'x-api-key': params.apiKey,