You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: Handle App objects in eval and graph endpoints
Merge #3060 ## Description Fixes#3059 This PR fixes two endpoints in `adk web` that fail when using App objects instead of bare agents. ## Changes - **Eval execution endpoint** (line ~969): Extract root_agent from App objects before passing to LocalEvalService - **Graph visualization endpoint** (line ~1308): Extract root_agent from App objects before graph operations Both endpoints now properly handle both BaseAgent and App objects by checking the type and extracting `.root_agent` when needed. ## Testing Plan ### Manual E2E Testing with ADK Web Tested with an App object that includes context caching: ```python from google.adk.apps import App from google.adk.agents import LlmAgent root_agent = LlmAgent(name="MyAgent", model="gemini-1.5-pro-002") app = App( name="my_agent", root_agent=root_agent, context_cache_config=ContextCacheConfig(...) ) ``` **Before fix:** - Graph visualization failed (tried to call agent methods on App object) - Eval execution failed (LocalEvalService received App instead of agent) **After fix:** - Graph visualization works correctly - Eval execution works correctly - Both endpoints properly extract root_agent from App objects ## Checklist - [x] Code follows project style (autoformat.sh passed) - [x] Changes are focused and minimal - [x] Issue #3059 created and referenced - [x] Manual E2E testing completed COPYBARA_INTEGRATE_REVIEW=#3060 from ejfn:ejfn/bugfix-app-object-endpoints 01c3019 PiperOrigin-RevId: 821746910
0 commit comments