fix: add DevServer.get_runner_async hook for memory service support#636
Open
RuJ2 wants to merge 1 commit into
Open
fix: add DevServer.get_runner_async hook for memory service support#636RuJ2 wants to merge 1 commit into
RuJ2 wants to merge 1 commit into
Conversation
The current hook only patches AdkWebServer.get_runner_async, but veadk web actually creates a DevServer instance (fast_api.py:558). Since DevServer is not a subclass of AdkWebServer, the hook never runs, and long_term_memory is never injected into the Runner. This causes LoadMemoryTool to always return empty results.
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.
Problem
veadk webusesDevServer(google-adk 2.x), but the memory-service hook only patchesAdkWebServer.get_runner_async. SinceDevServeris not a subclass ofAdkWebServer, the hook never runs,long_term_memoryis never injected into the Runner, andLoadMemoryToolalways returns empty results.Class hierarchy in google-adk 2.x
Root Cause
google-adk 2.0.0 refactored the Server class hierarchy and deprecated
AdkWebServer. veadk 1.0.0 still hooks onlyAdkWebServer, so the monkey-patch is ineffective whenDevServeris used.veadk dependency declaration (google-adk with no version constraint) allows google-adk 2.x to be installed, exposing this incompatibility.
Fix
Also hook
DevServer.get_runner_asyncalongside the existingAdkWebServerhook. This ensures the memory service is injected regardless of which Server class is instantiated.Testing
Notes
Longer-term fixes to consider: