fix(config): add firecrawl and readability to web fetch schema

The tools.web.fetch schema used .strict() (additionalProperties: false)
and was missing the readability boolean and firecrawl nested object.
This caused config validation to reject firecrawl settings even though
the code in web-fetch.ts and the uiHints already supported them.

Add ToolsWebFetchFirecrawlSchema with all six documented properties
(enabled, apiKey, baseUrl, onlyMainContent, maxAgeMs, timeoutSeconds)
and the readability boolean to ToolsWebFetchSchema.

Fixes #2527
This commit is contained in:
Ayush Ojha 2026-01-30 00:01:04 -08:00
parent 9025da2296
commit c3aa0c2121

View File

@ -182,6 +182,18 @@ export const ToolsWebSearchSchema = z
.strict()
.optional();
export const ToolsWebFetchFirecrawlSchema = z
.object({
enabled: z.boolean().optional(),
apiKey: z.string().optional(),
baseUrl: z.string().optional(),
onlyMainContent: z.boolean().optional(),
maxAgeMs: z.number().nonnegative().optional(),
timeoutSeconds: z.number().int().positive().optional(),
})
.strict()
.optional();
export const ToolsWebFetchSchema = z
.object({
enabled: z.boolean().optional(),
@ -190,6 +202,8 @@ export const ToolsWebFetchSchema = z
cacheTtlMinutes: z.number().nonnegative().optional(),
maxRedirects: z.number().int().nonnegative().optional(),
userAgent: z.string().optional(),
readability: z.boolean().optional(),
firecrawl: ToolsWebFetchFirecrawlSchema,
})
.strict()
.optional();