diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bfaab56f689..73257989c9b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.24.0" + ".": "1.4.1" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b6549781e6..9232153495d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,278 @@ # Changelog +## [1.4.1](https://github.com/googleapis/java-genai/compare/v1.24.0...v1.4.1) (2025-10-21) + + +### ⚠ BREAKING CHANGES + +* Support java.time.Instant and java.time.Duration for time/duration fields +* mark *Parameters classes as internal +* add enum support +* Rename getVideoOperation to getVideosOperation for Java SDK +* add enum support +* add enum support +* add streaming support for Chat +* Hide internal classes ApiResponse and Common +* Move generation config to the top level LiveConnectConfig +* Remove AsyncSession.sendContent method which was accidentally added +* No more checked exceptions +* Remove AsyncSession.sendContent method which was accidentally added +* No more checked exceptions +* Only expose `toJson` and `fromJson` as public methods in JsonSerializable + +### Features + +* [Python] Implement async embedding batches for MLDev. ([12ddfce](https://github.com/googleapis/java-genai/commit/12ddfce328909ece245e78a5170efe561e3ab499)) +* Add 'turn_complete_reason' and 'waiting_for_input' fields. ([5bc4873](https://github.com/googleapis/java-genai/commit/5bc48732fd9281162942b158de34173343d7b179)) +* Add `addWatermark` parameter to the edit image configuration. ([c4598da](https://github.com/googleapis/java-genai/commit/c4598da0903d5dacb0c7bb4462aec1226ba259bf)) +* Add `ImageConfig` to `GenerateContentConfig` ([6fb5eba](https://github.com/googleapis/java-genai/commit/6fb5eba0e916ada8f300dd5ad333f269e9044ea3)) +* Add `NO_IMAGE` enum value to `FinishReason` ([6b00c0b](https://github.com/googleapis/java-genai/commit/6b00c0b7dc8c85fcefc5aac643c3588048317614)) +* add `sdkHttpResponse.headers` to *Delete responses. ([4be038d](https://github.com/googleapis/java-genai/commit/4be038de86c782d103d21258db51055f35e5af21)) +* add `time range filter` to Google Search Tool ([4aba9a6](https://github.com/googleapis/java-genai/commit/4aba9a66ffb8b63fd5498674c386d0a21e67ae0e)) +* Add `Tool.enterprise_web_search` field ([919c22a](https://github.com/googleapis/java-genai/commit/919c22a79e357a4be03e98bd24b4d02282ca7a0d)) +* Add `VideoGenerationMaskMode` enum for Veo 2 Editing ([e5c8277](https://github.com/googleapis/java-genai/commit/e5c82778586dfee4ed7d04a9eabb2a4d8eac6185)) +* Add a default 5 minutes timeout to the Java SDK. ([d80d23b](https://github.com/googleapis/java-genai/commit/d80d23b7a8cb440410f9dd9556ee1259352285ef)) +* Add add_watermark field for recontext_image (Virtual Try-On, Product Recontext) ([5aacbc0](https://github.com/googleapis/java-genai/commit/5aacbc06435fb36fffde0c3641b3077493f13577)) +* add an _exclude_fields characteristic in the config for unused values to avoid unnecessary and unused code in converter and type generation. ([bee4e3e](https://github.com/googleapis/java-genai/commit/bee4e3e26c936f6de67b31e33ace4ac3b26142f0)) +* Add async editImage support for Java SDK ([358c896](https://github.com/googleapis/java-genai/commit/358c896c5130dd1c6ce4335745a8249de5a518ca)) +* Add async list methods to Models, Caches, and Files ([cde10ab](https://github.com/googleapis/java-genai/commit/cde10abdc1ef0b9f35510413e7fcc0fa1d484b08)) +* add async streaming chat ([df6446a](https://github.com/googleapis/java-genai/commit/df6446a532448023c8e2b670c7fd5f766eca5a2b)) +* add async support for chat ([9973df7](https://github.com/googleapis/java-genai/commit/9973df7d1292f959d1fd3c814131a97ef1554e72)) +* Add AsyncPager class ([cde10ab](https://github.com/googleapis/java-genai/commit/cde10abdc1ef0b9f35510413e7fcc0fa1d484b08)) +* Add basic support for async function calling. ([653094a](https://github.com/googleapis/java-genai/commit/653094af41bf67fcff802ec7bc7ed4f7f4a14f47)) +* add Caches.create/delete/get support ([c4d17a0](https://github.com/googleapis/java-genai/commit/c4d17a0e2ac7aef13b82c2a31ba89d98a090724d)) +* add Chat module ([03442fc](https://github.com/googleapis/java-genai/commit/03442fcebdb6493671a5883952f34ee446c961e5)) +* Add client.models.embedContent methods ([02f177c](https://github.com/googleapis/java-genai/commit/02f177cca6235242c18cd01647aee75687b4b7d0)) +* Add client.models.list() method ([25883eb](https://github.com/googleapis/java-genai/commit/25883eb150f41da5b877dbfaae8b49170e91520c)) +* Add compressionQuality enum for generate_videos ([b0e665b](https://github.com/googleapis/java-genai/commit/b0e665bf6ae09dc2146e49714a4855443a270776)) +* Add computeTokens support ([85c751e](https://github.com/googleapis/java-genai/commit/85c751e5e8e715ef26cf5524cb57a7d77953a734)) +* add Content.text() quick accessor ([c184615](https://github.com/googleapis/java-genai/commit/c184615f697652335b77348fd6b7b5eed2f03185)) +* Add countTokens method support ([8b8fb45](https://github.com/googleapis/java-genai/commit/8b8fb4515d994b24bd1a3bb3b500f415c2dddeca)) +* Add datastore_spec field for VertexAISearch ([8c8b47a](https://github.com/googleapis/java-genai/commit/8c8b47a79cbf9014325aeeab156f99db6181a265)) +* Add domain to Web GroundingChunk ([990586b](https://github.com/googleapis/java-genai/commit/990586b3f1d8ca8723fe1823c9f549778787ab5c)) +* Add enable_enhanced_civic_answers in GenerationConfig ([684a2c5](https://github.com/googleapis/java-genai/commit/684a2c5b582fa4ca13cb9cfe819ef759778101b0)) +* Add engine to VertexAISearch ([8ed56ad](https://github.com/googleapis/java-genai/commit/8ed56ad934c8ecf61320f3590a6ba14db327268e)) +* Add enhance_input_image and image_preservation_factor fields for upscale_image ([94a329a](https://github.com/googleapis/java-genai/commit/94a329abcd3c668065abfae511b55766ed051668)) +* Add enhance_prompt field for Gemini Developer API generate_videos ([944af16](https://github.com/googleapis/java-genai/commit/944af164b380eaca7cf4d0be4a346807ad8d0ad9)) +* add enum support ([86b0553](https://github.com/googleapis/java-genai/commit/86b0553855b68e7e11b2bc91945326cf14c39a7e)) +* add enum support ([6cb7d7a](https://github.com/googleapis/java-genai/commit/6cb7d7a3cfd0bef4a4ad13ea1c2ed95148320707)) +* add enum support ([04971fc](https://github.com/googleapis/java-genai/commit/04971fce22baf0c926dca8ec90646ef81c28130a)) +* Add evaluation support to Vertex tuning ([7c0bb19](https://github.com/googleapis/java-genai/commit/7c0bb196136091db95585924d576fd8f6922a2f2)) +* Add Files module with Files.upload, .get and .delete ([e211ca1](https://github.com/googleapis/java-genai/commit/e211ca1f617864f50590a6cc0a4b729a646a41e4)) +* Add Files.download methods ([082c890](https://github.com/googleapis/java-genai/commit/082c890920c2bed8d6fe30cf1d4d5de40b676e5e)) +* Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions ([1a24bed](https://github.com/googleapis/java-genai/commit/1a24bedc752851236b0a7239a7dba7090e4ac4e8)) +* Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions ([99b50a6](https://github.com/googleapis/java-genai/commit/99b50a6d3b65cf16cf620d252c5e6401670fce4b)) +* Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions ([ea954d3](https://github.com/googleapis/java-genai/commit/ea954d37ee23e6886ee686eea04481d069344def)) +* Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions ([cf8b8b6](https://github.com/googleapis/java-genai/commit/cf8b8b6722a84cbc45b9d2a48c0b7d83a6a4e3f7)) +* Add FunctionResponsePart & ToolComputerUse.excludedPredefinedFunctions ([f0aebc2](https://github.com/googleapis/java-genai/commit/f0aebc24544279dfb0764200afa8e011f8fc70ee)) +* Add generate_audio field for private testing of video generation ([16f2b0f](https://github.com/googleapis/java-genai/commit/16f2b0ff8e1d9f3adc54fb8df7cf58de075ce028)) +* Add generateVideosFromSource in Go, refactor private generateVideos ([c683835](https://github.com/googleapis/java-genai/commit/c683835593e74673e44f981ab8b0e0c7dbb105cd)) +* Add generationComplete notification to Live ServerContent ([de5a762](https://github.com/googleapis/java-genai/commit/de5a76292452d6bf691bc602d1dc45b24883b82b)) +* Add httpOptions field to type classes ([971177d](https://github.com/googleapis/java-genai/commit/971177ddddf4c896e512bfb79d1cabe845719976)) +* Add image_size field for Gemini Developer API Imagen 4 generation ([c50c755](https://github.com/googleapis/java-genai/commit/c50c755c08efbed5a62e1006890b1d0bd9956702)) +* Add image_size field for Vertex Imagen 4 generation ([950c0c6](https://github.com/googleapis/java-genai/commit/950c0c657f786039e3a301bf1237a57ae324ff62)) +* Add Image.fromFile() support in Java SDK ([4ddcaa1](https://github.com/googleapis/java-genai/commit/4ddcaa19bb0a99fabff52add6a3206caec281f23)) +* Add labels field to Imagen configs ([e69cf68](https://github.com/googleapis/java-genai/commit/e69cf68583ca581f1a7fad89b04292036433cdb4)) +* Add labels to create tuning job config ([695e17a](https://github.com/googleapis/java-genai/commit/695e17a7b1adebbccb1651d30b768d27f81c3977)) +* Add list methods in Caches and Files module ([ce6ed85](https://github.com/googleapis/java-genai/commit/ce6ed8543254e762372cc0b8f60585c2325efe9f)) +* add live proactivity_audio and enable_affective_dialog ([64c20c7](https://github.com/googleapis/java-genai/commit/64c20c70addcc179c753fda3ac74906c1dd96503)) +* add multi-speaker voice config ([1689f77](https://github.com/googleapis/java-genai/commit/1689f77614d67a956999b087f8f453a0ff281bd7)) +* Add new languages for Imagen 4 prompt language ([7e1e6d2](https://github.com/googleapis/java-genai/commit/7e1e6d2ead45c7a0737e4a010fce266fb436d2dd)) +* Add output_gcs_uri to Imagen upscale_image ([7649467](https://github.com/googleapis/java-genai/commit/76494678d3937229778c5063b4f4ff340f977bba)) +* Add pagination support ([25883eb](https://github.com/googleapis/java-genai/commit/25883eb150f41da5b877dbfaae8b49170e91520c)) +* Add quick constructors for Content and Part ([2ff9e86](https://github.com/googleapis/java-genai/commit/2ff9e8611a65d034bc8cf0a2264ec89a19471e5c)) +* Add resolution field for Gemini Developer API Veo 3 generation ([eec410c](https://github.com/googleapis/java-genai/commit/eec410c5b68de471e9a824e61f0efb819841dfe6)) +* add session resumption. ([5c35c52](https://github.com/googleapis/java-genai/commit/5c35c52eb06e7243eb0b417179a6c3f11a9825ba)) +* add streaming support for Chat ([59eca52](https://github.com/googleapis/java-genai/commit/59eca52caf9f6a6f0a6d02959e3a41db0270c5d1)) +* add support for audio, video, text and session resumption in java. ([dcd08a4](https://github.com/googleapis/java-genai/commit/dcd08a4062981b1e2079ed61dd55fa693fa89983)) +* Add support for Grounding with Google Maps ([24b1127](https://github.com/googleapis/java-genai/commit/24b112756b21e1b9650e434ba6f53557c8bf6531)) +* Add support for lat/long in search. ([f43f00f](https://github.com/googleapis/java-genai/commit/f43f00f1ca51cfd7e3ee9439fad9013a42940d0a)) +* add support for live grounding metadata ([e90dd15](https://github.com/googleapis/java-genai/commit/e90dd15f58fcbab954c915a89619a035f5edb7ca)) +* add support for model_selection_config to GenerateContentConfig ([1958d4c](https://github.com/googleapis/java-genai/commit/1958d4cc6df7c0f686f27bd844fee2396be28f48)) +* Add support for Veo frame interpolation and video extension ([94f5e41](https://github.com/googleapis/java-genai/commit/94f5e41da83de8caa24c27b32d430f8ea5e6d0d8)) +* add tests for the async Operations module ([14c008a](https://github.com/googleapis/java-genai/commit/14c008a8fc40f712f922526dc00e2596705dc134)) +* add the response body for generateContent ([a011580](https://github.com/googleapis/java-genai/commit/a0115804e438bac120d5155c91ece53c79ada677)) +* add the response body for generateContent ([6e28ab4](https://github.com/googleapis/java-genai/commit/6e28ab4236565be61fb11e79ca9f2f31a2013598)) +* add the response body for generateContent ([b2a5b3f](https://github.com/googleapis/java-genai/commit/b2a5b3f5a6ef7a8bb4d011980d90ffdc3c745603)) +* Add thinking_budget to ThinkingConfig for Gemini Thinking Models ([a3ea4ed](https://github.com/googleapis/java-genai/commit/a3ea4ed04fb1e6251ebabd54a5370c04c9db976e)) +* Add thinking_config for live ([274c21d](https://github.com/googleapis/java-genai/commit/274c21d34310e630b9b4ad296b4c8314a4249d0c)) +* Add traffic type to GenerateContentResponseUsageMetadata ([fac241b](https://github.com/googleapis/java-genai/commit/fac241b9b6095bc965d48051caacd7b1da56d5f1)) +* add Tuning support for Java ([0ab209d](https://github.com/googleapis/java-genai/commit/0ab209db99bf98b58f7273fb12843984c42cb910)) +* Add types for configurable speech detection ([021d74b](https://github.com/googleapis/java-genai/commit/021d74b97c17d500d6f64a619150b1d940eeef87)) +* Add types to support continuous sessions with a sliding window ([d5e8a32](https://github.com/googleapis/java-genai/commit/d5e8a320de67aa947d0df232dcf1d7c811651927)) +* Add UsageMetadata to LiveServerMessage ([8b57e99](https://github.com/googleapis/java-genai/commit/8b57e999dbb02e43d6682c36b00b56fb1b7acad4)) +* Add utility methods for creating `FunctionResponsePart` and creating FunctionResponse `Part` with `FunctionResponseParts` ([af16a4c](https://github.com/googleapis/java-genai/commit/af16a4c994e0cc4e6fbc2cdbda825246df9aa253)) +* Add VALIDATED mode into FunctionCallingConfigMode ([4bb8680](https://github.com/googleapis/java-genai/commit/4bb868046199d3249f75ede213ef7d77e0b7783f)) +* Add Veo 2 generate_videos support in Java SDK ([272649a](https://github.com/googleapis/java-genai/commit/272649a2ebb35110b96b4db0ae52347ae1449bf6)) +* Add Video FPS, and enable start/end_offset for MLDev ([bc1df02](https://github.com/googleapis/java-genai/commit/bc1df02c6760c197eb3aa1eb7e58b2f982c06a40)) +* Add VideoGenerationReferenceType enum for generate_videos ([df9d910](https://github.com/googleapis/java-genai/commit/df9d910537ec7de6188f777801b4d50e84cd91e7)) +* Added Async wrappers for the Files Module operations ([b5b608d](https://github.com/googleapis/java-genai/commit/b5b608d69f8a55ad430b0d1b748a1ecbbc0fbc07)) +* Adding `thought_signature` field to the `Part` to store the signature for thoughts. ([dc9c8f7](https://github.com/googleapis/java-genai/commit/dc9c8f79bff4f449ccec61e078c0edae4f85f4cb)) +* allow methods in batch to return headers in sdk_http_response by default ([f937dd1](https://github.com/googleapis/java-genai/commit/f937dd1752e8a774e06d9afc6953211bd569fc35)) +* allow methods in models to return headers in sdk_http_response by default. ([7415e88](https://github.com/googleapis/java-genai/commit/7415e88f7520c695afc63f937b8b547c2877f4f6)) +* allow methods in tuning to return headers in sdk_http_response by default ([1b1205b](https://github.com/googleapis/java-genai/commit/1b1205b052a6d1d6782c6cdc190afdb48113ee9c)) +* allow title property to be sent to Gemini API. Gemini API now supports the title property, so it's ok to pass this onto both Vertex and Gemini API. ([9afeedc](https://github.com/googleapis/java-genai/commit/9afeedcda9c57b63b1368f2fe0bc5f093caecf3b)) +* allow users to access headers for generateContent method and generateContentStream ([0315357](https://github.com/googleapis/java-genai/commit/03153578ea64f0c34836ac62395aa867f44eac07)) +* automatically parse a java.lang.reflect.Method instance into a FunctionDeclaration when users pass it in as a Tool. ([e5109a0](https://github.com/googleapis/java-genai/commit/e5109a0a3ab3f74116513c962d65e95b80b61178)) +* Batches support in Java ([5ce13e9](https://github.com/googleapis/java-genai/commit/5ce13e9c79c4791d405b1dfa71c1d9358dc5a08d)) +* configure release-please to automatically update package version across all files during releases. ([9131ac2](https://github.com/googleapis/java-genai/commit/9131ac24fde477afb25deb516c7ace51530ed8d9)) +* enable automatic function calling for Models.generateContent method ([ecca800](https://github.com/googleapis/java-genai/commit/ecca80020a3facaad37744d73e1951b655b62df1)) +* Enable configurable speech detection in live SDK ([d6bfa76](https://github.com/googleapis/java-genai/commit/d6bfa76599df688dcaf3178cf70a86b292af461a)) +* enable continuous fine-tuning on a pre-tuned model in the SDK. ([e49d350](https://github.com/googleapis/java-genai/commit/e49d3509355f717d391a88b6ff1a6f4f6d83fddc)) +* Enable Google Maps tool for Genai. ([a4baf3c](https://github.com/googleapis/java-genai/commit/a4baf3c610ddcb1ed36c1501fcb2248b5a6bd610)) +* enable input transcription for Gemini API. ([9065970](https://github.com/googleapis/java-genai/commit/906597026e36c09cded0d8cb50ffe14a96c5faff)) +* enable json schema for controlled output and function declaration. ([35d93d8](https://github.com/googleapis/java-genai/commit/35d93d84a349cf1032d2cc61bf4e3128386759d6)) +* Enable R2V and Advanced Controls for Veo on Gemini Developer API ([4c42e65](https://github.com/googleapis/java-genai/commit/4c42e6527a7fe43c0b534e381d65b5d9650e8709)) +* enable request level http options(set through XxxConfig) ([abbe820](https://github.com/googleapis/java-genai/commit/abbe82015dc870c9588f55de8b5074ebebabcd63)) +* enable responseId for Gemini Developer API ([4912ff4](https://github.com/googleapis/java-genai/commit/4912ff421d6d3bc40edd70a939f71f5f33f58597)) +* Enable url_context for Vertex ([cc772d8](https://github.com/googleapis/java-genai/commit/cc772d83354507ee576b6d6fc44c7e435e6fc3f0)) +* expose generation_complete, input/output_transcription & input/output_audio_transcription to SDK for Vertex Live API ([e3b517a](https://github.com/googleapis/java-genai/commit/e3b517a085736e6171730c36e2a88e2d0bdeb36f)) +* expose JsonSerializable.stringToJsonNode to help user better use *JsonSchema fields. ([35d783b](https://github.com/googleapis/java-genai/commit/35d783b5d1655b6f0d52afefa633c608f39d4e01)) +* expose session id in Live API ([b6d5389](https://github.com/googleapis/java-genai/commit/b6d5389899bd1443d5c508776dfe5909eb1d7400)) +* expose the responseJsonSchema in GenerateContentConfig ([9d9acdb](https://github.com/googleapis/java-genai/commit/9d9acdb494358155cbb3c2ce3acbe55209bbdb7e)) +* generate the function_call class's converters ([38703c7](https://github.com/googleapis/java-genai/commit/38703c726606cbe1b6f5f5f4eb809310b0df94a8)) +* **http:** Make HttpApiClient public ([5da0746](https://github.com/googleapis/java-genai/commit/5da0746a818218d22456bfbab9d665cde6c1540e)) +* include UNEXPECTED_TOOL_CALL enum value to FinishReason for Vertex AI APIs. ([8186ff0](https://github.com/googleapis/java-genai/commit/8186ff0064b6f22e9f30e047ec0aebbb4804becc)) +* introduce FunctionDeclaration.fromMethod class method to parse a FunctionDeclaration instance from a java.lang.reflect.Method instance. ([aeb63b4](https://github.com/googleapis/java-genai/commit/aeb63b448714026c531aa321369f2272ffc8e3ae)) +* java local tokenizer ([d774185](https://github.com/googleapis/java-genai/commit/d7741856cafd3b8e05803f7b452335fbc4ce8977)) +* **java:** Support `GEMINI_API_KEY` as environment variable for setting API key. ([84e7588](https://github.com/googleapis/java-genai/commit/84e7588d1638770c7bf465aa25c5c7402404c918)) +* make min_property, max_property, min_length, max_length, example, patter fields available for Schema class when calling Gemini API ([8527db5](https://github.com/googleapis/java-genai/commit/8527db52795b1281f3a3de54bb6351e67d5d5229)) +* merge GenerationConfig into LiveConnectConfig ([e2fa59d](https://github.com/googleapis/java-genai/commit/e2fa59df04abe400e8688077bfb2486703fdd841)) +* Migrate Go file.create method to use the sdk_http_response field and remove http_headers ([7755eab](https://github.com/googleapis/java-genai/commit/7755eabbc3dc7289c34db7b97401eddc49032c59)) +* No more checked exceptions ([e452491](https://github.com/googleapis/java-genai/commit/e452491f363f20489e8d4754a74e9fc9ab557e26)) +* No more checked exceptions ([cad9eba](https://github.com/googleapis/java-genai/commit/cad9eba9af0b1a2536e9ce7be2c967aa6fdd6bee)) +* Parametrize model ID in Java genai samples and set hardcoded model IDs as default values if model ID not passed in by user. ([c1b0948](https://github.com/googleapis/java-genai/commit/c1b0948af51bc746cbf350e4b6a60b6199d3ffe2)) +* Populate X-Server-Timeout header when a request timeout is set. ([7126995](https://github.com/googleapis/java-genai/commit/71269959b7e376cd9fd8e3d1f2bfbf6a82ca6bc4)) +* RAG - Introducing context storing for Gemini Live API. ([d63d625](https://github.com/googleapis/java-genai/commit/d63d62583f554aca88062dfbf3c77cc65da812dd)) +* record automatic function calling history for Chat.sendMessage methods. ([7428d87](https://github.com/googleapis/java-genai/commit/7428d87adcf05fbac863fdd0986f7a08009f0b68)) +* Remove experimental warnings for generate_videos and operations ([be93305](https://github.com/googleapis/java-genai/commit/be93305b236283b77fcab9d5372d9a77f4dab757)) +* rename ComputerUse tool (early access) ([4bbba2b](https://github.com/googleapis/java-genai/commit/4bbba2b53eedec0b28a5d98d7fc193683c565f50)) +* resolve deep conditional nesting in Live API examples for better readability. ([aa71865](https://github.com/googleapis/java-genai/commit/aa718657f53f4bd9132a9b00816e7f5581108dec)) +* return headers for list method in all modules. ([45a027b](https://github.com/googleapis/java-genai/commit/45a027b2d0aef1219ec05ac9874f6493180abf94)) +* Return response headers for all methods (except streaming methods) ([7e8b71b](https://github.com/googleapis/java-genai/commit/7e8b71b0769362a728e2bf9b93738563113a4edc)) +* Save prompt safety attributes in dedicated field for generate_images ([c8c5aaf](https://github.com/googleapis/java-genai/commit/c8c5aaf98f39f0c0e4cfca1127950a817b38ad72)) +* support `default` field in Schema when users call Gemini API ([1d7c48d](https://github.com/googleapis/java-genai/commit/1d7c48d9327482989cd06999626718ed33d62c6f)) +* Support API keys for VertexAI mode for Java SDK ([826c0dc](https://github.com/googleapis/java-genai/commit/826c0dca02e06fcb6c7980259b23e955db176ec6)) +* Support audio transcription in Vertex Live API ([1ddb6d4](https://github.com/googleapis/java-genai/commit/1ddb6d498adcfb4b67152bdf42a22eb3e7850bfd)) +* Support Batches delete ([782465d](https://github.com/googleapis/java-genai/commit/782465d9c85c3637586fef490983771c4b4b5df0)) +* support client.caches.update method ([345c2b9](https://github.com/googleapis/java-genai/commit/345c2b93789913d6d84cdde9c30f86ec4041bd24)) +* Support continuous window compression in the Live API ([7acb98c](https://github.com/googleapis/java-genai/commit/7acb98c59774282a7c9bad131c5a3ec3ebd93324)) +* support createEmbeddings in Batches.java ([8947f6f](https://github.com/googleapis/java-genai/commit/8947f6fc20fbdd90a7d17071dee1bd2e5bea0c3e)) +* support customer-managed encryption key in cached content ([3021aaf](https://github.com/googleapis/java-genai/commit/3021aafb5da9bbbb2852660761728849df924db0)) +* Support different media input in Vertex Live API ([7f4c6bf](https://github.com/googleapis/java-genai/commit/7f4c6bf58804764d568bd3412086ead75a388df0)) +* support display_name for Blob class when calling Vertex AI ([db33f8a](https://github.com/googleapis/java-genai/commit/db33f8a4434f990e3ab8fa543a2d6d787147a540)) +* support document name in grounding metadata ([8273922](https://github.com/googleapis/java-genai/commit/8273922ebfbce4ffafa8993bcc6928b47b5ff821)) +* Support enableWidget feature in GoogleMaps ([aefbd5c](https://github.com/googleapis/java-genai/commit/aefbd5c1519f453cd2fe158a2765c195a9454322)) +* Support exclude_domains in Google Search and Enterprise Web Search ([e975d28](https://github.com/googleapis/java-genai/commit/e975d284f78e0c9a3cd2199d304b4739bad36fe1)) +* support extraBody in HttpOptions class ([036bac8](https://github.com/googleapis/java-genai/commit/036bac89fda15022ec4d9c5c73ba81ad0a6cc9be)) +* Support Gemini batch inline request's metadata and add test coverage to safety setting ([17033b3](https://github.com/googleapis/java-genai/commit/17033b38a93d6952b29699f5a4c79ed9dd862976)) +* Support GenerateVideosSource for Veo GenerateVideos ([c26af63](https://github.com/googleapis/java-genai/commit/c26af6396002cf21c0ed272290d44b09b6a41840)) +* Support http headers in GenerateContentResponse ([5282774](https://github.com/googleapis/java-genai/commit/528277406279d772c01ac2a48544962408ac235b)) +* Support image recontext on Vertex ([e7de8c8](https://github.com/googleapis/java-genai/commit/e7de8c83bbd2e7e37c2198c3501e2d5bee58c0a2)) +* Support Imagen 4 Ingredients on Vertex ([b5eed8d](https://github.com/googleapis/java-genai/commit/b5eed8d1323a3d37b53c1d8c5c5557392ce7ed44)) +* Support Imagen image segmentation on Vertex ([e2a561b](https://github.com/googleapis/java-genai/commit/e2a561b11b53f3a7cc30aacb4a0dcf6a26e01645)) +* support jailbreak in HarmCategory and BlockedReason ([3dab40b](https://github.com/googleapis/java-genai/commit/3dab40bc367168ed48d8d1acfb278f5bc6edb83f)) +* Support java.time.Instant and java.time.Duration for time/duration fields ([460d3d3](https://github.com/googleapis/java-genai/commit/460d3d31912c1003774bd898965d7a1aee90a61b)) +* Support maxConnections and maxConnectionsPerHost in Client instantiation ([7a4a8ac](https://github.com/googleapis/java-genai/commit/7a4a8ac093adba2f0fb7b2558b41274da450010c)) +* support media resolution ([ce9e7b0](https://github.com/googleapis/java-genai/commit/ce9e7b04e309198481392a0f0d54406d5d6de6ed)) +* Support models.get/delete/update in Java ([3d8d8ec](https://github.com/googleapis/java-genai/commit/3d8d8ec5eb60c8c8183588389e45300d7f4c82a0)) +* Support new enum types for UrlRetrievalStatus ([cb27222](https://github.com/googleapis/java-genai/commit/cb27222a7f7cdf442a7d6b61496709f7cf084a91)) +* support new fields in FileData, GenerationConfig, GroundingChunkRetrievedContext, RetrievalConfig, Schema, TuningJob, VertexAISearch, ([6bf3d32](https://github.com/googleapis/java-genai/commit/6bf3d3224f16a9f46b4bc6e2d4af30bb4dbd768e)) +* Support passing builder classes to setter methods ([996c994](https://github.com/googleapis/java-genai/commit/996c994d6a2697b8b79dd48a7460eed49a408884)) +* Support passing builder varargs to setter methods ([0b08524](https://github.com/googleapis/java-genai/commit/0b08524b002b656c9c8a7a7f667a9efabb69dcfb)) +* Support RealtimeInputConfig, and language_code in SpeechConfig in python ([f5bd874](https://github.com/googleapis/java-genai/commit/f5bd8744471b24792096ee169db3cea95ed7a872)) +* support response headers in Go for all methods. ([222b41e](https://github.com/googleapis/java-genai/commit/222b41e196afc13775cc22292a58567d7b4859fa)) +* Support setting the default base URL in clients via Client.setDefaultBaseUrls() ([c119778](https://github.com/googleapis/java-genai/commit/c119778c3cf573e9eeefc0c540313162f1abf3ae)) +* support tunings.cancel in the genai SDK for Python, Java, JS, and Go ([9982251](https://github.com/googleapis/java-genai/commit/9982251d2dd80d3151aefb4462d9e4864d8e064e)) +* Support Url Context Retrieval tool ([f4fd37a](https://github.com/googleapis/java-genai/commit/f4fd37acea16595168a88801c4c50da0abdfd2f1)) +* Support varargs in Enum setter methods ([cd63fd0](https://github.com/googleapis/java-genai/commit/cd63fd0bdb124d8d2bebabc68f29a504ae1f3e7e)) +* Support varargs in setter methods ([0b08524](https://github.com/googleapis/java-genai/commit/0b08524b002b656c9c8a7a7f667a9efabb69dcfb)) +* Support Veo 2 Editing on Vertex ([d401d3c](https://github.com/googleapis/java-genai/commit/d401d3cf6a5f9ef3d2a76a548eed9d218169170e)) +* Support Veo 2 Reference Images to Video Generation on Vertex ([2f5580f](https://github.com/googleapis/java-genai/commit/2f5580fd1e78d6e8e4f371f291dacf98c7c617ef)) +* Support video extension for Veo on Gemini Developer API ([b398509](https://github.com/googleapis/java-genai/commit/b398509697a3e9aa27bad5e804382c5a4db333ab)) +* update release-please configuration to enable version updating across all files ([d2f3c0e](https://github.com/googleapis/java-genai/commit/d2f3c0e948412973621301f70d6dfde8e25638d1)) +* Update VertexRagStore ([4a75670](https://github.com/googleapis/java-genai/commit/4a75670dc081e747f157ef632a59f3afa53aaa63)) + + +### Bug Fixes + +* Add backwards compatibility for generateVideos in Java SDK ([504984a](https://github.com/googleapis/java-genai/commit/504984ad8bc30636e47a6838d89fe097766e9484)) +* bug in validate history ([7428d87](https://github.com/googleapis/java-genai/commit/7428d87adcf05fbac863fdd0986f7a08009f0b68)) +* Defer loading ADC when credentials is provided explicitly in Live API ([a540614](https://github.com/googleapis/java-genai/commit/a5406140aeaf9774265a5bcce79dae0707ed9287)) +* do not raise error for `default` field in Schema for Gemini API calls ([8bb1c64](https://github.com/googleapis/java-genai/commit/8bb1c640f4f710b7cd4a1a5a248ced14683bcd0d)) +* Enable `id` field in `FunctionCall` for Vertex AI. ([3773fe7](https://github.com/googleapis/java-genai/commit/3773fe75007b9ce83692de0031853f0f607bff3e)) +* Ensure Live server message are properly converted ([206dc88](https://github.com/googleapis/java-genai/commit/206dc88e3b220a875f784a507fc9470bc411de36)) +* Expose `JOB_STATE_RUNNING` and `JOB_STATE_EXPIRED` for Gemini Batches states ([c5b4fdf](https://github.com/googleapis/java-genai/commit/c5b4fdf58b9d0d74efdd2c7e740bed8b6b661c99)) +* fix errors in live samples ([5a9892f](https://github.com/googleapis/java-genai/commit/5a9892f60579b7309b4dd47e0e1a49f9c7848163)) +* fix import in live sample ([78cc345](https://github.com/googleapis/java-genai/commit/78cc345791331fb662b2a151846bae19086acc2a)) +* Fix the bug that files.create doesn't return the upload URL correctly ([eb40c5f](https://github.com/googleapis/java-genai/commit/eb40c5f7f255b46a7a820da044e210127c7aac18)) +* generateContentStream failed to find converter method GenerateContentResponseFromXxx ([590cb98](https://github.com/googleapis/java-genai/commit/590cb987874e6a812b0b3e5dab3f75fe919adafa)) +* Getter methods in Client will return null rather than throw exceptions when the value is not set ([c1b0290](https://github.com/googleapis/java-genai/commit/c1b0290d5f11efff9e402c6df75e17782cbb529d)) +* initialization of `pre_tuned_model_checkpoint_id` from tuning config. ([c293633](https://github.com/googleapis/java-genai/commit/c293633a8fe298668f030ba3b257347a8fd0eedf)) +* **live:** Enhance security by moving api key from query parameters to header ([e48c7f1](https://github.com/googleapis/java-genai/commit/e48c7f1e73dadf5c5198f9b58cea322deb7a4ed0)) +* Make async generateContent and generateContentStream truly non-blocking ([5cb18fd](https://github.com/googleapis/java-genai/commit/5cb18fd4f07f9b1f21efb82fe961e473325f6257)) +* Make async methods in Batches module truly non-blocking ([f2ae75a](https://github.com/googleapis/java-genai/commit/f2ae75ac364702f483c376e458a120d1ffa93b17)) +* Make async methods in Caches, Tuning, and Operations modules truly non-blocking ([db56239](https://github.com/googleapis/java-genai/commit/db56239bbebbfe3cb95e00d2d3eac253b76f22fe)) +* Make async methods in Models module truly non-blocking ([c205d01](https://github.com/googleapis/java-genai/commit/c205d0172ca40e01f7d8de17a3bc9d38eeb5fc21)) +* Move generation config to the top level LiveConnectConfig ([c71e78e](https://github.com/googleapis/java-genai/commit/c71e78e4d3041798bbf4352a266337f834925104)) +* Only expose `toJson` and `fromJson` as public methods in JsonSerializable ([dbef8b4](https://github.com/googleapis/java-genai/commit/dbef8b4fcb8f468cf5c4024e4ffe74c7a2380cc5)) +* only run unit tests in github action ([9b2861b](https://github.com/googleapis/java-genai/commit/9b2861bb79d50c10c152aa010bedf0bc48a04ad8)) +* Pager throws an exception if list request returns nothing(correct behavior is returning a Pager without any items in it) ([0a2301b](https://github.com/googleapis/java-genai/commit/0a2301b19fcd3e4d3694d42780da8f5ffe5f9207)) +* Remove AsyncSession.sendContent method which was accidentally added ([e452491](https://github.com/googleapis/java-genai/commit/e452491f363f20489e8d4754a74e9fc9ab557e26)) +* Remove AsyncSession.sendContent method which was accidentally added ([cad9eba](https://github.com/googleapis/java-genai/commit/cad9eba9af0b1a2536e9ce7be2c967aa6fdd6bee)) +* Remove default timeout ([d1f6201](https://github.com/googleapis/java-genai/commit/d1f6201892de9f37b913044dd494c68b81bcc13a)) +* Remove duplicate JavaTimeModule in JsonSerializable ([a7dbd4c](https://github.com/googleapis/java-genai/commit/a7dbd4c527456f20aa5d154bde14f74f6e66d174)) +* Rename LiveEphemeralParameters to LiveConnectConstraints. ([0655609](https://github.com/googleapis/java-genai/commit/0655609c854a5b147974016cee5f28d712b4a06f)) +* schema handling in transformer ([8064028](https://github.com/googleapis/java-genai/commit/8064028e00df143245010c49b468adf04d939266)) +* schema transformer logic fix. ([e6ab7d5](https://github.com/googleapis/java-genai/commit/e6ab7d564dfc188b8eef6fd1a0f2fc70ed05c8d4)) +* Throw IllegalArgumentException rather than general Error when an invalid parameter is passed to Gemini/Vertex backend ([1bd4485](https://github.com/googleapis/java-genai/commit/1bd44850b251560cdc4b513aea43bb037f7016b1)) +* Transformers are not being used in list types ([a9609db](https://github.com/googleapis/java-genai/commit/a9609db72b5a2051f4fbe655ba32ca3f0def3a5a)) +* Update error message when a service from an unsupported backend is called ([4cd81ea](https://github.com/googleapis/java-genai/commit/4cd81ea374f756b418629f25c78d5d8e7d914d20)) +* update Live API audio example with better interruption handling ([cad8df9](https://github.com/googleapis/java-genai/commit/cad8df9c4edaf0806a641869fef6379ed05f0189)) +* Update Live API websocket base url in java SDK ([8c97572](https://github.com/googleapis/java-genai/commit/8c97572ce6b2b12e5d597ee42bd454ef20f2ad75)) +* Use `orElseGet` to defer loading of default credentials. ([bc19d79](https://github.com/googleapis/java-genai/commit/bc19d794db6a6111e23a316870ef4a568df9128e)) +* Use `orElseGet` to defer loading of default credentials. ([#124](https://github.com/googleapis/java-genai/issues/124)) ([6adac0e](https://github.com/googleapis/java-genai/commit/6adac0effbd5f792c69b3ab1d537c221de392894)) + + +### Documentation + +* add a link for where to find the Google Cloud project id, API key and location ([3ac726c](https://github.com/googleapis/java-genai/commit/3ac726c6122bc8fad1cbfd0959ba62d4ba05f489)) +* Add examples for embedContent ([7583ddf](https://github.com/googleapis/java-genai/commit/7583ddfa22ec82a4cc0620615c5f67202ab99923)) +* Add Imagen and Veo to README ([cc0a0aa](https://github.com/googleapis/java-genai/commit/cc0a0aa28cae618acf617ab92819df78d80afea5)) +* Add javadoc for setter methods in types classes ([996c994](https://github.com/googleapis/java-genai/commit/996c994d6a2697b8b79dd48a7460eed49a408884)) +* Add javadoc to public classes/methods ([78c2a39](https://github.com/googleapis/java-genai/commit/78c2a390ef7ad34dac5cf14ff10838ba9c0899c4)) +* Add latest models features in README ([a2eccaf](https://github.com/googleapis/java-genai/commit/a2eccafae5c6c9b82341a148b572bf9bc80f241b)) +* add more comments to make it easier to follow live api code, and to explain the usage of new concepts like thenCompose. ([96c792c](https://github.com/googleapis/java-genai/commit/96c792c3aa84f632e0b46bb986de403ecbf4edc1)) +* docstring improvements ([9d0ca34](https://github.com/googleapis/java-genai/commit/9d0ca34ef944d075e57b1df370bd751bd9c976b3)) +* Fix comment typo for Modality.AUDIO ([18dea48](https://github.com/googleapis/java-genai/commit/18dea48164a79936dbb44c8d92e95b4615d914ce)), closes [#620](https://github.com/googleapis/java-genai/issues/620) +* fix small typo in comments ([a6bfe36](https://github.com/googleapis/java-genai/commit/a6bfe36843bed1575a03c86a092a17b35e48fd9f)) +* Improve docs for response_mime_type and response_schema. Relate to [#297](https://github.com/googleapis/java-genai/issues/297) ([4782f56](https://github.com/googleapis/java-genai/commit/4782f56b5541bf62f88dce7e3e778b9e30df1692)) +* improve generate images documentation ([44c21dd](https://github.com/googleapis/java-genai/commit/44c21dd78e0d0be0e681e991b15d3dae3be360f2)) +* mark Client as thread safe and Chat as not thread safe ([be3e50e](https://github.com/googleapis/java-genai/commit/be3e50e4217780329c0636fd7f8a1b743e7f9597)) +* Refactor model IDs into a Constants class ([dacd787](https://github.com/googleapis/java-genai/commit/dacd7875d41f810e50f2655e5d0e62f031197e61)) +* Refactor/update docstrings for Imagen and Veo ([2470101](https://github.com/googleapis/java-genai/commit/24701018feb91d147bf1817b04752e2595bf40ab)) +* Remove no-op PRs from changelog. ([c498c8b](https://github.com/googleapis/java-genai/commit/c498c8b0cb84fa6ba39062493c2bd88b2a06a862)) +* Update description of thinking_budget. ([265f20a](https://github.com/googleapis/java-genai/commit/265f20addd9e9e76c249e6042d653c8cec9f27a4)) +* Update examples and README after removing checked exceptions ([5cb6ee5](https://github.com/googleapis/java-genai/commit/5cb6ee5384c57e5f698c395a97e8f9b197bb5f3b)) +* Update generated video resolution config docstring ([9a2ced8](https://github.com/googleapis/java-genai/commit/9a2ced8ed3a1896b8170cc9ca117b61cb9eea705)) +* Update README with latest features in Client ([dcf70cc](https://github.com/googleapis/java-genai/commit/dcf70cc64a93355cdc6a2eedf172399dd332750e)) +* update TokensInfo docstring ([48eba7f](https://github.com/googleapis/java-genai/commit/48eba7fcb369537ca4266ec61107e016f7c242ed)) +* Updating docs to include how to initialize client via environment variables ([7fc3e62](https://github.com/googleapis/java-genai/commit/7fc3e624cc46f897bee0d1fa12276e7dc0727c2f)) + + +### Miscellaneous Chores + +* mark *Parameters classes as internal ([77c9d71](https://github.com/googleapis/java-genai/commit/77c9d714569431d30d11121d897d1608cc81420a)) +* release 0.6.1 ([19c6373](https://github.com/googleapis/java-genai/commit/19c6373ac4e8dbc703d84b2d6564468ba810f739)) +* release 1.0.0 ([d4561d7](https://github.com/googleapis/java-genai/commit/d4561d78447f45f7be63f4bc6f342ab337f35dc0)) +* release 1.4.1 ([49a57d8](https://github.com/googleapis/java-genai/commit/49a57d878379729a14ccd4846af67c67bbaf2419)) + + +### Code Refactoring + +* Hide internal classes ApiResponse and Common ([6218143](https://github.com/googleapis/java-genai/commit/6218143384b89bd9267c76a868365ee03b381570)) +* Rename getVideoOperation to getVideosOperation for Java SDK ([4cd355b](https://github.com/googleapis/java-genai/commit/4cd355b51ffe5a551c54bf5e35b22ef47ad545e2)) + ## [1.24.0](https://github.com/googleapis/java-genai/compare/v1.23.0...v1.24.0) (2025-10-21) diff --git a/README.md b/README.md index 1c2779eba98..308f67331ff 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ If you're using Maven, add the following to your dependencies: com.google.genai google-genai - 1.24.0 + 1.0.0 ``` diff --git a/examples/pom.xml b/examples/pom.xml index 24315678e84..f18578c5183 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -5,7 +5,7 @@ com.google.genai.examples google-genai-examples - 1.25.0-SNAPSHOT + 1.0.0 google-genai-examples @@ -13,7 +13,7 @@ 1.8 1.8 - 1.25.0-SNAPSHOT + 1.0.0 diff --git a/pom.xml b/pom.xml index 77b30d44839..a65808c9bab 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ com.google.genai google-genai google-genai - 1.25.0-SNAPSHOT + 1.0.0 jar Java idiomatic SDK for the Gemini Developer APIs and Vertex AI APIs. diff --git a/src/main/java/com/google/genai/ApiClient.java b/src/main/java/com/google/genai/ApiClient.java index 7fe25f4f10a..27a853ae56c 100644 --- a/src/main/java/com/google/genai/ApiClient.java +++ b/src/main/java/com/google/genai/ApiClient.java @@ -47,7 +47,7 @@ abstract class ApiClient { // {x-version-update-start:google-genai:released} - private static final String SDK_VERSION = "1.24.0"; + private static final String SDK_VERSION = "1.0.0"; // {x-version-update-end:google-genai:released} private static final Logger logger = Logger.getLogger(ApiClient.class.getName()); diff --git a/versions.txt b/versions.txt index 7e3ca86330d..cb793e6e383 100644 --- a/versions.txt +++ b/versions.txt @@ -1,4 +1,4 @@ # Format: # module:released-version:current-version -google-genai:1.24.0:1.25.0-SNAPSHOT +google-genai:1.0.0:1.0.0