快速结论:当通过 LiteLLM 代理走 bedrock_converse 路由、且某次 POST /v1/responses 携带了工具调用历史(function_call / function_call_output 或 tool_use / tool_result)但没有同时重新声明 tools 参数时,LiteLLM 会在请求发出前直接抛出 litellm.UnsupportedParamsError,优先排查该轮请求是否缺少 tools 数组,以及 LiteLLM 版本是否仍包含这个校验分支。
适用环境:Issue 报告者使用 LiteLLM v1.100.1(v1.100.0、v1.101.0rc2 同样存在),路由目标为 Bedrock Converse,区域 eu-west-1,通过流式 POST /v1/responses 接入代理。Issue 未给出操作系统、Python、CUDA、显卡或 PyTorch 信息。
最快修复方案:升级到包含 #40763 修复的 LiteLLM 版本。该修复移除了 modify_params 开关对 dummy tool 注入的依赖,在检测到工具调用历史时无条件注入 dummy tool,与 Anthropic chat transformation 的既有行为保持一致。
注意事项:Issue 中验证过的替代方案 litellm.modify_params = True 属于全局开关,会同时影响 Anthropic 的首条 user 消息占位插入、assistant/user continue-message 插入以及 Vertex cached-content 规则,代理运维若只想修复 Bedrock 工具历史校验会连带接受这些行为变化;该开关无按部署或按请求的等价覆盖方式。修复版本号需以官方发布说明为准。
问题场景
用户通过 LiteLLM 代理的流式 POST /v1/responses 接口接入 Bedrock,模型路由使用 bedrock/converse/... 形式(bedrock_converse 路径)。当编码代理客户端回放对话历史时——例如在摘要、压缩或一次普通的“continue”轮次——只带上了工具调用与工具结果块,却没有重新声明 tools 数组,这类跟随轮次会在 LiteLLM 侧被直接拒绝,请求根本不会发往 Bedrock。Issue 中给出的最小复现显示,相同历史在带 tools 时返回 200,不带 tools 时返回 400;而在 bedrock_mantle 路由上,两种情况均为 200。
报错原文
litellm.UnsupportedParamsError: Bedrock doesn't support tool calling without `tools=` param specified.
Pass `tools=` param OR set `litellm.modify_params = True` // `litellm_settings::modify_params: True`
to add dummy tool to the request.
litellm.UnsupportedParamsError: Bedrock doesn't support tool calling without `tools=` param specified. ...
No fallback model group found for original model_group=<group>
原因分析
根因位于 litellm/llms/bedrock/chat/converse_transformation.py 的 _transform_request_helper。原逻辑为:当 optional_params 中没有 tools、同时 messages 中检测到工具调用块时,只有 litellm.modify_params 为真才会注入 dummy tool,否则直接抛出 UnsupportedParamsError。由于该校验发生在任何网络调用之前,重试与 fallback 都无法挽救;No fallback model group found 只是同一错误的连带输出。问题本质是 Converse 转换层的属性,而非模型本身——同一历史在 bedrock_mantle 路径下不受影响。
环境排查
- 确认 LiteLLM 版本:v1.100.1 存在该问题,Issue 中还确认 v1.100.0 与 v1.101.0rc2 同样存在。
- 确认请求路由:是否命中
bedrock/converse/...(bedrock_converse路径),而非bedrock_mantle路径。 - 确认触发轮次的请求体:历史中是否含
function_call/function_call_output(Responses 形态)或tool_use/tool_result(Anthropic 形态),且该轮是否缺少tools数组。 - 确认
litellm.modify_params/litellm_settings::modify_params当前取值,以及是否愿意接受它带来的其他行为变化。 - Issue 未提供操作系统、Python、CUDA、PyTorch、显卡等版本信息,无需在此基础上补充排查项。
解决步骤
- 确认当前 LiteLLM 版本处于受影响范围内(v1.100.0、v1.100.1、v1.101.0rc2 已确认存在)。
- 升级到包含 #40763 修复的版本(具体版本号以官方发布说明为准)。该修复移除了
if litellm.modify_params:这一注入门槛,在has_tool_call_blocks(messages)成立时无条件调用add_dummy_tool(custom_llm_provider="bedrock_converse")注入 dummy tool,与 Anthropic chat transformation provider 的既有行为对齐。 - 若暂时无法升级,可优先尝试在 LiteLLM 配置中设置
litellm.modify_params = True或litellm_settings::modify_params: True作为临时绕过;这是 Issue 中确认为有效的逃逸开关,但会引入全局副作用,需评估后再启用。 - 升级或临时绕过完成后,用 Issue 中的最小复现脚本验证:以不带
tools的FOLLOW_UP历史调用router.aresponses(model="astra", input=FOLLOW_UP, max_output_tokens=128),确认不再抛出UnsupportedParamsError。
验证方法
参考 #40763 的验证方式:在 litellm.modify_params = False 的条件下运行回归单元测试 test_transform_request_injects_dummy_tool_without_tools_param,确认 dummy tool 仍被注入;同时确认全部 71 个现有 Bedrock Converse 工具转换测试通过。业务侧可在升级后重跑最小复现:不带 tools 的跟随轮次应不再返回 400,也不再出现 No fallback model group found for original model_group= 的连带日志。
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。
![[Question]: the page gets stuck during the process of AGENT](https://www.chat-gpts.plus/wp-content/uploads/2026/09/12551-b06097ab-768x403.jpg)
![[Bug]: The "general" method for chunking has encountered an error.](https://www.chat-gpts.plus/wp-content/uploads/2026/09/13641-d7b94dc9-768x403.jpg)
