fix: enforce proxy use for all exa endpoints

This commit is contained in:
Waleed Latif
2025-03-04 15:10:20 -08:00
parent 74180549b1
commit 9d4b3edbd7
5 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -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`)
}
+1
View File
@@ -29,6 +29,7 @@ export const answerTool: ToolConfig<ExaAnswerParams, ExaAnswerResponse> = {
request: {
url: 'https://api.exa.ai/answer',
method: 'POST',
isInternalRoute: false,
headers: (params) => ({
'Content-Type': 'application/json',
'x-api-key': params.apiKey,
+1
View File
@@ -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,
+1
View File
@@ -36,6 +36,7 @@ export const getContentsTool: ToolConfig<ExaGetContentsParams, ExaGetContentsRes
request: {
url: 'https://api.exa.ai/contents',
method: 'POST',
isInternalRoute: false,
headers: (params) => ({
'Content-Type': 'application/json',
'x-api-key': params.apiKey,
+1
View File
@@ -40,6 +40,7 @@ export const searchTool: ToolConfig<ExaSearchParams, ExaSearchResponse> = {
request: {
url: 'https://api.exa.ai/search',
method: 'POST',
isInternalRoute: false,
headers: (params) => ({
'Content-Type': 'application/json',
'x-api-key': params.apiKey,