#23316 [Bug]: '>' not supported between instances of 'NoneType' and 'int'
### Check for existing issues
- [x] I have searched the existing issues and checked that my issue is not a duplicate.
### What happened?
When using Litellm as a proxy between Openwebui (frontend) and Mistral.ai models (backend), including an image in a conversation leads to a processing failure within LiteLLM. This issue appears to be specific to Mistral.ai models.
Scope & Observations:
- This issue only occurs when LiteLLM is proxying requests for Mistral.ai models. It doesn't occur when LiteLLM is proxying requests for Gemini models, suggesting the issue is specific to the Mistral.ai integration or LiteLLM's handling of image data for it. - Not all images trigger the issue; it may be related to specific image characteristics such as maximum resolution or file size. - Reproducible Test Image: https://images.unsplash.com/photo-1768006273852-07a34dede095?ixlib=rb-4.1.0&q=85&fm=jpg&crop=entropy&cs=srgb&dl=zero-take-sTpSJDvZyEM-unsplash.jpg&w=1920
Screenshot:
<img width="2592" height="942" alt="Image" src="https://github.com/user-attachments/assets/444f91bd-6278-445f-94a0-da241635705f" />
### Steps to Reproduce
1. Add a mistral.ai model to litellm. 2. In openwebui, select a …