From 30c1e92a2e73459c54be24e29a87c776529d8e55 Mon Sep 17 00:00:00 2001 From: Nicolas Date: Sun, 2 Mar 2025 17:37:15 -0300 Subject: [PATCH] Update deep-research-service.ts --- apps/api/src/lib/deep-research/deep-research-service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/api/src/lib/deep-research/deep-research-service.ts b/apps/api/src/lib/deep-research/deep-research-service.ts index eb9150d3..74996c81 100644 --- a/apps/api/src/lib/deep-research/deep-research-service.ts +++ b/apps/api/src/lib/deep-research/deep-research-service.ts @@ -296,7 +296,7 @@ export async function performDeepResearch(options: DeepResearchServiceOptions) { finalAnalysis: finalAnalysis, }); // Bill team for usage based on URLs analyzed - billTeam(teamId, subId, urlsAnalyzed, logger).catch( + billTeam(teamId, subId, Math.min(urlsAnalyzed, options.maxUrls), logger).catch( (error) => { logger.error( `Failed to bill team ${teamId} for ${urlsAnalyzed} URLs analyzed`, { teamId, count: urlsAnalyzed, error },