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);