From 94bccb7acedeba07b9177ef3ed93117e0fb906c2 Mon Sep 17 00:00:00 2001 From: Aishanee Shah Date: Wed, 11 Mar 2026 19:38:24 +0000 Subject: [PATCH] fix(core): update web_fetch skip reasons to match E2E expectations --- packages/core/src/tools/web-fetch.test.ts | 8 +++----- packages/core/src/tools/web-fetch.ts | 4 ++-- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/packages/core/src/tools/web-fetch.test.ts b/packages/core/src/tools/web-fetch.test.ts index 89177df0cc..103138e487 100644 --- a/packages/core/src/tools/web-fetch.test.ts +++ b/packages/core/src/tools/web-fetch.test.ts @@ -423,7 +423,7 @@ describe('WebFetchTool', () => { '[Warning] The following URLs were skipped:', ); expect(result.llmContent).toContain( - '[Rate Limit] https://ratelimit-multi.com/', + '[Rate limit exceeded] https://ratelimit-multi.com/', ); }); @@ -456,11 +456,9 @@ describe('WebFetchTool', () => { '[Warning] The following URLs were skipped:', ); expect(result.llmContent).toContain( - '[Private or Local Host] https://private.com/', - ); - expect(result.llmContent).toContain( - '[Private or Local Host] http://localhost', + '[Blocked Host] https://private.com/', ); + expect(result.llmContent).toContain('[Blocked Host] http://localhost'); }); it('should fallback to all public URLs if primary fails', async () => { diff --git a/packages/core/src/tools/web-fetch.ts b/packages/core/src/tools/web-fetch.ts index 1753153d1f..3cda237550 100644 --- a/packages/core/src/tools/web-fetch.ts +++ b/packages/core/src/tools/web-fetch.ts @@ -655,12 +655,12 @@ Response: ${truncateString(rawResponseText, 10000, '\n\n... [Error response trun this.config, new WebFetchFallbackAttemptEvent('private_ip_skipped'), ); - skipped.push(`[Private or Local Host] ${url}`); + skipped.push(`[Blocked Host] ${url}`); continue; } if (!checkRateLimit(url).allowed) { debugLogger.warn(`[WebFetchTool] Rate limit exceeded for host: ${url}`); - skipped.push(`[Rate Limit] ${url}`); + skipped.push(`[Rate limit exceeded] ${url}`); continue; } toFetch.push(url);