You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds Google AI (Gemini API / AI Studio) as a supported provider under the identifier google_ai — distinct from the existing vertex_ai, which reaches the same model
family through Google Cloud. This is the consumer-facing Gemini API: a single
AI Studio API key, no GCP project/location/service-account setup.
Full model-type coverage — the only provider besides OpenAI with all four:
Add langchain4j-google-ai-gemini dependency (version via langchain4j BOM)
Add GoogleAiGeminiModelProviderStrategy registered in LangChain4jModelFactory.STRATEGIES
Chat + streaming chat via GoogleAiGeminiChatModel / GoogleAiGeminiStreamingChatModel
Embeddings via GoogleAiEmbeddingModel — dimensions maps to outputDimensionality
Image generation via GoogleAiGeminiImageModel — size maps to imageSize (1K/2K)
All changes in this PR are purely additive — no database schema, Elasticsearch mapping, content model, REST API contract, or VTL viewtool changes are involved.
Category
Result
C-1 Structural Data Model Change
✅ No DB schema changes
C-2 Elasticsearch Mapping Change
✅ No ES mapping changes
C-3 Content JSON Model Version Bump
✅ No contentlet model changes
C-4 DROP TABLE / DROP COLUMN
✅ No destructive DDL
H-1 One-Way Data Migration
✅ No data migrations
H-2 RENAME TABLE / RENAME COLUMN
✅ No renames
H-3 PK Restructuring
✅ No PK changes
H-4 New ContentType Field Type
✅ No new field types
H-5 Storage Provider Change
✅ No storage provider changes
H-6 DROP PROCEDURE / FUNCTION
✅ No procedure drops
H-7 NOT NULL Column Without Default
✅ No column additions
H-8 VTL Viewtool Contract Change
✅ No viewtool changes
M-1 Non-Broadening Column Type Change
✅ No type changes
M-2 Push Publishing Bundle Format
✅ No bundle format changes
M-3 REST / GraphQL API Contract Change
✅ No API contract changes
M-4 OSGi Plugin API Breakage
✅ No OSGi interface changes
What changed:
New Maven dependency langchain4j-google-ai-gemini (version from BOM)
New GoogleAiGeminiModelProviderStrategy class (package-private, internal)
STRATEGIES list in LangChain4jModelFactory extended with the new strategy
Javadoc updates in ProviderConfig.java and LangChain4jModelFactory.java
11 new unit tests
Rolling back to N-1 simply means the google_ai provider identifier is unrecognized — existing configurations using other providers are unaffected, and no stored data or index state is changed.
**[> [🟡 Medium]dotCMS/pom.xml:517 — New dependency is added directly to dotCMS/pom.xml without showing dependency management in bom/application/pom.xml. dotCMS convention requires dependency versions to be managed in the BOM; if this artifact is not already managed there, Maven builds will fail with a missing version.
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
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.
Summary
Adds Google AI (Gemini API / AI Studio) as a supported provider under the identifier
google_ai— distinct from the existingvertex_ai, which reaches the same modelfamily through Google Cloud. This is the consumer-facing Gemini API: a single
AI Studio API key, no GCP project/location/service-account setup.
Full model-type coverage — the only provider besides OpenAI with all four:
langchain4j-google-ai-geminidependency (version via langchain4j BOM)GoogleAiGeminiModelProviderStrategyregistered inLangChain4jModelFactory.STRATEGIESGoogleAiGeminiChatModel/GoogleAiGeminiStreamingChatModelGoogleAiEmbeddingModel—dimensionsmaps tooutputDimensionalityGoogleAiGeminiImageModel—sizemaps toimageSize(1K/2K)LangChain4jModelFactoryTestConfiguration
{ "chat": { "provider": "google_ai", "model": "gemini-2.0-flash", "apiKey": "AIza...", "maxTokens": 4096, "temperature": 0.7 }, "embeddings": { "provider": "google_ai", "model": "gemini-embedding-001", "apiKey": "AIza...", "dimensions": 768 }, "image": { "provider": "google_ai", "model": "gemini-2.5-flash-image", "apiKey": "AIza...", "size": "1K" } }Notes
sizefor image uses Gemini's format (1K,2K), not OpenAI's1024x1024.maxRetriesis not supported by the streaming chat model and is ignored with a warning (same behavior as the OpenAI provider).endpointoptionally overrides the default base URL on all three model types.Related Issue
This PR fixes #36134
EPIC: dotAI Multi-Provider Support #33970