File: humane_proxy/middleware/interceptor.py -> humane_proxy/classifiers/heuristics.py Description: In modern LLM APIs (like OpenAI Vision), the content of a user message can be an array of objects (e.g., [{"type": "text", "text": "..."}]) rather than a simple string. interceptor.py extracts this array and passes it directly into pipeline.classify(), which eventually hits heuristics.py. In heuristics.py, the classify(text: str) function immediately calls if not text or not text.strip():. Calling .strip() on a list raises an AttributeError. Impact: This completely breaks HumaneProxy for any multimodal/vision requests. Every request containing an array of content parts will crash the proxy with a 500 Internal Server Error, preventing the use of vision models downstream.
File: humane_proxy/middleware/interceptor.py -> humane_proxy/classifiers/heuristics.py Description: In modern LLM APIs (like OpenAI Vision), the content of a user message can be an array of objects (e.g., [{"type": "text", "text": "..."}]) rather than a simple string. interceptor.py extracts this array and passes it directly into pipeline.classify(), which eventually hits heuristics.py. In heuristics.py, the classify(text: str) function immediately calls if not text or not text.strip():. Calling .strip() on a list raises an AttributeError. Impact: This completely breaks HumaneProxy for any multimodal/vision requests. Every request containing an array of content parts will crash the proxy with a 500 Internal Server Error, preventing the use of vision models downstream.