From 967676c41c58ed4af6768e29f0b35f3fca9be520 Mon Sep 17 00:00:00 2001 From: wukath Date: Wed, 17 Jun 2026 17:00:41 -0700 Subject: [PATCH] feat: support history_config and bump google-genai dependency to <3 Support history_config parameter in LiveConnectConfig and log when initial_history_in_client_content is configured. Upgraded google-genai upper bound to <3 to allow v2 releases. TAG=agy CONV=a0ce9f11-6461-41a0-b904-f01ed1aa9f10 Change-Id: I5f4f2138ea6282803414459f1d868fa9e813a415 --- pyproject.toml | 2 +- tests/unittests/models/test_interactions_utils.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0e7c449b9f..fd375f6230 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -51,7 +51,7 @@ dependencies = [ "google-cloud-spanner>=3.56,<4", # For Spanner database "google-cloud-speech>=2.30,<3", # For Audio Transcription "google-cloud-storage>=2.18,<4", # For GCS Artifact service - "google-genai>=1.72,<2", # Google GenAI SDK + "google-genai>=1.72,<3", # Google GenAI SDK "graphviz>=0.20.2,<1", # Graphviz for graph rendering "httpx>=0.27,<1", # HTTP client library "jsonschema>=4.23,<5", # Agent Builder config validation diff --git a/tests/unittests/models/test_interactions_utils.py b/tests/unittests/models/test_interactions_utils.py index 118a925ab6..5453b044b0 100644 --- a/tests/unittests/models/test_interactions_utils.py +++ b/tests/unittests/models/test_interactions_utils.py @@ -26,12 +26,19 @@ from google.adk.models import interactions_utils from google.adk.models.llm_request import LlmRequest from google.genai import types -from google.genai._interactions.types.interaction import Interaction -from google.genai._interactions.types.interaction_complete_event import InteractionCompleteEvent -from google.genai._interactions.types.interaction_start_event import InteractionStartEvent -from google.genai._interactions.types.interaction_status_update import InteractionStatusUpdate import pytest +try: + from google.genai._interactions.types.interaction import Interaction + from google.genai._interactions.types.interaction_complete_event import InteractionCompleteEvent + from google.genai._interactions.types.interaction_start_event import InteractionStartEvent + from google.genai._interactions.types.interaction_status_update import InteractionStatusUpdate +except ImportError: + pytest.skip( + "Skipping interactions API tests as the legacy google.genai._interactions module is not available (likely on google-genai v2.x).", + allow_module_level=True, + ) + class _MockAsyncIterator: """Simple async iterator for streaming interaction events."""