feat: Custom session ID with agent engine#5129
feat: Custom session ID with agent engine#5129guillaumeblaquiere wants to merge 11 commits intogoogle:mainfrom
Conversation
chore: autoformat.sh on the whole project
|
Response from ADK Triaging Agent Hello @guillaumeblaquiere, thank you for your contribution! Could you please add a |
|
Hi @guillaumeblaquiere , Thank you for your contribution! We appreciate you taking the time to submit this pull request. Can you please fix the failing unit test and formatting errors |
|
@rohityan I didn't find tests related to my updates, only A2A tests fail on my computer (python 3.12). Can you tell me how to run test on GitHub to verify myself the conformity before annoying you? |
|
Hi @guillaumeblaquiere , they pass now, can you also fix the formatting error. |
|
@rohityan, I ran the autoformat.sh script and, 2 files, again out of my scopes has been updated. No worries, but my PR shouldn't be slowed because of that side issues. | Organizing imports for src/...All done! ✨ 🍰 ✨| Organizing imports for tests/...All done! ✨ 🍰 ✨| Organizing imports for contributing/...All done! ✨ 🍰 ✨| Auto-formatting src/...reformatted src/google/adk/cli/trigger_routes.py All done! ✨ 🍰 ✨
|
For out of scope file, I ran
autoformat.shon the whole projectUp to recently, Agent Engine session management API did not accept custom session-id. it was always generated by Agent Engine
Problem:
Solution:
Now, the API accept custom sessions, with a query parameter
https://docs.cloud.google.com/vertex-ai/generative-ai/docs/reference/rest/v1/projects.locations.reasoningEngines.sessions/create
But the VertexAISessionService wasn't up to date with this change.
I updated it
Additional info
The API returns a strange return code about LR0 definition, and request only LONG as session ID. But, even if you use string, it works well.
So, I catch the "strange" error, log it, but no longer block the processing.
Testing plan
VertexAISessionService Creation with custom session ID and the simulation of 400 HTTP return code with the message "Since the idType "sessions" is not a documented LRO Parent ID..."