feat(dotAI): Dot AI LangChain4J - Google AI Gemini#36137
Conversation
|
Claude finished @ihoffmann-dot's task in 1m 36s —— View job Rollback Safety Analysis — ✅ Safe To Rollback
AnalysisThe PR diff touches exactly 5 files:
Checked against every unsafe category:
Conclusion: All changes are purely additive — a new Maven dependency, a new internal implementation class, one list registration, documentation updates, and unit tests. N-1 is completely unaffected: it does not reference |
🤖 Codex Review —
|
🤖 Bedrock Review —
|
🤖 Bedrock Review —
|
| final GoogleAiGeminiChatModel.GoogleAiGeminiChatModelBuilder builder = GoogleAiGeminiChatModel.builder() | ||
| .apiKey(config.apiKey()) | ||
| .modelName(config.model()); | ||
| if (config.endpoint() != null) builder.baseUrl(config.endpoint()); |
There was a problem hiding this comment.
one single line if and no { } 🙄
🤖 dotBot Review (Bedrock)Reviewed 5 file(s); 0 candidate(s) → 0 confirmed, 0 uncertain (unverified, kept for review). ✅ No issues found after verification. us.deepseek.r1-v1:0 · Run: #28266633073 · tokens: in: 23522 · out: 6225 · total: 29747 · calls: 7 · est. ~$0.065 |
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