Skip to content

test: add regression test for issue #269 (image_size parameter support)#370

Merged
robert-j-y merged 4 commits intomainfrom
devin/1769563140-issue-269-image-size-test
Jan 28, 2026
Merged

test: add regression test for issue #269 (image_size parameter support)#370
robert-j-y merged 4 commits intomainfrom
devin/1769563140-issue-269-image-size-test

Conversation

@robert-j-y
Copy link
Contributor

@robert-j-y robert-j-y commented Jan 28, 2026

Description

Adds a regression test for issue #269 to the e2e/issues/ directory, following the pattern established in PR #369.

Investigation findings: The image_size parameter (values: "1k", "2k", "4k") for Gemini image generation can be passed through the SDK via providerOptions or extraBody, but it does not actually affect the output resolution. Both 1k and 4k requests return identical 1024x1024 images.

Test structure:

  1. Feature request test (EXPECTED TO FAIL): Verifies that 4k should produce higher resolution than 1k - fails because both return 1024x1024
  2. Workaround tests (PASS):
    • image_size via extraBody.image_config (matching exact issue pattern)
    • image_size via providerOptions.openrouter.image_config

Updates since last revision

  • Now uses the exact model from the issue: google/gemini-3-pro-image-preview
  • Simplified test header comments to known facts only (removed root cause analysis/speculation)
  • Uses generateText with modalities: ['image', 'text'] matching the issue's /chat/completions pattern
  • Uses lowercase '1k', '4k' values matching the issue's format

Human Review Checklist

  • IMPORTANT: The feature test is expected to FAIL - this documents that issue Add support for image_size parameter for google/gemini-3-pro-image-preview #269 is unresolved
  • Verify test header comment only contains known facts from the issue (no speculation about root cause)
  • Verify the getImageDimensions helper correctly parses PNG/JPEG headers
  • Note: Tests depend on external API - may be flaky if model is unavailable

Checklist

  • I have run pnpm stylecheck and pnpm typecheck
  • I have run pnpm test and all tests pass
  • I have added tests for my changes (if applicable)
  • I have updated documentation (if applicable)

Changeset

  • I have run pnpm changeset to create a changeset file

Note: Empty changeset used since this is a test-only change that doesn't need a release.


Link to Devin run: https://app.devin.ai/sessions/baab2ffef6fd48dea2abfdd0e939dee5
Requested by: Robert Yeakel (@robert-j-y)

devin-ai-integration bot and others added 4 commits January 28, 2026 01:20
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>
@robert-j-y robert-j-y merged commit 246af69 into main Jan 28, 2026
2 checks passed
@robert-j-y robert-j-y deleted the devin/1769563140-issue-269-image-size-test branch January 28, 2026 02:20
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>
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

Comments