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

2026年10月08日 09:31 7.55 秒 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: 202610080044255716076322XhTYu2n)

AI 解决方案

原文: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.
译文:状态码=400,在剩余路由中,`claude-fable-5.1`不接受`tools`参数的值,请修改或移除后重试。

🎯 原因分析


该错误明确指出:在当前可用的路由中,claude-fable-5.1 模型不接受 tools 参数(及其值)。错误发生在请求 API 调用时,系统校验参数阶段,拒绝了 tools 参数的传入。

💡 解决方案


移除 tools 参数及其相关定义,直接进行基础调用:

// 修复后的代码(以 JavaScript 为例,其他语言同理)
const response = await client.messages.create({
  model: "claude-fable-5.1",
  messages: [{ role: "user", content: "你有什么功能?" }]
  // 移除了 tools 相关参数
});

🛡️ 预防措施


  • 版本校验:使用新模型/路由前,先查阅对应 API 文档,确认支持的参数列表,避免传入不被接受的参数。

  • 参数隔离:若需兼容多模型,建议动态判断是否传入 tools,仅对明确支持该参数的模型保留。