Feature: Google ai studio improvements#312
Merged
Pento95 merged 6 commits intoAventurasTeam:masterfrom Apr 25, 2026
Merged
Conversation
Collaborator
Pento95
commented
Apr 20, 2026
- Fix thinkingConfig for Google models: correct level mapping per model family — Gemini 2.5 uses thinkingBudget (0 = disabled, -1 = unlimited, with per-effort budgets), Gemini 3.x uses thinkingLevel (low/medium/high), Gemma 4 uses thinkingLevel (minimal/high only).
- Dynamic image model fetching: Google image models are now fetched from the same /models?pageSize=200 endpoint used for text, filtered by predict method or -image/nano-banana in the model ID. Hardcoded list replaced with live data + fallback.
- Rewrite Google image provider: replaces direct HTTP :predict calls with the Vercel AI SDK's generateImage() + google.image(). Supports Imagen 4/Ultra/Fast and all Gemini image models (gemini--image, nano-banana-) transparently through the same code path.
- isGoogleImageModel() helper: Gemini image models are excluded from the text model list and included in the image model list instead.
- Imagen 4 img2img support: imagen-4.0-generate-001 now correctly reports supportsImg2Img: true.
- Reference profile UX: removed the model filter on the reference profile selector (all models now visible); replaced with an inline warning when the selected model doesn't support img2img.
- Rename provider label from Google Imagen to Google AI Studio.
added 2 commits
April 20, 2026 17:38
- Fix thinkingConfig for Gemini/Gemma models (correct level mapping and casing) - Gemini 2.5: use thinkingBudget (-1 unlimited, 0 disabled, budgets per effort level) - Gemini 3.x: thinkingLevel low/medium/high - Gemma 4: thinkingLevel minimal/high only - Add pageSize=200 to Google model fetch endpoint - Fetch image models dynamically from the same endpoint (predict + gemini-image/nano-banana) - Rewrite Google image provider to use Vercel AI SDK generateImage() instead of direct HTTP - Supports Imagen 4/Ultra/Fast and Gemini image models (gemini-*-image, nano-banana-*) transparently - isGoogleImageModel() helper to exclude image models from text model list - Rename provider label from "Google Imagen" to "Google AI Studio" - Imagen 4 supportsImg2Img: true; Gemini image models supportsImg2Img: true - Remove img2img filter on reference profile model selector; add inline warning instead
Contributor
There was a problem hiding this comment.
Code Review
This pull request refactors the Google image provider to use the Vercel AI SDK, enables dynamic model fetching for Google AI Studio, and improves the handling of reasoning configurations for Gemini and Gemma models. It also adds UI warnings for models that do not support img2img in reference profiles. The review feedback suggests using the createTimeoutFetch utility for network requests and ensuring API keys are URL-encoded in query parameters for better robustness and correctness.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
- Use createTimeoutFetch(30000) for Google image model list fetch - encodeURIComponent(apiKey) in both google.ts and modelFetcher.ts
…ments' into feature/google-ai-studio-improvements
a-frazier
approved these changes
Apr 21, 2026
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.