The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix transform_image_generation_response
Ishaan Jaffe938fa9e416b
diff --git a/litellm/llms/gemini/image_generation/transformation.py b/litellm/llms/gemini/image_generation/transformation.pyindex 14c6955772c..e57364fd288 100644--- a/litellm/llms/gemini/image_generation/transformation.py+++ b/litellm/llms/gemini/image_generation/transformation.py@@ -190,10 +190,9 @@ class GoogleImageGenConfig(BaseImageGenerationConfig):predictions = response_data.get("predictions", [])for prediction in predictions:# Google AI returns base64 encoded images in the prediction- for image_data in prediction:- model_response.data.append(ImageObject(- b64_json=image_data.get("bytesBase64Encoded", None),- url=None, # Google AI returns base64, not URLs- ))+ model_response.data.append(ImageObject(+ b64_json=prediction.get("bytesBase64Encoded", None),+ url=None, # Google AI returns base64, not URLs+ ))return model_response\ No newline at end of file