Skip to content

Unhandled AttributeError on Multimodal content Arrays (Vision Model Breakage) #45

@riddhima25bet10005-a11y

Description

@riddhima25bet10005-a11y

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.

Metadata

Metadata

Labels

bugSomething isn't workinglevel:intermediateDecent knowledge required to work ontype:bugSmashes annoying bugs

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions