fix: Use async for to loop through event iterator to get all events in vertex_ai_session_service

Fix https://github.com/google/adk-python/issues/3559

Co-authored-by: Shangjie Chen <deanchen@google.com>
PiperOrigin-RevId: 832476367
This commit is contained in:
Shangjie Chen
2025-11-14 15:22:27 -08:00
committed by Copybara-Service
parent a754c96d3c
commit 9211f4ce8c
2 changed files with 61 additions and 4 deletions
@@ -178,7 +178,7 @@ class VertexAiSessionService(BaseSessionService):
)
session.events += [
_from_api_event(event)
for event in events_iterator
async for event in events_iterator
if event.timestamp.timestamp() <= update_timestamp
]