ValueError: Invalid content item type: file. Expected str or dict with ‘type’ field (text, image_url, tool_use, tool_result, thinking).

该报错发生在 LiteLLM 的 trim_messages 或 token 计数流程中,当消息内容包含 file 类型块(如 PDF 附件)时,token_counter 无法识别该类型并抛出 ValueError 。优先确认 LiteLLM 版本是否已升级到包含修复(#38997)的版本,并暂时

![[Bug]: vLLM hangs after NCCL init with TP=2 on Blackwell GPUs (CUDA 13.0, NCCL 2.27.7)](https://www.chat-gpts.plus/wp-content/uploads/2026/09/33041-30149f9a-768x403.jpg)




![[Bug]: litellm stops forwarding model requests](https://www.chat-gpts.plus/wp-content/uploads/2026/08/38731-ee69185b-768x403.jpg)

