I’m seeing what looks like a Vertex AI issue with gemini-3.1-flash-image-preview.
I send image generation requests to Vertex AI with payloads like this:
{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Editorial portrait ..."
}
]
}
],
"generationConfig": {
"maxOutputTokens": 32768,
"temperature": 1,
"topP": 0.95,
"responseModalities": ["TEXT", "IMAGE"],
"imageConfig": {
"aspectRatio": "4:3",
"imageSize": "4K"
}
},
"safetySettings": [
{
"category": "HARM_CATEGORY_HATE_SPEECH",
"threshold": "OFF"
},
{
"category": "HARM_CATEGORY_DANGEROUS_CONTENT",
"threshold": "OFF"
},
{
"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT",
"threshold": "OFF"
},
{
"category": "HARM_CATEGORY_HARASSMENT",
"threshold": "OFF"
}
]
}
I tested this both through my app and by replaying the same request directly to the Vertex AI generateContent endpoint outside the app.
The request clearly includes:
generationConfig.imageConfig.aspectRatio = "4:3"generationConfig.imageConfig.imageSize = "2K"or"4K"
However, the returned image is only 1200x896, which matches the 1K output size for 4:3.
Observed behavior:
imageConfig.imageSize = "512px"works correctlyimageConfig.imageSize = "1K"works correctlyimageConfig.imageSize = "2K"returns1200x896imageConfig.imageSize = "4K"also returns1200x896
This happens even in a direct raw Vertex AI HTTP request outside the app, so it does not appear to be caused by frontend logic, request-building code, storage, or display.
Additional context:
gemini-3-pro-image-previewhonors2Kcorrectly in the same environment- this issue happens both with and without reference images
- the request completes successfully with
finishReason = "STOP" - in one raw replay, the response included 2 image parts and several text parts, even though the request was intended as a single image generation flow
Questions:
- Is
gemini-3.1-flash-image-previewon Vertex AI currently limited to1Koutputs in practice, even ifimageConfig.imageSizeaccepts"2K"and"4K"? - Are
"2K"and"4K"officially supported on the Vertex AIgenerateContentpath for this model today? - Is there a known issue where higher
imageConfig.imageSizevalues are silently downgraded instead of returning an error? - Is behavior different between Vertex AI Studio / UI and direct API calls for this model?
If useful, I can share:
- exact raw request payloads
- raw response payloads
- measured output dimensions for each
imageConfig.imageSizevalue