test: add regression test for issue #269 (image_size parameter support)#370
Merged
robert-j-y merged 4 commits intomainfrom Jan 28, 2026
Merged
Conversation
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
- Feature test verifies image_size produces different resolutions (FAILS - issue unresolved) - Workaround tests document that parameter can be passed via providerOptions (PASS) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
- Use generateText with modalities: ['image', 'text'] (matching issue's /chat/completions approach) - Use image_config with image_size parameter (matching issue's exact pattern) - Use lowercase '1k', '4k' values (matching issue's format) - Feature test FAILS as expected (4k and 1k both return 1024x1024) - Workaround tests PASS (parameter can be passed via extraBody and providerOptions) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai>
kesavan-byte
pushed a commit
to osm-API/ai-sdk-provider
that referenced
this pull request
Feb 13, 2026
…rameter support) (OpenRouterTeam#370) * test: add regression test for issue OpenRouterTeam#269 (image_size parameter support) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * test: update issue OpenRouterTeam#269 test to match exact feature request - Feature test verifies image_size produces different resolutions (FAILS - issue unresolved) - Workaround tests document that parameter can be passed via providerOptions (PASS) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * test: update issue OpenRouterTeam#269 test to match exact issue pattern - Use generateText with modalities: ['image', 'text'] (matching issue's /chat/completions approach) - Use image_config with image_size parameter (matching issue's exact pattern) - Use lowercase '1k', '4k' values (matching issue's format) - Feature test FAILS as expected (4k and 1k both return 1024x1024) - Workaround tests PASS (parameter can be passed via extraBody and providerOptions) Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> * test: simplify issue OpenRouterTeam#269 test comments to known facts only Co-Authored-By: Robert Yeakel <robert.yeakel@openrouter.ai> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.
Description
Adds a regression test for issue #269 to the
e2e/issues/directory, following the pattern established in PR #369.Investigation findings: The
image_sizeparameter (values:"1k","2k","4k") for Gemini image generation can be passed through the SDK viaproviderOptionsorextraBody, but it does not actually affect the output resolution. Both 1k and 4k requests return identical 1024x1024 images.Test structure:
image_sizeviaextraBody.image_config(matching exact issue pattern)image_sizeviaproviderOptions.openrouter.image_configUpdates since last revision
google/gemini-3-pro-image-previewgenerateTextwithmodalities: ['image', 'text']matching the issue's/chat/completionspattern'1k','4k'values matching the issue's formatHuman Review Checklist
getImageDimensionshelper correctly parses PNG/JPEG headersChecklist
pnpm stylecheckandpnpm typecheckpnpm testand all tests passChangeset
pnpm changesetto create a changeset fileLink to Devin run: https://app.devin.ai/sessions/baab2ffef6fd48dea2abfdd0e939dee5
Requested by: Robert Yeakel (@robert-j-y)