Description
Google Gemini Pro 1.5 (especially the new experimental version) is one of the top models in the the LLM leaderboard, showcasing its exceptional capabilities and potential.


The model performs well especially in non-english languages such as German or English.

However currently, Spring AI only supports accessing Google Gemini through Google Vertex AI. This requires users to manage authentication through Google Cloud and prevents the use of the standalone Gemini API.
Another user also brought this up in #1247
This leads to:
-
High friction and decreased Adoption: There is a reason Google released AI Studio. Forcing users through Vertex AI creates unnecessary friction and complexity, especially for those unfamiliar with Google Cloud. This is a significant turnoff for developers evaluating Spring AI, potentially leading them to abandon the framework altogether in favor of alternatives that offer a more straightforward integration with the standalone Gemini API.
-
Cumbersome prototyping: The standalone API allows for rapid prototyping and testing of ideas without the need for complex infrastructure setup. This is particularly valuable for new developers who want to quickly explore the capabilities of Gemini and Spring AI without getting bogged down in configuration and deployment hurdles.
The lack of support for the standalone Gemini API in Spring AI is a significant limitation and forces users to either abandon Spring AI or refactor their codebase to use the Google Cloud SDK directly.
Expected behavior
Spring AI should provide support for the standalone Google Gemini API, similar to how other language models are integrated. This would include:
Configuration options for specifying API keys and endpoints.
Abstractions similar to existing language model integrations to streamline usage and maintain consistency.
Documentation outlining how to configure and use the standalone Gemini API within the Spring AI framework.
Additional context
In the ReadMe of the project the relatively minor role of Java in the AI landscape is acknowledged.
Tools like LangChain have gained immense popularity by focusing on developer-friendliness and providing a smooth onboarding experience.
By removing barriers to entry and simplifying integrations, like enabling access to the standalone Google Gemini API, Spring AI can attract a wider audience and solidify its position as a leading framework for AI development (not just) in Java/ the JVM space.