status_code=400, The value of ‘tools’ is not accepted by claude-fable-5.1 on the...
错误信息
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 相关参数
});
🛡️ 预防措施
tools,仅对明确支持该参数的模型保留。