V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
mrlmh00
V2EX  ›  Claude

claude code 自定义 api 遇到问题

  •  
  •   mrlmh00 · 14 天前 · 527 次点击

    我们公司有个 aws 的 claude api

    我配置到了 claude code 上

    模型是 sonnet4 正常怎么使用都没问题 一调用 todolist 生成就错误

    提示 Invalid tool parameters

    抓包发现 TodoWrite 工具调用正常返回 content 参数

    但是我那个返回的是

    {
          "type": "tool_use",
          "id": "tooluse_BWUSzwFnTCa77FBc-cl_oQ",
          "name": "TodoWrite",
          "input": {
            "todos": [
              {
                "id": "1",
                "description": "Test todo item",
                "status": "pending"
              }
            ]
          }
        }
    

    我尝试替换"description"为"content"就正常了

    但是我看请求包 确实是要他提供的"content"

    不知道为什么我这模型返回就变成了 description 参数 很迷 各位有遇到的吗

    1 条回复    2025-08-21 10:00:25 +08:00
    tickingMachine
        1
    tickingMachine  
       14 天前
    我通过 claude-code-router 来使用 qwen3-coder 模型配合 claude code 使用,也碰到了 Invalid tool parameters 错误,后面在 cc-router 的 issue 里找到了解决方案,可以参考下: https://github.com/musistudio/claude-code-router/issues/448
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   5023 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 09:40 · PVG 17:40 · LAX 02:40 · JFK 05:40
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.