Skip to content

Feature: Google ai studio improvements#312

Merged
Pento95 merged 6 commits intoAventurasTeam:masterfrom
Pento95:feature/google-ai-studio-improvements
Apr 25, 2026
Merged

Feature: Google ai studio improvements#312
Pento95 merged 6 commits intoAventurasTeam:masterfrom
Pento95:feature/google-ai-studio-improvements

Conversation

@Pento95
Copy link
Copy Markdown
Collaborator

@Pento95 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.

Pento 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
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/lib/services/ai/image/providers/google.ts
Comment thread src/lib/services/ai/image/providers/google.ts Outdated
Comment thread src/lib/services/ai/sdk/providers/modelFetcher.ts Outdated
Pento95 and others added 4 commits April 20, 2026 17:52
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
Comment thread src/lib/services/ai/image/providers/google.ts
@Pento95 Pento95 merged commit e3b2a5b into AventurasTeam:master Apr 25, 2026
1 check passed
@Pento95 Pento95 deleted the feature/google-ai-studio-improvements branch April 25, 2026 23:55
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.

2 participants