Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
sdk.image.generate({ prompt: 'A landscape', width: 1920, height: 1080, aspect_ratio: '1:1' })still sendsaspect_ratio: '1:1'. The SDK tries to clear it in the defaults, but merging the caller's parameters restores it. The API gives aspect_ratio priority, so the requested custom dimensions are ignored.Fix
Apply the existing sizing decision after spreading the request parameters, matching the CLI's precedence. Keep ratio-only requests, dimension validation, other fields and the caller's object unchanged. No new dependency or API surface.
The HTTP-fixture regression inspects the actual serialized request: original code fails the conflicting-ratio case; patched code passes it plus dimensions-only and ratio-only controls.
Validation
The preload rejects non-loopback fetches by default; test-owned mocks can override it. Linux uses temporary configuration and a process-local no-op URL opener. No repository assertions, timeouts or skip conditions were relaxed. No live model calls.
Implemented and tested with Codex assistance. Blind reviews were automated, not human approval.
Need help on this PR? Tag
@codesmith-botwith what you need.