litellm/tests/unit/images
kenneth-berri a1a834a87b
fix(images): support stream=True on image generation and edit (#53966)
* fix(images): support stream=True on image generation and edit

OpenAI answers stream=True image requests with named SSE events. The SDK and
proxy now forward those events, and the completed event is logged and priced
like a normal image response.

Fixes #53719

* fix(images): settle cancelled streams, raise on incomplete streams, run output hooks on every streamed image

* fix(images): answer a generation streamed through extra_body as an event stream

* fix(images): keep a hook's dict result and mark extra_body streams as streaming for guardrails

* test(images): cover a disconnect after a preview while the next read is pending
2026-11-23 18:01:29 -08:00
..
request_payloads test: move the unit half of 126 mixed legacy files into tests/unit (#45090) 2026-10-07 14:07:43 -07:00
__init__.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
test_image_edit.py feat(dashscope): add image edits and text-to-speech (#48998) 2026-10-29 17:48:38 -07:00
test_image_edit_extra_params.py fix(vertex_ai): honor Gemini image size and imageConfig controls on generation and edits (#53580) 2026-11-23 09:05:25 -08:00
test_image_edit_utils.py fix(vertex_ai): honor Gemini image size and imageConfig controls on generation and edits (#53580) 2026-11-23 09:05:25 -08:00
test_image_generation_extra_headers.py test: move tests/test_litellm root and small trees into tests/unit (#43186) 2026-09-25 11:30:43 -07:00
test_main.py fix(images): bill the deployment's custom pricing when the proxy pre-creates the logging object (#53994) 2026-11-23 17:37:37 -08:00
test_streaming.py fix(images): support stream=True on image generation and edit (#53966) 2026-11-23 18:01:29 -08:00