Starting April 29, 2025, Gemini 1.5 Pro and Gemini 1.5 Flash models are not available in projects that have no prior usage of these models, including new projects. For details, see
Model versions and lifecycle .
Send feedback Stay organized with collections Save and categorize content based on your preferences.
Changelog 1.27.0 (2025-06-25) Bug Fixes Add deprecation note in README and pom (#11638 ) (8cc7c69 ) Add deprecation notice for generativeai package (033b5f4 ) Add deprecation notice for generativeai package (#11637 ) (033b5f4 ) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.50.0 (#11624 ) (a19f457 ) 1.25.0 (2025-06-16) 1.24.0 (2025-06-04) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.49.0 (#11603 ) (3ea506d ) 1.22.0 (2025-05-06) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.46.3 (#11531 ) (5f9a9e7 ) update dependency com.google.cloud:sdk-platform-java-config to v3.47.0 (#11561 ) (9e84230 ) 1.19.0 (2025-02-26) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.44.0 (#11456 ) (6b0ad6f ) 1.18.0 (2025-02-11) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.43.0 (#11426 ) (afdc294 ) 1.17.0 (2025-01-29) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.42.0 (#11410 ) (34dfd0d ) 1.16.0 (2025-01-09) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.41.1 (#11382 ) (a4fd23c ) 1.15.0 (2024-12-13) Dependencies update dependency com.google.cloud:sdk-platform-java-config to v3.41.0 (#11349 ) (9bb6334 ) 1.14.0 (2024-11-18) 1.13.0 (2024-10-28) 1.12.0 (2024-10-09) 1.10.0 (2024-09-26) 1.9.0 (2024-09-11) Features add util class SchemaMaker to create Schema from JsonString or JsonObject (#11118 ) (22f9fe3 ) update gapic library to the latest version (#11129 ) (711cd72 ) 1.8.0 (2024-08-21) Features 1.7.0 (2024-07-31) 1.6.0 (2024-06-27) Features add AutomaticFunctionCallingResponder class (#10896 ) (a97ac3d ) add FunctionDeclarationMaker.fromFunc to create FunctionDeclaration from a Java static method (#10915 ) (5a10656 ) allow setting ToolConfig and SystemInstruction in ChatSession (#10953 ) (5ebfc33 ) enable AutomaticFunctionCallingResponder in ChatSession (#10913 ) (4db0d1d ) infer location and project when user doesn't specify them. (#10868 ) (14f9825 ) support ToolConfig in GenerativeModel (#10950 ) (0801812 ) Update gapic to include ToolConfig (#10920 ) (782f21b ) 1.5.0 (None) 1.4.0 (2024-05-23) Features 1.3.0 (2024-05-08) Features 1.2.0 (2024-04-25) Features 1.1.0 (2024-04-04) 0.8.0 (2024-03-28) 0.7.0 (2024-03-22) Features Change the unmodifiable list to immutable list for getHistory do not allow null values in Builder's setter and remove model's setters. remove GenerateContentConfig Make ChatSession and GenerativeModel final remove deprecated methods in GenerativeModel and ChatSession make client getters in VertexAI private remove Transport from GenerativeModel Remove vararg scopes in VertexAI add fluent API in ChatSession (#10597 ) (5c3d93e ) add fluent API in GenerativeModel (#10585 ) (8bc8adb ) Add FunctionDeclarationMaker (#10592 ) (a8aa591 ) add generateContentAsync methods to GenerativeModel (#10599 ) (17b01c6 ) Update Gapic client. (#10574 ) (bedcddf ) make a copy of the list in ChatSession.setHistory()
(#10608 ) (3e3e35a ) Update README (#10607 ) (05275be ) Change the unmodifiable list to immutable list for getHistory (3f68001 ) do not allow null values in Builder's setter and remove model's setters. (a2407ab ) Make ChatSession and GenerativeModel final (80495ad ) make client getters in VertexAI private (e8994c7 ) remove deprecated methods in GenerativeModel and ChatSession (c54eaa9 ) remove GenerateContentConfig (31f5e12 ) remove Transport from GenerativeModel (f024111 ) Remove vararg scopes in VertexAI (afc367f ) 0.6.0 (2024-03-06) Features add GenerateContentConfig class (#10413 ) (04e9574 ) add GenerateContentConfig to generateContent method (#10425 ) (903abf3 ) add GenerateContentConfig to generateContentStream method (#10424 ) (ec9dd00 ) add GenerateContentConfig to sendMessage method (#10436 ) (25d00c7 ) Mark generateContent variants with GenerationConfig and List<SafetySetting> as deprecated. (#10474 ) (7cf463b ) 0.5.0 (2024-02-20) Features make setApiEndpoint effective for LlmUtilityServiceClient. (#10385 ) (b4ec244 ) 0.4.0 (2024-02-09) Features Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-07-02 UTC.
Need to tell us more? [[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[],[]]