Skip to content

fix(flow): swap 3:4 and 4:3 in the frontend image aspect-ratio enum - #198

Open
king-of-Jupiter wants to merge 1 commit into
TheSmallHanCat:mainfrom
king-of-Jupiter:fix/frontend-image-aspect-3-4
Open

king-of-Jupiter wants to merge 1 commit into
TheSmallHanCat:mainfrom
king-of-Jupiter:fix/frontend-image-aspect-3-4

Conversation

@king-of-Jupiter

Copy link
Copy Markdown

Images requested as 3:4 come back as 4:3 and vice versa when generation goes through the Flow frontend RPC (ogiZ0b). The numeric enum in _map_frontend_image_aspect_ratio has the two values swapped.

Reproduced on 2026-11-15 with gemini-3.1-flash-image-*, text-to-image, no reference images, via /v1/chat/completions:

model expected got
gemini-3.1-flash-image-three-four portrait 1200×896
gemini-3.1-flash-image-four-three landscape 896×1200

The same happens with a reference image (853×1280 input, three-four requested, 1200×896 returned). Square, 16:9 and 9:16 come back correctly.

This swaps the two values and updates tests/test_flow_image_rollout.py, which pinned the old ones. The REST path (imageAspectRatio as a string) is unchanged. python -m unittest tests.test_flow_image_rollout passes (17 tests).

🤖 Generated with Claude Code

Images requested as 3:4 came back as 4:3 and vice versa through the
ogiZ0b frontend RPC: the numeric enum had the two values swapped.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant