#28409 [Bug]: Trim Messages function does not support "File" content type.
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
Litellm does not support "file" as a valid content type when trimming. I expected all valid content_types to be supported, or worst case ignored.
### Steps to Reproduce
1. Construct message payload with a "file" like PDF input (https://docs.litellm.ai/docs/completion/document_understanding) 2. Attempt to trim messages (https://docs.litellm.ai/docs/completion/message_trimming)
### Relevant log output
```shell Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/litellm/litellm_core_utils/token_counter.py", line 745, in _count_content_list raise ValueError( ...<2 lines>... ) ValueError: Invalid content item type: file. Expected str or dict with 'type' field (text, image_url, tool_use, tool_result, thinking).
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/app/.venv/lib/python3.13/site-packages/litellm/utils.py", line 7229, in trim_messages current_tokens = token_counter(model=model or "", messages=messages) File "/app/.venv/lib/p…