From 6142fbf64a87bde3c32165e3354de78f50cf2f24 Mon Sep 17 00:00:00 2001 From: tanzhenxin Date: Fri, 22 Aug 2025 15:17:42 +0800 Subject: [PATCH] fix: invalid web search tool schema when using deepseek api --- packages/core/src/tools/web-search.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/src/tools/web-search.ts b/packages/core/src/tools/web-search.ts index adeda1a7..eacb4143 100644 --- a/packages/core/src/tools/web-search.ts +++ b/packages/core/src/tools/web-search.ts @@ -5,7 +5,6 @@ */ import { BaseTool, Icon, ToolResult } from './tools.js'; -import { Type } from '@google/genai'; import { SchemaValidator } from '../utils/schemaValidator.js'; import { getErrorMessage } from '../utils/errors.js'; import { Config } from '../config/config.js'; @@ -57,10 +56,10 @@ export class WebSearchTool extends BaseTool< 'Performs a web search using the Tavily API and returns a concise answer with sources. Requires the TAVILY_API_KEY environment variable.', Icon.Globe, { - type: Type.OBJECT, + type: 'object', properties: { query: { - type: Type.STRING, + type: 'string', description: 'The search query to find information on the web.', }, },