status_code=400, tools.0: Input tag 'computer_20251124' found using 'type' does ...

2026年10月07日 13:59 9.50 秒 success

错误信息

status_code=400, tools.0: Input tag 'computer_20251124' found using 'type' does not match any of the expected tags: 'advisor_20260301', 'bash_20250124', 'browser_toolset_20260801', 'code_execution_20250522', 'code_execution_20250825', 'code_execution_20260120', 'code_execution_20260521', 'computer_toolset_20260801', 'custom', 'memory_20250818', 'text_editor_20250124', 'text_editor_20250429', 'text_editor_20250728', 'tool_search_tool_bm25', 'tool_search_tool_bm25_20251119', 'tool_search_tool_regex', 'tool_search_tool_regex_20251119', 'web_fetch_20250910', 'web_fetch_20260209', 'web_fetch_20260309', 'web_fetch_20260318', 'web_search_20250305', 'web_search_20260209', 'web_search_20260318' (request id: 202610070520378100407098268d9d6d4WiyyD9)

AI 解决方案

🌐 错误翻译


原文:tools.0: Input tag 'computer_20251124' found using 'type' does not match any of the expected tags
译文:tools.0:使用 'type' 找到的输入标签 'computer_20251124' 与任何预期标签都不匹配

🎯 原因分析


  • 根本原因:请求中请求的工具类型标识符(type字段值computer_20251124)不在系统支持的合法工具标签列表中,属于无效的工具类型参数。

  • 上下文:错误发生在请求参数校验阶段,系统遍历tools数组的第一个元素(tools.0)时,发现其类型标签未注册,直接返回400错误。
  • 💡 解决方案


    将无效的工具类型标签修改为预设列表中存在的正确标签,例如computer_toolset_20260801(若需使用电脑相关工具):

    // 修复后的请求参数示例
    {
      "tools": [
        {
          "type": "computer_toolset_20260801",
          // 其他该工具所需的参数
        }
      ]
    }
    

    🛡️ 预防措施


  • 调用API前查阅官方文档,确认当前支持的工具标签列表,避免使用过期或未注册的标识符。

  • 使用代码生成工具(如JSON Schema校验插件)提前校验请求参数,确保type字段取值合法。