fix(core): update web_fetch skip reasons to match E2E expectations

This commit is contained in:
Aishanee Shah
2026-03-11 19:38:24 +00:00
parent 1c881d9b6f
commit 94bccb7ace
2 changed files with 5 additions and 7 deletions

View File

@@ -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 () => {

View File

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