From b4d5c54d9276a864654ebf86ab71fbc1379652bc Mon Sep 17 00:00:00 2001 From: George Weale Date: Tue, 17 Mar 2026 11:24:04 -0700 Subject: [PATCH 1/4] fix: Store and retrieve usage_metadata in Vertex AI custom_metadata The Vertex AI session service does not natively support persisting usage_metadata. This change serializes usage_metadata into the custom_metadata field under the key '_usage_metadata' when appending events and deserializes it back when retrieving events. This allows usage information to be round-tripped through the Vertex AI session service. Co-authored-by: George Weale PiperOrigin-RevId: 885121070 --- .../adk/sessions/vertex_ai_session_service.py | 58 ++++++-- .../test_vertex_ai_session_service.py | 128 ++++++++++++++++++ 2 files changed, 178 insertions(+), 8 deletions(-) diff --git a/src/google/adk/sessions/vertex_ai_session_service.py b/src/google/adk/sessions/vertex_ai_session_service.py index 8cb7109ece..9e5c9bb2ec 100644 --- a/src/google/adk/sessions/vertex_ai_session_service.py +++ b/src/google/adk/sessions/vertex_ai_session_service.py @@ -42,6 +42,20 @@ logger = logging.getLogger('google_adk.' + __name__) +_COMPACTION_CUSTOM_METADATA_KEY = '_compaction' +_USAGE_METADATA_CUSTOM_METADATA_KEY = '_usage_metadata' + + +def _set_internal_custom_metadata( + metadata_dict: dict[str, Any], *, key: str, value: dict[str, Any] +) -> None: + """Stores internal metadata alongside user-provided custom metadata.""" + existing_custom_metadata = metadata_dict.get('custom_metadata') or {} + metadata_dict['custom_metadata'] = { + **existing_custom_metadata, + key: value, + } + class VertexAiSessionService(BaseSessionService): """Connects to the Vertex AI Agent Engine Session Service using Agent Engine SDK. @@ -301,11 +315,22 @@ async def append_event(self, session: Session, event: Event) -> Event: compaction_dict = event.actions.compaction.model_dump( exclude_none=True, mode='json' ) - existing_custom = metadata_dict.get('custom_metadata') or {} - metadata_dict['custom_metadata'] = { - **existing_custom, - '_compaction': compaction_dict, - } + _set_internal_custom_metadata( + metadata_dict, + key=_COMPACTION_CUSTOM_METADATA_KEY, + value=compaction_dict, + ) + # Store usage_metadata in custom_metadata since the Vertex AI service + # does not persist it in EventMetadata. + if event.usage_metadata: + usage_dict = event.usage_metadata.model_dump( + exclude_none=True, mode='json' + ) + _set_internal_custom_metadata( + metadata_dict, + key=_USAGE_METADATA_CUSTOM_METADATA_KEY, + value=usage_dict, + ) config['event_metadata'] = metadata_dict async with self._get_api_client() as api_client: @@ -378,11 +403,20 @@ def _from_api_event(api_event_obj: vertexai.types.SessionEvent) -> Event: # Extract compaction data stored in custom_metadata. # NOTE: This read path must be kept permanently because sessions # written before native compaction support store compaction data - # in custom_metadata under the '_compaction' key. + # in custom_metadata under the compaction metadata key. compaction_data = None - if custom_metadata and '_compaction' in custom_metadata: + usage_metadata_data = None + if custom_metadata and ( + _COMPACTION_CUSTOM_METADATA_KEY in custom_metadata + or _USAGE_METADATA_CUSTOM_METADATA_KEY in custom_metadata + ): custom_metadata = dict(custom_metadata) # avoid mutating the API response - compaction_data = custom_metadata.pop('_compaction') + compaction_data = custom_metadata.pop( + _COMPACTION_CUSTOM_METADATA_KEY, None + ) + usage_metadata_data = custom_metadata.pop( + _USAGE_METADATA_CUSTOM_METADATA_KEY, None + ) if not custom_metadata: custom_metadata = None grounding_metadata = _session_util.decode_model( @@ -397,6 +431,7 @@ def _from_api_event(api_event_obj: vertexai.types.SessionEvent) -> Event: branch = None custom_metadata = None compaction_data = None + usage_metadata_data = None grounding_metadata = None if actions: @@ -416,6 +451,12 @@ def _from_api_event(api_event_obj: vertexai.types.SessionEvent) -> Event: else: event_actions = EventActions() + usage_metadata = None + if usage_metadata_data: + usage_metadata = types.GenerateContentResponseUsageMetadata.model_validate( + usage_metadata_data + ) + return Event( id=api_event_obj.name.split('/')[-1], invocation_id=api_event_obj.invocation_id, @@ -434,4 +475,5 @@ def _from_api_event(api_event_obj: vertexai.types.SessionEvent) -> Event: custom_metadata=custom_metadata, grounding_metadata=grounding_metadata, long_running_tool_ids=long_running_tool_ids, + usage_metadata=usage_metadata, ) diff --git a/tests/unittests/sessions/test_vertex_ai_session_service.py b/tests/unittests/sessions/test_vertex_ai_session_service.py index c095ddd9d2..20fdbe3c6d 100644 --- a/tests/unittests/sessions/test_vertex_ai_session_service.py +++ b/tests/unittests/sessions/test_vertex_ai_session_service.py @@ -911,3 +911,131 @@ async def test_append_event_with_compaction_and_custom_metadata(): # User custom_metadata is preserved without the internal _compaction key assert appended_event.custom_metadata == {'user_key': 'user_value'} assert '_compaction' not in (appended_event.custom_metadata or {}) + + +@pytest.mark.asyncio +@pytest.mark.usefixtures('mock_get_api_client') +async def test_append_event_with_usage_metadata(): + """usage_metadata round-trips through append_event and get_session.""" + session_service = mock_vertex_ai_session_service() + session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert session is not None + + event_to_append = Event( + invocation_id='usage_invocation', + author='model', + timestamp=1734005536.0, + usage_metadata=genai_types.GenerateContentResponseUsageMetadata( + prompt_token_count=150, + candidates_token_count=50, + total_token_count=200, + ), + ) + + await session_service.append_event(session, event_to_append) + + retrieved_session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert retrieved_session is not None + + appended_event = retrieved_session.events[-1] + assert appended_event.usage_metadata is not None + assert appended_event.usage_metadata.prompt_token_count == 150 + assert appended_event.usage_metadata.candidates_token_count == 50 + assert appended_event.usage_metadata.total_token_count == 200 + # custom_metadata should remain None when only usage_metadata was stored + assert appended_event.custom_metadata is None + + +@pytest.mark.asyncio +@pytest.mark.usefixtures('mock_get_api_client') +async def test_append_event_with_usage_metadata_and_custom_metadata(): + """Both usage_metadata and user custom_metadata survive the round-trip.""" + session_service = mock_vertex_ai_session_service() + session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert session is not None + + event_to_append = Event( + invocation_id='usage_and_meta_invocation', + author='model', + timestamp=1734005537.0, + usage_metadata=genai_types.GenerateContentResponseUsageMetadata( + prompt_token_count=300, + total_token_count=400, + ), + custom_metadata={'my_key': 'my_value'}, + ) + + await session_service.append_event(session, event_to_append) + + retrieved_session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert retrieved_session is not None + + appended_event = retrieved_session.events[-1] + # usage_metadata is restored + assert appended_event.usage_metadata is not None + assert appended_event.usage_metadata.prompt_token_count == 300 + assert appended_event.usage_metadata.total_token_count == 400 + # User custom_metadata is preserved without internal keys + assert appended_event.custom_metadata == {'my_key': 'my_value'} + assert '_usage_metadata' not in (appended_event.custom_metadata or {}) + + +@pytest.mark.asyncio +@pytest.mark.usefixtures('mock_get_api_client') +async def test_append_event_with_usage_metadata_and_compaction(): + """usage_metadata, compaction, and user custom_metadata all coexist.""" + session_service = mock_vertex_ai_session_service() + session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert session is not None + + compaction = EventCompaction( + start_timestamp=500.0, + end_timestamp=600.0, + compacted_content=genai_types.Content( + parts=[genai_types.Part(text='compacted')] + ), + ) + event_to_append = Event( + invocation_id='all_three_invocation', + author='model', + timestamp=1734005538.0, + actions=EventActions(compaction=compaction), + usage_metadata=genai_types.GenerateContentResponseUsageMetadata( + prompt_token_count=1000, + candidates_token_count=250, + total_token_count=1250, + ), + custom_metadata={'extra': 'info'}, + ) + + await session_service.append_event(session, event_to_append) + + retrieved_session = await session_service.get_session( + app_name='123', user_id='user', session_id='1' + ) + assert retrieved_session is not None + + appended_event = retrieved_session.events[-1] + # Compaction is restored + assert appended_event.actions.compaction is not None + assert appended_event.actions.compaction.start_timestamp == 500.0 + assert appended_event.actions.compaction.end_timestamp == 600.0 + # usage_metadata is restored + assert appended_event.usage_metadata is not None + assert appended_event.usage_metadata.prompt_token_count == 1000 + assert appended_event.usage_metadata.candidates_token_count == 250 + assert appended_event.usage_metadata.total_token_count == 1250 + # User custom_metadata is preserved without internal keys + assert appended_event.custom_metadata == {'extra': 'info'} + assert '_compaction' not in (appended_event.custom_metadata or {}) + assert '_usage_metadata' not in (appended_event.custom_metadata or {}) From b376c1ec5df7b05f706626c2f2f6b1604d6b80f0 Mon Sep 17 00:00:00 2001 From: Liang Wu Date: Fri, 13 Mar 2026 16:59:08 -0700 Subject: [PATCH 2/4] fix(bigquery): use valid dataplex OAuth scope Closes issue #4805 Co-authored-by: Liang Wu PiperOrigin-RevId: 883403628 --- src/google/adk/tools/bigquery/bigquery_credentials.py | 2 +- tests/unittests/tools/bigquery/test_bigquery_credentials.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/google/adk/tools/bigquery/bigquery_credentials.py b/src/google/adk/tools/bigquery/bigquery_credentials.py index 958ce9d7ec..c491c52ee6 100644 --- a/src/google/adk/tools/bigquery/bigquery_credentials.py +++ b/src/google/adk/tools/bigquery/bigquery_credentials.py @@ -21,7 +21,7 @@ BIGQUERY_TOKEN_CACHE_KEY = "bigquery_token_cache" BIGQUERY_SCOPES = [ "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/dataplex", + "https://www.googleapis.com/auth/dataplex.read-write", ] BIGQUERY_DEFAULT_SCOPE = ["https://www.googleapis.com/auth/bigquery"] diff --git a/tests/unittests/tools/bigquery/test_bigquery_credentials.py b/tests/unittests/tools/bigquery/test_bigquery_credentials.py index e20662924b..f0c188d0a4 100644 --- a/tests/unittests/tools/bigquery/test_bigquery_credentials.py +++ b/tests/unittests/tools/bigquery/test_bigquery_credentials.py @@ -47,7 +47,7 @@ def test_valid_credentials_object_auth_credentials(self): assert config.client_secret is None assert config.scopes == [ "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/dataplex", + "https://www.googleapis.com/auth/dataplex.read-write", ] def test_valid_credentials_object_oauth2_credentials(self): @@ -90,7 +90,7 @@ def test_valid_client_id_secret_pair_default_scope(self): assert config.client_secret == "test_client_secret" assert config.scopes == [ "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/dataplex", + "https://www.googleapis.com/auth/dataplex.read-write", ] def test_valid_client_id_secret_pair_w_scope(self): @@ -135,7 +135,7 @@ def test_valid_client_id_secret_pair_w_empty_scope(self): assert config.client_secret == "test_client_secret" assert config.scopes == [ "https://www.googleapis.com/auth/bigquery", - "https://www.googleapis.com/auth/dataplex", + "https://www.googleapis.com/auth/dataplex.read-write", ] def test_missing_client_secret_raises_error(self): From 953e224ea1c0ea77dcec52a8d9b9b35b60329ed9 Mon Sep 17 00:00:00 2001 From: "Wei (Jack) Sun" Date: Tue, 17 Mar 2026 14:11:05 -0700 Subject: [PATCH 3/4] chore(release/candidate): release 1.27.2 (#4861) Co-authored-by: Liang Wu <18244712+wuliang229@users.noreply.github.com> --- .github/.release-please-manifest.json | 2 +- CHANGELOG.md | 108 ++++++++++++++++++++++++++ src/google/adk/version.py | 2 +- 3 files changed, 110 insertions(+), 2 deletions(-) diff --git a/.github/.release-please-manifest.json b/.github/.release-please-manifest.json index f97891a673..42b9d998ba 100644 --- a/.github/.release-please-manifest.json +++ b/.github/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.26.0" + ".": "1.27.2" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 92a8197b7a..852c69cb9d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,113 @@ # Changelog +## [1.27.2](https://github.com/google/adk-python/compare/v1.27.1...v1.27.2) (2026-03-17) +### Bug Fixes + * Use valid dataplex OAuth scope for BigQueryToolset ([4010716](https://github.com/google/adk-python/commit/4010716470fc83918dc367c5971342ff551401c8)) + * Store and retrieve usage_metadata in Vertex AI custom_metadata ([b318eee](https://github.com/google/adk-python/commit/b318eee979b1625d3d23ad98825c88f54016a12f)) + +## [1.27.1](https://github.com/google/adk-python/compare/v1.27.0...v1.27.1) (2026-03-13) +### Bug Fixes + * Rolling back change to fix issue affecting LlmAgent creation due to missing version field ([0e18f81](https://github.com/google/adk-python/commit/0e18f81a5cd0d0392ded653b1a63a236449a2685)) + + +## [1.27.0](https://github.com/google/adk-python/compare/v1.26.0...v1.27.0) (2026-03-12) + +### Features +* **[Core]** + * Introduce A2A request interceptors in RemoteA2aAgent ([6f772d2](https://github.com/google/adk-python/commit/6f772d2b0841446bc168ccf405b59eb17c1d671a)) + * Add UiWidget to EventActions for supporting new experimental UI Widgets feature ([530ff06](https://github.com/google/adk-python/commit/530ff06ece61a93855a53235e85af18b46b2a6a0)) + * **auth:** Add pluggable support for auth integrations using AuthProviderRegistry within CredentialManager ([d004074](https://github.com/google/adk-python/commit/d004074c90525442a69cebe226440bb318abad29)) + * Support all `types.SchemaUnion` as output_schema in LLM Agent ([63f450e](https://github.com/google/adk-python/commit/63f450e0231f237ee1af37f17420d37b15426d48)) + * durable runtime support ([07fdd23](https://github.com/google/adk-python/commit/07fdd23c9c3f5046aa668fb480840f67f13bf271)) + * **runners:** pass GetSessionConfig through Runner to session service ([eff724a](https://github.com/google/adk-python/commit/eff724ac9aef2a203607f772c473703f21c09a72)) + +* **[Models]** + * Add support for PDF documents in Anthropic LLM ([4c8ba74](https://github.com/google/adk-python/commit/4c8ba74fcb07014db187ef8db8246ff966379aa9)) + * Add streaming support for Anthropic models ([5770cd3](https://github.com/google/adk-python/commit/5770cd3776c8805086ece34d747e589e36916a34)), closes [#3250](https://github.com/google/adk-python/issues/3250) + * Enable output schema with tools for LiteLlm models ([89df5fc](https://github.com/google/adk-python/commit/89df5fcf883b599cf7bfe40bde35b8d86ab0146b)), closes [#3969](https://github.com/google/adk-python/issues/3969) + * Preserve thought_signature in LiteLLM tool calls ([ae565be](https://github.com/google/adk-python/commit/ae565be30e64249b2913ad647911061a8b170e21)), closes [#4650](https://github.com/google/adk-python/issues/4650) + +* **[Web]** + * Updated human in the loop: developers now can respond to long running functions directly in chat + * Render artifacts when resuming + * Fix some light mode styles + * Fix token level streaming not working properly ([22799c0](https://github.com/google/adk-python/commit/22799c0833569753021078f7bd8dcd11ece562fe)) + +* **[Observability]** + * **telemetry:** add new gen_ai.agent.version span attribute ([ffe97ec](https://github.com/google/adk-python/commit/ffe97ec5ad7229c0b4ba573f33eb0edb8bb2877a)) + * **otel:** add `gen_ai.tool.definitions` to experimental semconv ([4dd4d5e](https://github.com/google/adk-python/commit/4dd4d5ecb6a1dadbc41389dac208616f6d21bc6e)) + * **otel:** add experimental semantic convention and emit `gen_ai.client.inference.operation.details` event ([19718e9](https://github.com/google/adk-python/commit/19718e9c174af7b1287b627e6b23a609db1ee5e2)) + * add missing token usage span attributes during model usage ([77bf325](https://github.com/google/adk-python/commit/77bf325d2bf556621c3276f74ee2816fce2a7085)) + * capture tool execution error code in OpenTelemetry spans ([e0a6c6d](https://github.com/google/adk-python/commit/e0a6c6db6f8e2db161f8b86b9f11030f0cec807a)) + +* **[Tools]** + * Warn when accessing DEFAULT_SKILL_SYSTEM_INSTRUCTION ([35366f4](https://github.com/google/adk-python/commit/35366f4e2a0575090fe12cd85f51e8116a1cd0d3)) + * add preserve_property_names option to OpenAPIToolset ([078b516](https://github.com/google/adk-python/commit/078b5163ff47acec69b1c8e105f62eb7b74f5548)) + * Add gcs filesystem support for Skills. It supports skills in text and pdf format, also has some sample agents ([6edcb97](https://github.com/google/adk-python/commit/6edcb975827dbd543a40ae3a402d2389327df603)) + * Add list_skills_in_dir to skills utils ([327b3af](https://github.com/google/adk-python/commit/327b3affd2d0a192f5a072b90fdb4aae7575be90)) + * Add support for MCP App UI widgets in MCPTool ([86db35c](https://github.com/google/adk-python/commit/86db35c338adaafb41e156311465e71e17edf35e)) + * add Dataplex Catalog search tool to BigQuery ADK ([82c2eef](https://github.com/google/adk-python/commit/82c2eefb27313c5b11b9e9382f626f543c53a29e)) + * Add RunSkillScriptTool to SkillToolset ([636f68f](https://github.com/google/adk-python/commit/636f68fbee700aa47f01e2cfd746859353b3333d)) + * Add support for ADK tools in SkillToolset ([44a5e6b](https://github.com/google/adk-python/commit/44a5e6bdb8e8f02891e72b65ef883f108c506f6a)) + * limit number of user-provided BigQuery job labels and reserve internal prefixes ([8c4ff74](https://github.com/google/adk-python/commit/8c4ff74e7d70cf940f54f6d7735f001495ce75d5)) + * Add param support to Bigtable execute_sql ([5702a4b](https://github.com/google/adk-python/commit/5702a4b1f59b17fd8b290fc125c349240b0953d7)) + * **bigtable:** add Bigtable cluster metadata tools ([34c560e](https://github.com/google/adk-python/commit/34c560e66e7ad379f586bbcd45a9460dc059bee2)) + * execute-type param addition in GkeCodeExecutor ([9c45166](https://github.com/google/adk-python/commit/9c451662819a6c7de71be71d12ea715b2fe74135)) + * **skill:** Add BashTool ([8a31612](https://github.com/google/adk-python/commit/8a3161202e4bac0bb8e8801b100f4403c1c75646)) + * Add support for toolsets to additional_tools field of SkillToolset ([066fcec](https://github.com/google/adk-python/commit/066fcec3e8e669d1c5360e1556afce3f7e068072)) + + +* **[Optimization]** + * Add `adk optimize` command ([b18d7a1](https://github.com/google/adk-python/commit/b18d7a140f8e18e03255b07e6d89948427790095)) + * Add interface between optimization infra and LocalEvalService ([7b7ddda](https://github.com/google/adk-python/commit/7b7ddda46ca701952f002b2807b89dbef5322414)) + * Add GEPA root agent prompt optimizer ([4e3e2cb](https://github.com/google/adk-python/commit/4e3e2cb58858e08a79bc6119ad49b6c049dbc0d0)) + +* **[Integrations]** + * Enhance BigQuery plugin schema upgrades and error reporting ([bcf38fa](https://github.com/google/adk-python/commit/bcf38fa2bac2f0d1ab74e07e01eb5160bad1d6dc)) + * Enhance BQ plugin with fork safety, auto views, and trace continuity ([80c5a24](https://github.com/google/adk-python/commit/80c5a245557cd75870e72bff0ecfaafbd37fdbc7)) + * Handle Conflict Errors in BigQuery Agent Analytics Plugin ([372c76b](https://github.com/google/adk-python/commit/372c76b857daa1102e76d755c0758f1515d6f180)) + * Added tracking headers for ADK CLI command to Agent Engine ([3117446](https://github.com/google/adk-python/commit/3117446293d30039c2f21f3d17a64a456c42c47d)) + +* **[A2A]** + * New implementation of A2aAgentExecutor and A2A-ADK conversion ([87ffc55](https://github.com/google/adk-python/commit/87ffc55640dea1185cf67e6f9b78f70b30867bcc)) + * New implementation of RemoteA2aAgent and A2A-ADK conversion ([6770e41](https://github.com/google/adk-python/commit/6770e419f5e200f4c7ad26587e1f769693ef4da0)) + +### Bug Fixes + +* Allow artifact services to accept dictionary representations of types.Part ([b004da5](https://github.com/google/adk-python/commit/b004da50270475adc9e1d7afe4064ca1d10c560a)), closes [#2886](https://github.com/google/adk-python/issues/2886) +* Decode image data from ComputerUse tool response into image blobs ([d7cfd8f](https://github.com/google/adk-python/commit/d7cfd8fe4def2198c113ff1993ef39cd519908a1)) +* Expand LiteLLM reasoning extraction to include 'reasoning' field ([9468487](https://github.com/google/adk-python/commit/94684874e436c2959cfc90ec346010a6f4fddc49)), closes [#3694](https://github.com/google/adk-python/issues/3694) +* Filter non-agent directories from list_agents() ([3b5937f](https://github.com/google/adk-python/commit/3b5937f022adf9286dc41e01e3618071a23eb992)) +* Fix Type Error by initializing user_content as a Content object ([2addf6b](https://github.com/google/adk-python/commit/2addf6b9dacfe87344aeec0101df98d99c23bdb1)) +* Handle length finish reason in LiteLLM responses ([4c6096b](https://github.com/google/adk-python/commit/4c6096baa1b0bed8533397287a5c11a0c4cb9101)), closes [#4482](https://github.com/google/adk-python/issues/4482) +* In SaveFilesAsArtifactsPlugin, write the artifact delta to state then event actions so that the plugin works with ADK Web UI's artifacts panel ([d6f31be](https://github.com/google/adk-python/commit/d6f31be554d9b7ee15fd9c95ae655b2265fb1f32)) +* Make invocation_context optional in convert_event_to_a2a_message ([8e79a12](https://github.com/google/adk-python/commit/8e79a12d6bcde43cc33247b7ee6cc9e929fa6288)) +* Optimize row-level locking in append_event ([d61846f](https://github.com/google/adk-python/commit/d61846f6c6dd5e357abb0e30eaf61fe27896ae6a)), closes [#4655](https://github.com/google/adk-python/issues/4655) +* Preserve thought_signature in FunctionCall conversions between GenAI and A2A ([f9c104f](https://github.com/google/adk-python/commit/f9c104faf73e2a002bb3092b50fb88f4eed78163)) +* Prevent splitting of SSE events with artifactDelta for function resume requests ([6a929af](https://github.com/google/adk-python/commit/6a929af718fa77199d1eecc62b16c54beb1c8d84)), closes [#4487](https://github.com/google/adk-python/issues/4487) +* Propagate file names during A2A to/from Genai Part conversion ([f324fa2](https://github.com/google/adk-python/commit/f324fa2d62442301ebb2e7974eb97ea870471410)) +* Propagate thought from A2A TextPart metadata to GenAI Part ([e59929e](https://github.com/google/adk-python/commit/e59929e11a56aaee7bb0c45cd4c9d9fef689548c)) +* Re-export DEFAULT_SKILL_SYSTEM_INSTRUCTION to skills and skill/prompt.py to avoid breaking current users ([de4dee8](https://github.com/google/adk-python/commit/de4dee899cd777a01ba15906f8496a72e717ea98)) +* Refactor type string update in Anthropic tool param conversion ([ab4b736](https://github.com/google/adk-python/commit/ab4b736807dabee65659486a68135d9f1530834c)) +* **simulation:** handle NoneType generated_content ([9d15517](https://github.com/google/adk-python/commit/9d155177b956f690d4c99560f582e3e90e111f71)) +* Store and retrieve EventCompaction via custom_metadata in Vertex AISessionService ([2e434ca](https://github.com/google/adk-python/commit/2e434ca7be765d45426fde9d52b131921bd9fa30)), closes [#3465](https://github.com/google/adk-python/issues/3465) +* Support before_tool_callback and after_tool_callback in Live mode ([c36a708](https://github.com/google/adk-python/commit/c36a708058163ade061cd3d2f9957231a505a62d)), closes [#4704](https://github.com/google/adk-python/issues/4704) +* temp-scoped state now visible to subsequent agents in same invocation ([2780ae2](https://github.com/google/adk-python/commit/2780ae2892adfbebc7580c843d2eaad29f86c335)) +* **tools:** Handle JSON Schema boolean schemas in Gemini schema conversion ([3256a67](https://github.com/google/adk-python/commit/3256a679da3e0fb6f18b26057e87f5284680cb58)) +* typo in A2A EXPERIMENTAL warning ([eb55eb7](https://github.com/google/adk-python/commit/eb55eb7e7f0fa647d762205225c333dcd8a08dd0)) +* Update agent_engine_sandbox_code_executor in ADK ([dff4c44](https://github.com/google/adk-python/commit/dff4c4404051b711c8be437ba0ae26ca2763df7d)) +* update Bigtable query tools to async functions ([72f3e7e](https://github.com/google/adk-python/commit/72f3e7e1e00d93c632883027bf6d31a9095cd6c2)) +* Update expected UsageMetadataChunk in LiteLLM tests ([dd0851a](https://github.com/google/adk-python/commit/dd0851ac74d358bc030def5adf242d875ab18265)), closes [#4680](https://github.com/google/adk-python/issues/4680) +* update toolbox server and SDK package versions ([2e370ea](https://github.com/google/adk-python/commit/2e370ea688033f0663501171d0babfb0d74de4b2)) +* Validate session before streaming instead of eagerly advancing the runner generator ([ebbc114](https://github.com/google/adk-python/commit/ebbc1147863956e85931f8d46abb0632e3d1cf67)) + + +### Code Refactoring + +* extract reusable functions from hitl and auth preprocessor ([c59afc2](https://github.com/google/adk-python/commit/c59afc21cbed27d1328872cdc2b0e182ab2ca6c8)) +* Rename base classes and TypeVars in optimization data types ([9154ef5](https://github.com/google/adk-python/commit/9154ef59d29eb37538914e9967c4392cc2a24237)) + + ## [1.26.0](https://github.com/google/adk-python/compare/v1.25.1...v1.26.0) (2026-02-26) diff --git a/src/google/adk/version.py b/src/google/adk/version.py index 2e373f505a..46ed9b3d36 100644 --- a/src/google/adk/version.py +++ b/src/google/adk/version.py @@ -13,4 +13,4 @@ # limitations under the License. # version: major.minor.patch -__version__ = "1.26.0" +__version__ = "1.27.2" From 691d0602f5f2b804cd8df85a6bf9b8dcc419db99 Mon Sep 17 00:00:00 2001 From: Jacksunwei <1281348+Jacksunwei@users.noreply.github.com> Date: Tue, 17 Mar 2026 21:11:34 +0000 Subject: [PATCH 4/4] chore: update last-release-sha for next release --- .github/release-please-config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/release-please-config.json b/.github/release-please-config.json index 053aab23c3..d005c874eb 100644 --- a/.github/release-please-config.json +++ b/.github/release-please-config.json @@ -1,6 +1,6 @@ { "$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json", - "last-release-sha": "8f5428150d18ed732b66379c0acb806a9121c3cb", + "last-release-sha": "7b94a767337e0d642e808734608f07a70e077c62", "packages": { ".": { "release-type": "python",