tools.0: Input tag 'tool_search_tool_regex_20251119' found using 'type' does not...

2025年12月04日 17:07 状态: processing

🚨 错误信息

tools.0: Input tag 'tool_search_tool_regex_20251119' found using 'type' does not match any of the expected tags: 'bash_20250124', 'custom', 'text_editor_20250124', 'text_editor_20250429', 'text_editor_20250728', 'web_search_20250305' (request id: 20251204170520430759998okxjdoCC) (request id: 20251204170517708424671TpBTg8i2)

🤖 AI解决方案

报错分析报告

1. 错误翻译

原文:Input tag 'tool_search_tool_regex_20251119' found using 'type' does not match any of the expected tags: 'bash_20250124', 'custom', 'text_editor_20250124', 'text_editor_20250429', 'text_editor_20250728', 'web_search_20250305'
译文:使用'type'找到的输入标签'tool_search_tool_regex_20251119'与任何预期标签都不匹配:'bash_20250124', 'custom', 'text_editor_20250124', 'text_editor_20250429', 'text_editor_20250728', 'web_search_20250305'

2. 原因分析

  • 根本原因:工具调用时使用了无效的工具类型标识符
  • 具体位置:在DMXAPI平台中,尝试使用tool_search_tool_regex_20251119工具,但该工具在当前环境中不可用或已被弃用
  • 上下文:系统期望的工具类型仅限于白名单中的几个特定工具
  • 3. 解决方案

    // 将无效的工具类型替换为可用的工具类型
    // 例如,如果需要搜索功能,使用:
    const validToolType = 'web_search_20250305';
    
    // 如果需要文本编辑功能,使用:
    const validToolType = 'text_editor_20250728'; // 使用最新的文本编辑器版本
    
    // 检查当前可用的工具类型列表:
    const availableTools = [
      'bash_20250124',      // Bash命令行工具
      'custom',             // 自定义工具
      'text_editor_20250124', // 文本编辑器(旧版)
      'text_editor_20250429', // 文本编辑器(中期版)
      'text_editor_20250728', // 文本编辑器(最新版)
      'web_search_20250305'  // 网页搜索工具
    ];

    4. ️ 预防措施

  • 版本管理:定期检查并更新工具版本,避免使用已弃用的工具标识符
  • 工具验证:在调用工具前,先验证工具类型是否在可用工具列表中,添加前置检查逻辑

---

提示:请检查您的工具配置,确保使用当前环境支持的有效工具类型。