mirror of
https://github.com/open-webui/open-webui.git
synced 2026-06-14 03:30:25 +00:00
bddadafa07
aiohttp's ClientResponse.json() validates the Content-Type header against 'application/json' by default and raises ContentTypeError for any other value — including 'application/x-ndjson', which Ollama returns for its OpenAI-compatible /v1/images/generations endpoint. Pass content_type=None to skip this check while keeping all other parsing behaviour unchanged. The fix covers image generation (openai, gemini, automatic1111 engines) and image editing (openai, gemini engines).