fix: include rewind_before_invocation_id in VertexAiSessionService.append_event#4978
Open
yuting0624 wants to merge 3 commits intogoogle:mainfrom
Open
fix: include rewind_before_invocation_id in VertexAiSessionService.append_event#4978yuting0624 wants to merge 3 commits intogoogle:mainfrom
yuting0624 wants to merge 3 commits intogoogle:mainfrom
Conversation
…pend_event (google#4930) VertexAiSessionService.append_event() was not including rewind_before_invocation_id in the actions dict sent to the Vertex AI API. This caused rewind events to lose their target invocation ID when persisted, making session rewind non-functional for Agent Engine deployments. Added the missing field to the actions dict and a round-trip test. Fixes google#4930
Collaborator
|
Response from ADK Triaging Agent Hello @yuting0624, thank you for your contribution! It looks like the ./autoformat.shThis will ensure your changes adhere to the project's coding style. Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #4930
VertexAiSessionService.append_event()was not includingrewind_before_invocation_idin theactionsdict sent to the Vertex AI Agent Engine API. This caused rewind events to lose their target invocation ID when persisted, making session rewind non-functional for Agent Engine deployments.Changes
src/google/adk/sessions/vertex_ai_session_service.py: Addedrewind_before_invocation_idto the actions dict inappend_event()(3 lines)tests/unittests/sessions/test_vertex_ai_session_service.py: Addedtest_append_event_with_rewindto verify the field round-trips correctly through append and getRoot Cause
The
actionsdict construction inappend_event()explicitly maps each field fromEventActionsto the API payload, butrewind_before_invocation_idwas omitted. Other fields liketransfer_to_agent,state_delta,skip_summarization, etc. were all present.