#28989 [Bug]: Gemini image generation silently drops finishReason on safety blocks
## Summary
When Gemini's image-generation endpoint returns `finishReason: IMAGE_SAFETY` / `IMAGE_PROHIBITED_CONTENT`, LiteLLM discards the `finishReason` and returns an empty `ImageResponse` with no exception. Downstream code can't tell "safety refusal" from "unrelated failure".
The chat-completion path was fixed by #20524 (which closed #20357), but only patched `vertex_and_google_ai_studio_gemini.py`. The image-gen transformation files were never updated.
## Affected (verified 2026-05-27)
- `main` and `v1.86.1` - Files: `litellm/llms/gemini/image_generation/transformation.py`, `litellm/llms/vertex_ai/image_generation/vertex_gemini_transformation.py`
Both iterate `candidates[].content.parts[]` for `inlineData`, ignoring `finishReason`. Grep for `finish|safety|prohibit|content_filter|_hidden_params` in either file returns zero matches.
## Reproduction
```python response = await litellm.aimage_generation( model="gemini/gemini-2.5-flash-image", prompt="turn this person into Yoda", ) # response.data == [] # no exception ```
Underlying Gemini response contains `candidates[0].finishReason: "IMAGE_PROHIBITED_CONTENT"` β lost.
## Suggested fix
Per #21348 Criterion 2 β preβ¦