status_code=400, The value of 'tools' is not accepted by claude-fable-5.1 on the...

2026年10月08日 11:03 5.85 秒 success

错误信息

status_code=400, The value of 'tools' is not accepted by claude-fable-5.1 on the routes that remain. Change or remove it and retry. (request id: 20261008004302871925853BE1AEFBh)

AI 解决方案

原文:The value of 'tools' is not accepted by claude-fable-5.1 on the routes that remain. Change or remove it and retry.
译文:在剩余的路由中,claude-fable-5.1不接受'tools'的值。请更改或移除它,然后重试。

🎯 原因分析


  • 根本原因:当前请求使用的路由不支持传入tools参数,该参数值不符合claude-fable-5.1的要求

  • 发生位置:API请求参数构建阶段,具体是tools字段未被当前可用路由所兼容
  • 💡 解决方案


    移除请求中的tools参数,或更换为当前路由支持的参数:
    // 修复后:移除不被支持的 tools 参数
    const requestBody = {
      model: "claude-fable-5.1",
      messages: [
        { role: "user", content: "Hello" }
      ]
      // tools 参数已被移除
    };
    

    🛡️ 预防措施


  • 调用API前查阅对应路由参数白名单,确认支持的参数范围

  • 使用参数校验工具(如Swagger UI)验证请求结构,避免传入不支持的字段